diff options
author | saturneric <[email protected]> | 2023-10-17 14:57:03 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-10-17 14:57:03 +0000 |
commit | e5694e9f6d2a84954eaf508557caa795f5282b07 (patch) | |
tree | 40dd946005f7d5b7cdab7db608367add5bbdb38b /src/module/system/ModuleManager.h | |
parent | refactor: flatpak yml file can not host here (diff) | |
download | GpgFrontend-e5694e9f6d2a84954eaf508557caa795f5282b07.tar.gz GpgFrontend-e5694e9f6d2a84954eaf508557caa795f5282b07.zip |
refactor: change plugin system to module system
Diffstat (limited to '')
-rw-r--r-- | src/module/system/ModuleManager.h (renamed from src/plugin/system/PluginManager.h) | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/plugin/system/PluginManager.h b/src/module/system/ModuleManager.h index 5fc36291..3520bbcf 100644 --- a/src/plugin/system/PluginManager.h +++ b/src/module/system/ModuleManager.h @@ -26,13 +26,13 @@ * */ -#ifndef GPGFRONTEND_PLUGINMANAGER_H -#define GPGFRONTEND_PLUGINMANAGER_H +#ifndef GPGFRONTEND_MODULEMANAGER_H +#define GPGFRONTEND_MODULEMANAGER_H #include <memory> #include <string> -#include "GpgFrontendPluginSystemExport.h" +#include "GpgFrontendModuleSystemExport.h" #include "core/GpgFrontendCore.h" #include "core/thread/Task.h" @@ -40,46 +40,46 @@ namespace GpgFrontend::Thread { class TaskRunner; } -namespace GpgFrontend::Plugin { +namespace GpgFrontend::Module { using TaskRunnerPtr = std::shared_ptr<Thread::TaskRunner>; class Event; -class Plugin; -class GlobalPluginContext; -class PluginManager; +class Module; +class GlobalModuleContext; +class ModuleManager; using EventRefrernce = std::shared_ptr<Event>; -using PluginIdentifier = std::string; -using PluginPtr = std::shared_ptr<Plugin>; -using PluginMangerPtr = std::shared_ptr<PluginManager>; -using GlobalPluginContextPtr = std::shared_ptr<GlobalPluginContext>; +using ModuleIdentifier = std::string; +using ModulePtr = std::shared_ptr<Module>; +using ModuleMangerPtr = std::shared_ptr<ModuleManager>; +using GlobalModuleContextPtr = std::shared_ptr<GlobalModuleContext>; -class GPGFRONTEND_PLUGIN_SYSTEM_EXPORT PluginManager : public QObject { +class GPGFRONTEND_MODULE_SYSTEM_EXPORT ModuleManager : public QObject { Q_OBJECT public: - ~PluginManager(); + ~ModuleManager(); - static PluginMangerPtr GetInstance(); + static ModuleMangerPtr GetInstance(); - void RegisterPlugin(PluginPtr); + void RegisterPlugin(ModulePtr); void TriggerEvent(EventRefrernce); - void ActivePlugin(PluginIdentifier); + void ActivePlugin(ModuleIdentifier); - void DeactivePlugin(PluginIdentifier); + void DeactivePlugin(ModuleIdentifier); - std::optional<TaskRunnerPtr> GetTaskRunner(PluginIdentifier); + std::optional<TaskRunnerPtr> GetTaskRunner(ModuleIdentifier); private: class Impl; std::unique_ptr<Impl> p_; - static PluginMangerPtr g_; + static ModuleMangerPtr g_; - PluginManager(); + ModuleManager(); }; -} // namespace GpgFrontend::Plugin +} // namespace GpgFrontend::Module -#endif // GPGFRONTEND_PLUGINMANAGER_H
\ No newline at end of file +#endif // GPGFRONTEND_MODULEMANAGER_H
\ No newline at end of file |