aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/module/Module.h
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2024-05-11 17:18:36 +0000
committerGitHub <[email protected]>2024-05-11 17:18:36 +0000
commitf909f2c4c35b187eb165ec5545e35d54c6d92bf3 (patch)
tree428fe9e63ecae6bb93be6f20cd2b1ee9b29ffd8d /src/core/module/Module.h
parentMerge pull request #145 from jermanuts/jermanuts-wizard-links-update (diff)
parentfix: remove qt5compat and redirect dll output path of modules (diff)
downloadGpgFrontend-f909f2c4c35b187eb165ec5545e35d54c6d92bf3.tar.gz
GpgFrontend-f909f2c4c35b187eb165ec5545e35d54c6d92bf3.zip
Merge pull request #148 from saturneric/develop
Develop 2.1.3.1
Diffstat (limited to 'src/core/module/Module.h')
-rw-r--r--src/core/module/Module.h32
1 files changed, 25 insertions, 7 deletions
diff --git a/src/core/module/Module.h b/src/core/module/Module.h
index 2a5b54e7..c332d455 100644
--- a/src/core/module/Module.h
+++ b/src/core/module/Module.h
@@ -39,7 +39,7 @@ class ModuleManager;
using ModuleIdentifier = QString;
using ModuleVersion = QString;
-using ModuleMetaData = std::map<QString, QString>;
+using ModuleMetaData = QMap<QString, QString>;
using ModulePtr = std::shared_ptr<Module>;
using TaskRunnerPtr = std::shared_ptr<Thread::TaskRunner>;
@@ -47,21 +47,39 @@ using TaskRunnerPtr = std::shared_ptr<Thread::TaskRunner>;
class GPGFRONTEND_CORE_EXPORT Module : public QObject {
Q_OBJECT
public:
- Module(ModuleIdentifier, ModuleVersion, const ModuleMetaData&);
+ Module(ModuleIdentifier, ModuleVersion, const ModuleMetaData &);
+
+ explicit Module(QLibrary &module_library);
~Module();
- virtual auto Register() -> bool = 0;
+ auto IsGood() -> bool;
+
+ virtual auto Register() -> int;
+
+ virtual auto Active() -> int;
- virtual auto Active() -> bool = 0;
+ virtual auto Exec(EventReference) -> int;
- virtual auto Exec(EventRefrernce) -> int = 0;
+ virtual auto Deactive() -> int;
- virtual auto Deactive() -> bool = 0;
+ virtual auto UnRegister() -> int;
[[nodiscard]] auto GetModuleIdentifier() const -> ModuleIdentifier;
- void SetGPC(GlobalModuleContext*);
+ [[nodiscard]] auto GetModuleVersion() const -> ModuleVersion;
+
+ [[nodiscard]] auto GetModuleMetaData() const -> ModuleMetaData;
+
+ [[nodiscard]] auto GetModulePath() const -> QString;
+
+ [[nodiscard]] auto GetModuleHash() const -> QString;
+
+ [[nodiscard]] auto GetModuleSDKVersion() const -> QString;
+
+ [[nodiscard]] auto GetModuleQtEnvVersion() const -> QString;
+
+ void SetGPC(GlobalModuleContext *);
protected:
auto getChannel() -> int;