Skip to content

Commit 62ee590

Browse files
committed
Rebase on dev
1 parent 00566fc commit 62ee590

22 files changed

+1398
-1556
lines changed

.doxygen.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
\ingroup coreapi
147147
*/
148148
/*!
149-
\defgroup pluginmanager Plugin Manager
149+
\defgroup extensionmanager Extension Manager
150150
\ingroup coreapi
151151
*/
152152
/*!

api-docs/spelling.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ args
6969
bnpr
7070
bndb
7171
bnpm
72-
pluginmanager
72+
extensionmanager
7373
scriptingprovider
7474
globals
7575
cancelation

binaryninjaapi.cpp

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,6 @@ bool BinaryNinja::InitPlugins(bool allowUserPlugins)
4949
}
5050

5151

52-
void BinaryNinja::InitCorePlugins()
53-
{
54-
BNInitCorePlugins();
55-
}
56-
57-
58-
void BinaryNinja::InitUserPlugins()
59-
{
60-
BNInitUserPlugins();
61-
}
62-
63-
64-
void BinaryNinja::InitRepoPlugins()
65-
{
66-
BNInitRepoPlugins();
67-
}
68-
69-
7052
string BinaryNinja::GetBundledPluginDirectory()
7153
{
7254
char* path = BNGetBundledPluginDirectory();
@@ -117,17 +99,6 @@ string BinaryNinja::GetSettingsFileName()
11799
}
118100

119101

120-
string BinaryNinja::GetRepositoriesDirectory()
121-
{
122-
char* dir = BNGetRepositoriesDirectory();
123-
if (!dir)
124-
return string();
125-
string result(dir);
126-
BNFreeString(dir);
127-
return result;
128-
}
129-
130-
131102
string BinaryNinja::GetInstallDirectory()
132103
{
133104
char* path = BNGetInstallDirectory();

binaryninjaapi.h

Lines changed: 68 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -2001,15 +2001,6 @@ namespace BinaryNinja {
20012001
void DisablePlugins();
20022002
bool IsPluginsEnabled();
20032003
bool InitPlugins(bool allowUserPlugins = true);
2004-
/*!
2005-
\deprecated Use `InitPlugins()`
2006-
*/
2007-
void InitCorePlugins(); // Deprecated, use InitPlugins
2008-
/*!
2009-
\deprecated Use `InitPlugins()`
2010-
*/
2011-
void InitUserPlugins(); // Deprecated, use InitPlugins
2012-
void InitRepoPlugins();
20132004

20142005
std::string GetBundledPluginDirectory();
20152006
void SetBundledPluginDirectory(const std::string& path);
@@ -18136,94 +18127,95 @@ namespace BinaryNinja {
1813618127
virtual bool RunProgressDialog(const std::string& title, bool canCancel, std::function<void(ProgressFunction progress)> task) = 0;
1813718128
};
1813818129

18139-
typedef BNPluginOrigin PluginOrigin;
1814018130
typedef BNPluginStatus PluginStatus;
18141-
typedef BNPluginType PluginType;
18131+
18132+
// /*!
18133+
// * \ingroup extensionmanager
18134+
// */
18135+
// class ExtensionVersion : public CoreRefCountObject<BNExtensionVersion, BNNewExtensionVersionReference, BNFreeExtensionVersion>
18136+
// {
18137+
// public:
18138+
// ExtensionVersion(BNExtensionVersion* version);
18139+
// std::string GetVersionString() const;
18140+
// std::string GetLongDescription() const;
18141+
// std::string GetChangelog() const;
18142+
// BNVersionInfo GetMinimumVersionInfo() const;
18143+
// BNVersionInfo GetMaximumVersionInfo() const;
18144+
// std::string GetDependencies() const;
18145+
// std::string GetDownloadUrl(bool contributeToInstallCounts = true) const;
18146+
// bool InstallDependencies() const;
18147+
// };
1814218148

1814318149
/*!
18144-
\ingroup pluginmanager
18150+
* \ingroup extensionmanager
1814518151
*/
18146-
class RepoPlugin : public CoreRefCountObject<BNRepoPlugin, BNNewPluginReference, BNFreePlugin>
18152+
class Extension : public CoreRefCountObject<BNExtension, BNNewExtensionReference, BNFreeExtension>
1814718153
{
18148-
public:
18149-
RepoPlugin(BNRepoPlugin* plugin);
18150-
PluginStatus GetPluginStatus() const;
18151-
std::vector<std::string> GetApis() const;
18152-
std::vector<std::string> GetInstallPlatforms() const;
18154+
public:
18155+
Extension(BNExtension* extension);
1815318156
std::string GetPath() const;
18154-
std::string GetSubdir() const;
18155-
std::string GetDependencies() const;
18156-
std::string GetPluginDirectory() const;
18157+
// PluginStatus GetPluginStatus() const;
18158+
18159+
bool IsInstalled() const;
18160+
bool IsEnabled() const;
18161+
1815718162
std::string GetAuthor() const;
1815818163
std::string GetDescription() const;
18159-
std::string GetLicenseText() const;
18160-
std::string GetLongdescription() const;
1816118164
std::string GetName() const;
18162-
std::vector<PluginType> GetPluginTypes() const;
18163-
std::string GetPackageUrl() const;
18165+
std::string GetPluginType() const;
1816418166
std::string GetProjectUrl() const;
18165-
std::string GetAuthorUrl() const;
18166-
std::string GetVersion() const;
18167-
std::string GetCommit() const;
18168-
std::string GetRepository() const;
18169-
std::string GetProjectData();
18170-
VersionInfo GetMinimumVersionInfo() const;
18171-
VersionInfo GetMaximumVersionInfo() const;
18172-
uint64_t GetLastUpdate();
18173-
bool IsViewOnly() const;
18174-
bool IsBeingDeleted() const;
18175-
bool IsBeingUpdated() const;
18176-
bool IsInstalled() const;
18177-
bool IsEnabled() const;
18167+
18168+
std::string GetChannelName() const;
18169+
// std::vector<Ref<ExtensionVersion>> GetVersions() const;
18170+
// Ref<ExtensionVersion> GetCurrentVersion() const;
18171+
// Ref<ExtensionVersion> GetLatestVersion() const;
18172+
// bool IsBeingDeleted() const;
18173+
// bool IsBeingUpdated() const;
18174+
// bool IsInstalled() const;
18175+
// bool IsEnabled() const;
1817818176
bool IsRunning() const;
18179-
bool IsUpdatePending() const;
18180-
bool IsDisablePending() const;
18181-
bool IsDeletePending() const;
18182-
bool IsUpdateAvailable() const;
18183-
bool AreDependenciesBeingInstalled() const;
18184-
18185-
bool Uninstall();
18186-
bool Install();
18187-
bool InstallDependencies();
18188-
// `force` ignores optional checks for platform/api compliance
18189-
bool Enable(bool force);
18177+
// bool IsUpdatePending() const;
18178+
// bool IsDisablePending() const;
18179+
// bool IsDeletePending() const;
18180+
// bool IsUpdateAvailable() const;
18181+
// bool AreDependenciesBeingInstalled() const;
18182+
// bool Uninstall();
18183+
// bool Install(Ref<ExtensionVersion> version = nullptr);
18184+
// bool InstallDependencies();
18185+
bool Enable();
18186+
// bool Update(Ref<ExtensionVersion> version = nullptr);
1819018187
bool Disable();
18191-
bool Update();
1819218188
};
1819318189

1819418190
/*!
18195-
\ingroup pluginmanager
18191+
* \ingroup extensionmanager
1819618192
*/
18197-
class Repository : public CoreRefCountObject<BNRepository, BNNewRepositoryReference, BNFreeRepository>
18193+
class ExtensionChannel : public CoreRefCountObject<BNExtensionChannel, BNNewChannelReference, BNFreeChannel>
1819818194
{
18199-
public:
18200-
Repository(BNRepository* repository);
18201-
std::string GetUrl() const;
18202-
std::string GetRepoPath() const;
18203-
std::string GetLocalReference() const;
18204-
std::string GetRemoteReference() const;
18205-
std::vector<Ref<RepoPlugin>> GetPlugins() const;
18206-
std::string GetPluginDirectory() const;
18207-
Ref<RepoPlugin> GetPluginByPath(const std::string& pluginPath);
18208-
std::string GetFullPath() const;
18195+
public:
18196+
ExtensionChannel(BNExtensionChannel* channel);
18197+
// std::string GetUrl() const;
18198+
std::string GetName() const;
18199+
std::vector<Ref<Extension>> GetExtensions() const;
18200+
// Ref<Extension> GetExtensionByPath(const std::string& pluginPath);
18201+
// std::string GetFullPath() const;
1820918202
};
1821018203

1821118204
/*!
18212-
\ingroup pluginmanager
18213-
*/
18214-
class RepositoryManager :
18215-
public CoreRefCountObject<BNRepositoryManager, BNNewRepositoryManagerReference, BNFreeRepositoryManager>
18205+
* \ingroup extensionmanager
18206+
*/
18207+
class ExtensionManager
1821618208
{
18217-
public:
18218-
RepositoryManager(const std::string& enabledPluginsPath);
18219-
RepositoryManager(BNRepositoryManager* repoManager);
18220-
RepositoryManager();
18221-
bool CheckForUpdates();
18222-
std::vector<Ref<Repository>> GetRepositories();
18223-
Ref<Repository> GetRepositoryByPath(const std::string& repoName);
18224-
bool AddRepository(const std::string& url, // URL to raw plugins.json file
18225-
const std::string& repoPath); // Relative path within the repositories directory
18226-
Ref<Repository> GetDefaultRepository();
18209+
BNExtensionManager* m_object;
18210+
public:
18211+
ExtensionManager(BNExtensionManager* manager);
18212+
ExtensionManager();
18213+
// bool CheckForUpdates();
18214+
// bool FetchChannelsAsync();
18215+
std::vector<Ref<ExtensionChannel>> GetChannels();
18216+
// Ref<ExtensionChannel> GetChannelByName(const std::string& name);
18217+
// bool AddChannel(const std::string& url, const std::string& name);
18218+
// std::string GetUserExtensionsDirectory() const;
1822718219
};
1822818220

1822918221
/*! \c Settings provides a way to define and access settings in a hierarchical fashion. The value of a setting can

0 commit comments

Comments
 (0)