aboutsummaryrefslogtreecommitdiffstats
path: root/src/module/system/GlobalModuleContext.h
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2023-10-17 14:57:03 +0000
committersaturneric <[email protected]>2023-10-17 14:57:03 +0000
commite5694e9f6d2a84954eaf508557caa795f5282b07 (patch)
tree40dd946005f7d5b7cdab7db608367add5bbdb38b /src/module/system/GlobalModuleContext.h
parentrefactor: flatpak yml file can not host here (diff)
downloadGpgFrontend-e5694e9f6d2a84954eaf508557caa795f5282b07.tar.gz
GpgFrontend-e5694e9f6d2a84954eaf508557caa795f5282b07.zip
refactor: change plugin system to module system
Diffstat (limited to '')
-rw-r--r--src/module/system/GlobalModuleContext.h (renamed from src/plugin/system/GlobalPluginContext.h)43
1 files changed, 21 insertions, 22 deletions
diff --git a/src/plugin/system/GlobalPluginContext.h b/src/module/system/GlobalModuleContext.h
index e9c218b0..810961ea 100644
--- a/src/plugin/system/GlobalPluginContext.h
+++ b/src/module/system/GlobalModuleContext.h
@@ -29,49 +29,48 @@
#ifndef GPGFRONTEND_GLOBALPLUGINCONTEXT_H
#define GPGFRONTEND_GLOBALPLUGINCONTEXT_H
-#include "GpgFrontendPluginSystemExport.h"
+#include "GpgFrontendModuleSystemExport.h"
#include "core/GpgFrontendCore.h"
#include "core/thread/TaskRunner.h"
-#include "plugin/system/Event.h"
+#include "module/system/Event.h"
-namespace GpgFrontend::Plugin {
+namespace GpgFrontend::Module {
-class GlobalPluginContext;
+class GlobalModuleContext;
-class Plugin;
-class PluginManager;
-using PluginIdentifier = std::string;
-using PluginPtr = std::shared_ptr<Plugin>;
-using PluginList = std::list<std::string>;
+class Module;
+class ModuleManager;
+using ModuleIdentifier = std::string;
+using ModulePtr = std::shared_ptr<Module>;
-using GlobalPluginContextPtr = std::shared_ptr<GlobalPluginContext>;
+using GlobalModuleContextPtr = std::shared_ptr<GlobalModuleContext>;
using TaskRunnerPtr = std::shared_ptr<Thread::TaskRunner>;
-class GPGFRONTEND_PLUGIN_SYSTEM_EXPORT GlobalPluginContext : public QObject {
+class GPGFRONTEND_MODULE_SYSTEM_EXPORT GlobalModuleContext : public QObject {
Q_OBJECT
public:
- GlobalPluginContext(TaskRunnerPtr);
+ GlobalModuleContext(TaskRunnerPtr);
- ~GlobalPluginContext();
+ ~GlobalModuleContext();
- int GetChannel(PluginPtr);
+ int GetChannel(ModulePtr);
- int GetDefaultChannel(PluginPtr);
+ int GetDefaultChannel(ModulePtr);
- std::optional<TaskRunnerPtr> GetTaskRunner(PluginPtr);
+ std::optional<TaskRunnerPtr> GetTaskRunner(ModulePtr);
- std::optional<TaskRunnerPtr> GetTaskRunner(PluginIdentifier plugin);
+ std::optional<TaskRunnerPtr> GetTaskRunner(ModuleIdentifier plugin);
std::optional<TaskRunnerPtr> GetGlobalTaskRunner();
- bool RegisterPlugin(PluginPtr);
+ bool RegisterPlugin(ModulePtr);
- bool ActivePlugin(PluginIdentifier);
+ bool ActivePlugin(ModuleIdentifier);
- bool DeactivatePlugin(PluginIdentifier);
+ bool DeactivatePlugin(ModuleIdentifier);
- bool ListenEvent(PluginIdentifier, EventIdentifier);
+ bool ListenEvent(ModuleIdentifier, EventIdentifier);
bool TriggerEvent(EventRefrernce);
@@ -80,6 +79,6 @@ class GPGFRONTEND_PLUGIN_SYSTEM_EXPORT GlobalPluginContext : public QObject {
std::unique_ptr<Impl> p_;
};
-} // namespace GpgFrontend::Plugin
+} // namespace GpgFrontend::Module
#endif // GPGFRONTEND_GLOBALPLUGINCONTEXT_H \ No newline at end of file