diff options
| author | 0cyn <kat@vector35.com> | 2026-04-14 15:45:28 -0400 |
|---|---|---|
| committer | 0cyn <kat@vector35.com> | 2026-04-14 15:47:03 -0400 |
| commit | 9fddd2a54eaa640888c656cdfb490690ec6f519b (patch) | |
| tree | d2379dd29e8c17dd16dda72980273a30763c8b8a /binaryninjaapi.h | |
| parent | 544b7ee320dd8dd69f7b368a36ee72e3faf7e640 (diff) | |
Plugin Manifest V2 Support
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 70 |
1 files changed, 39 insertions, 31 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index a36ee271..fa0a4716 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -1980,20 +1980,18 @@ namespace BinaryNinja { void DisablePlugins(); bool IsPluginsEnabled(); bool InitPlugins(bool allowUserPlugins = true); - /*! - \deprecated Use `InitPlugins()` - */ - BN_DEPRECATED("Use InitPlugins", "InitPlugins") - void InitCorePlugins(); - /*! - \deprecated Use `InitPlugins()` - */ - BN_DEPRECATED("Use InitPlugins", "InitPlugins") - void InitUserPlugins(); - void InitRepoPlugins(); std::string GetBundledPluginDirectory(); + + /*! Get the directory that script plugins bundled with BinaryNinja are located. + * + * On non-Apple platforms by default this will be identical to the core plugin directory. + * + * @return std::string - Absolute path directory that script plugins bundled with BinaryNinja are located in. + */ + std::string GetBundledScriptPluginDirectory(); void SetBundledPluginDirectory(const std::string& path); + void SetBundledScriptPluginDirectory(const std::string& path); std::string GetUserDirectory(); /*! Get the Binary Ninja system cache directory @@ -2033,7 +2031,7 @@ namespace BinaryNinja { std::string GetActiveUpdateChannel(); void SetActiveUpdateChannel(const std::string& channel); - void SetCurrentPluginLoadOrder(BNPluginLoadOrder order); + void SetCurrentPluginLoadOrder(BNPluginLoadPhase order); void AddRequiredPluginDependency(const std::string& name); void AddOptionalPluginDependency(const std::string& name); @@ -19145,13 +19143,25 @@ namespace BinaryNinja { typedef BNPluginStatus PluginStatus; typedef BNPluginType PluginType; + struct ExtensionVersion + { + std::string id; + std::string version; + + std::string longDescription; + std::string changelog; + + uint64_t minimumClientVersion; + std::string created; + }; + /*! \ingroup pluginmanager */ - class RepoPlugin : public CoreRefCountObject<BNRepoPlugin, BNNewPluginReference, BNFreePlugin> + class Extension : public CoreRefCountObject<BNPlugin, BNNewPluginReference, BNFreePlugin> { public: - RepoPlugin(BNRepoPlugin* plugin); + Extension(BNPlugin* plugin); PluginStatus GetPluginStatus() const; std::vector<std::string> GetApis() const; std::vector<std::string> GetInstallPlatforms() const; @@ -19161,20 +19171,22 @@ namespace BinaryNinja { std::string GetPluginDirectory() const; std::string GetAuthor() const; std::string GetDescription() const; - std::string GetLicenseText() const; - std::string GetLongdescription() const; std::string GetName() const; std::vector<PluginType> GetPluginTypes() const; std::string GetPackageUrl() const; std::string GetProjectUrl() const; std::string GetAuthorUrl() const; - std::string GetVersion() const; + std::vector<ExtensionVersion> GetVersions() const; + ExtensionVersion GetCurrentVersion() const; + std::string GetCurrentVersionID() const; + std::string GetLatestVersionID() const; + bool IsVersionIDLessThan(const std::string& smaller, const std::string& larger) const; std::string GetCommit() const; std::string GetRepository() const; std::string GetProjectData(); VersionInfo GetMinimumVersionInfo() const; VersionInfo GetMaximumVersionInfo() const; - uint64_t GetLastUpdate(); + std::string GetCreationDate(); bool IsViewOnly() const; bool IsBeingDeleted() const; bool IsBeingUpdated() const; @@ -19188,12 +19200,12 @@ namespace BinaryNinja { bool AreDependenciesBeingInstalled() const; bool Uninstall(); - bool Install(); + bool Install(std::string versionID); bool InstallDependencies(); // `force` ignores optional checks for platform/api compliance bool Enable(bool force); bool Disable(); - bool Update(); + bool Update(std::string versionID); }; /*! @@ -19207,26 +19219,22 @@ namespace BinaryNinja { std::string GetRepoPath() const; std::string GetLocalReference() const; std::string GetRemoteReference() const; - std::vector<Ref<RepoPlugin>> GetPlugins() const; + std::vector<Ref<Extension>> GetPlugins() const; std::string GetPluginDirectory() const; - Ref<RepoPlugin> GetPluginByPath(const std::string& pluginPath); + Ref<Extension> GetPluginByPath(const std::string& pluginPath); std::string GetFullPath() const; }; /*! \ingroup pluginmanager */ - class RepositoryManager : - public CoreRefCountObject<BNRepositoryManager, BNNewRepositoryManagerReference, BNFreeRepositoryManager> + class RepositoryManager { public: - RepositoryManager(const std::string& enabledPluginsPath); - RepositoryManager(BNRepositoryManager* repoManager); - RepositoryManager(); - bool CheckForUpdates(); - std::vector<Ref<Repository>> GetRepositories(); - Ref<Repository> GetRepositoryByPath(const std::string& repoName); - bool AddRepository(const std::string& url, // URL to raw plugins.json file + static bool CheckForUpdates(); + static std::vector<Ref<Repository>> GetRepositories(); + static Ref<Repository> GetRepositoryByPath(const std::string& repoName); + static bool AddRepository(const std::string& url, // URL to raw plugins.json file const std::string& repoPath); // Relative path within the repositories directory Ref<Repository> GetDefaultRepository(); }; |
