aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/module/ModuleManager.h
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-04-21 19:49:04 +0000
committersaturneric <[email protected]>2024-04-21 19:49:04 +0000
commit571a2906063739067e40a02aadd8c265082359de (patch)
tree5ac57f777ec38f6a5f328da4e3df6ad6cc010aff /src/core/module/ModuleManager.h
parentfix: could not determine the path to the executable based on the desktop file (diff)
parentfeat: adapt linux appimage of modules loading (diff)
downloadGpgFrontend-571a2906063739067e40a02aadd8c265082359de.tar.gz
GpgFrontend-571a2906063739067e40a02aadd8c265082359de.zip
Merge branch 'dev/2.1.2/module' into develop
Diffstat (limited to 'src/core/module/ModuleManager.h')
-rw-r--r--src/core/module/ModuleManager.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/core/module/ModuleManager.h b/src/core/module/ModuleManager.h
index 93b89e95..fa8d2264 100644
--- a/src/core/module/ModuleManager.h
+++ b/src/core/module/ModuleManager.h
@@ -48,6 +48,7 @@ class Event;
class Module;
class GlobalModuleContext;
class ModuleManager;
+class GlobalRegisterTable;
using EventRefrernce = std::shared_ptr<Event>;
using ModuleIdentifier = QString;
@@ -65,12 +66,24 @@ class GPGFRONTEND_CORE_EXPORT ModuleManager
virtual ~ModuleManager() override;
+ auto LoadModule(QString) -> void;
+
+ auto SearchModule(ModuleIdentifier) -> ModulePtr;
+
+ auto ListAllRegisteredModuleID() -> QList<ModuleIdentifier>;
+
void RegisterModule(ModulePtr);
auto IsModuleActivated(ModuleIdentifier) -> bool;
+ void ListenEvent(ModuleIdentifier, EventIdentifier);
+
void TriggerEvent(EventRefrernce);
+ auto SearchEvent(EventTriggerIdentifier) -> std::optional<EventRefrernce>;
+
+ auto GetModuleListening(ModuleIdentifier) -> QList<EventIdentifier>;
+
void ActiveModule(ModuleIdentifier);
void DeactiveModule(ModuleIdentifier);
@@ -85,6 +98,8 @@ class GPGFRONTEND_CORE_EXPORT ModuleManager
auto ListRTChildKeys(const QString&, const QString&) -> std::vector<Key>;
+ auto GRT() -> GlobalRegisterTable*;
+
private:
class Impl;
SecureUniquePtr<Impl> p_;
@@ -118,7 +133,7 @@ void TriggerEvent(const EventIdentifier& event_id, Args&&... args,
* @return true
* @return false
*/
-auto GPGFRONTEND_CORE_EXPORT IsModuleAcivate(ModuleIdentifier) -> bool;
+auto GPGFRONTEND_CORE_EXPORT IsModuleActivate(ModuleIdentifier) -> bool;
/**
* @brief