summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2017-03-22 13:22:16 -0400
committerPeter LaFosse <peter@vector35.com>2017-03-22 13:22:16 -0400
commit1e8e975ed8100c7a6186e8b27833a067ceaf05be (patch)
tree75770b172689110532e25a8959cc5d15bd6292e5
parentc3e09a578a4beca8fc63b5cdfd1bf3f6a4d1451b (diff)
Modifications to support partial uninstallation
-rw-r--r--binaryninjaapi.h4
-rw-r--r--binaryninjacore.h8
-rw-r--r--pluginmanager.cpp8
3 files changed, 15 insertions, 5 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index 7ac790d1..544c2e10 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -2604,7 +2604,9 @@ namespace BinaryNinja
const std::string& name,
const std::vector<PluginType>& pluginTypes,
const std::string& url,
- const std::string& version);
+ const std::string& version,
+ const std::string& repoPath,
+ const std::string& gitModulesPath);
RepoPlugin(BNRepoPlugin* plugin);
std::string GetPath() const;
bool IsInstalled() const;
diff --git a/binaryninjacore.h b/binaryninjacore.h
index 7460f7c1..80fc715c 100644
--- a/binaryninjacore.h
+++ b/binaryninjacore.h
@@ -2417,7 +2417,9 @@ extern "C"
const BNPluginType* pluginTypes,
size_t pluginTypesSize,
const char* url,
- const char* version);
+ const char* version,
+ const char* repoPath,
+ const char* gitModulesPath);
BINARYNINJACOREAPI BNRepoPlugin* BNNewPluginReference(BNRepoPlugin* r);
BINARYNINJACOREAPI void BNFreePlugin(BNRepoPlugin* plugin);
BINARYNINJACOREAPI const char* BNPluginGetPath(BNRepoPlugin* p);
@@ -2475,8 +2477,10 @@ extern "C"
BINARYNINJACOREAPI void BNLlvmServicesAssembleFree(char *outBytes, char *err);
- BINARYNINJACOREAPI int BNDeleteDirectory(const char* path, int contentsOnly);
+ // Filesystem functionality
BINARYNINJACOREAPI int BNDeleteFile(const char* path);
+ BINARYNINJACOREAPI int BNDeleteDirectory(const char* path, int contentsOnly);
+ BINARYNINJACOREAPI int BNCreateDirectory(const char* path);
#ifdef __cplusplus
}
#endif
diff --git a/pluginmanager.cpp b/pluginmanager.cpp
index 24f6f09f..ab2b23ee 100644
--- a/pluginmanager.cpp
+++ b/pluginmanager.cpp
@@ -23,7 +23,9 @@ RepoPlugin::RepoPlugin(const string& path,
const string& name,
const vector<PluginType>& pluginTypes,
const string& url,
- const string& version)
+ const string& version,
+ const string& repoPath,
+ const string& gitModulesPath)
{
m_object = BNCreatePlugin(path.c_str(),
installed,
@@ -39,7 +41,9 @@ RepoPlugin::RepoPlugin(const string& path,
&pluginTypes[0],
pluginTypes.size(),
url.c_str(),
- version.c_str());
+ version.c_str(),
+ repoPath.c_str(),
+ gitModulesPath.c_str());
}
RepoPlugin::RepoPlugin(BNRepoPlugin* plugin)