diff options
author | saturneric <[email protected]> | 2023-10-25 14:28:25 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-10-25 14:28:25 +0000 |
commit | b7ceed0b87752077fe19fefe9b0df8ec27ce0531 (patch) | |
tree | 51cb5f2a9210dabaa585b65d085f336cc5f0f844 /src/core/module/ModuleManager.h | |
parent | fix: solve some code tidy issues (diff) | |
download | GpgFrontend-b7ceed0b87752077fe19fefe9b0df8ec27ce0531.tar.gz GpgFrontend-b7ceed0b87752077fe19fefe9b0df8ec27ce0531.zip |
feat: moving gnupg info gathering logic to a new module
Diffstat (limited to 'src/core/module/ModuleManager.h')
-rw-r--r-- | src/core/module/ModuleManager.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/module/ModuleManager.h b/src/core/module/ModuleManager.h index 865f196b..1ce2d8b5 100644 --- a/src/core/module/ModuleManager.h +++ b/src/core/module/ModuleManager.h @@ -50,7 +50,7 @@ using ModuleMangerPtr = std::shared_ptr<ModuleManager>; using GMCPtr = std::shared_ptr<GlobalModuleContext>; using Namespace = std::string; using Key = std::string; -using LPCallback = std::function<void(Namespace, Key, int)>; +using LPCallback = std::function<void(Namespace, Key, int, std::any)>; ModuleIdentifier GPGFRONTEND_CORE_EXPORT GetRealModuleIdentifier(const ModuleIdentifier& id); @@ -76,7 +76,7 @@ class GPGFRONTEND_CORE_EXPORT ModuleManager : public QObject { std::optional<std::any> RetrieveRTValue(Namespace, Key); - bool ListenRTPublish(QObject*, Namespace, Key, LPCallback); + bool ListenRTPublish(QObject*, Namespace, Key, LPCallback, bool); private: class Impl; @@ -111,7 +111,8 @@ bool GPGFRONTEND_CORE_EXPORT UpsertRTValue(const std::string& namespace_, const std::any& value); bool GPGFRONTEND_CORE_EXPORT ListenRTPublishEvent(QObject*, Namespace, Key, - LPCallback); + LPCallback, + bool callback_once = true); template <typename T> std::optional<T> RetrieveRTValueTyped(const std::string& namespace_, |