31 #include "core/module/Event.h"
32 #include "core/thread/TaskRunner.h"
37 class GlobalModuleContext;
40 using ModuleIdentifier = QString;
41 using ModuleVersion = QString;
42 using ModuleMetaData = std::map<QString, QString>;
43 using ModulePtr = std::shared_ptr<Module>;
45 using TaskRunnerPtr = std::shared_ptr<Thread::TaskRunner>;
47 class GPGFRONTEND_CORE_EXPORT
Module :
public QObject {
50 Module(ModuleIdentifier, ModuleVersion,
const ModuleMetaData&);
54 virtual auto Register() ->
bool = 0;
56 virtual auto Active() ->
bool = 0;
58 virtual auto Exec(EventRefrernce) ->
int = 0;
60 virtual auto Deactive() ->
bool = 0;
62 [[nodiscard]]
auto GetModuleIdentifier()
const -> ModuleIdentifier;
67 auto getChannel() -> int;
69 auto getDefaultChannel() -> int;
71 auto getTaskRunner() -> TaskRunnerPtr;
73 auto listenEvent(EventIdentifier) -> bool;
77 SecureUniquePtr<Impl> p_;
Definition: GlobalModuleContext.h:54
Definition: Module.cpp:35