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/Module.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/Module.h (renamed from src/plugin/system/Plugin.h) | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/src/plugin/system/Plugin.h b/src/module/system/Module.h index 7995d8dc..f8cfd230 100644 --- a/src/plugin/system/Plugin.h +++ b/src/module/system/Module.h @@ -26,36 +26,36 @@ * */ -#ifndef GPGFRONTEND_PLUGIN_H -#define GPGFRONTEND_PLUGIN_H +#ifndef GPGFRONTEND_MODULE_H +#define GPGFRONTEND_MODULE_H #include <memory> -#include "GpgFrontendPluginSystemExport.h" +#include "GpgFrontendModuleSystemExport.h" #include "core/thread/Task.h" #include "core/thread/TaskRunner.h" -#include "plugin/system/Event.h" +#include "module/system/Event.h" -namespace GpgFrontend::Plugin { +namespace GpgFrontend::Module { -class Plugin; -class GlobalPluginContext; -class PluginManager; +class Module; +class GlobalModuleContext; +class ModuleManager; -using PluginIdentifier = std::string; -using PluginVersion = std::string; -using PluginMetaData = std::map<std::string, std::string>; -using PluginPtr = std::shared_ptr<Plugin>; -using GlobalPluginContextPtr = std::shared_ptr<GlobalPluginContext>; +using ModuleIdentifier = std::string; +using ModuleVersion = std::string; +using ModuleMetaData = std::map<std::string, std::string>; +using ModulePtr = std::shared_ptr<Module>; +using GlobalModuleContextPtr = std::shared_ptr<GlobalModuleContext>; using TaskRunnerPtr = std::shared_ptr<Thread::TaskRunner>; -class GPGFRONTEND_PLUGIN_SYSTEM_EXPORT Plugin : public QObject { +class GPGFRONTEND_MODULE_SYSTEM_EXPORT Module : public QObject { Q_OBJECT public: - Plugin(PluginIdentifier, PluginVersion, PluginMetaData); + Module(ModuleIdentifier, ModuleVersion, ModuleMetaData); - ~Plugin(); + ~Module(); virtual bool Register() = 0; @@ -65,9 +65,9 @@ class GPGFRONTEND_PLUGIN_SYSTEM_EXPORT Plugin : public QObject { virtual bool Deactive() = 0; - PluginIdentifier GetPluginIdentifier() const; + ModuleIdentifier GetPluginIdentifier() const; - void SetGPC(GlobalPluginContextPtr); + void SetGPC(GlobalModuleContextPtr); protected: int getChannel(); @@ -81,9 +81,8 @@ class GPGFRONTEND_PLUGIN_SYSTEM_EXPORT Plugin : public QObject { private: class Impl; std::unique_ptr<Impl> p_; - const std::shared_ptr<Plugin> s_; }; -} // namespace GpgFrontend::Plugin +} // namespace GpgFrontend::Module -#endif // GPGFRONTEND_PLUGIN_H
\ No newline at end of file +#endif // GPGFRONTEND_MODULE_H
\ No newline at end of file |