@@ -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