diff options
author | saturneric <[email protected]> | 2024-02-29 10:15:57 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-02-29 10:15:57 +0000 |
commit | c1f5b3336836e15d193582e9b8f3e044f7d8bc1b (patch) | |
tree | 35e9edb2e8f0c80dbafb76cc05ad6fe92c2c11d0 /src/core/module/ModuleManager.cpp | |
parent | feat: upgrade module system (diff) | |
download | GpgFrontend-c1f5b3336836e15d193582e9b8f3e044f7d8bc1b.tar.gz GpgFrontend-c1f5b3336836e15d193582e9b8f3e044f7d8bc1b.zip |
feat: add module controller and continue to work on module system
1. speed up building by reducing build info sheader including
2. add module controller
3. continue to work on module system
Diffstat (limited to 'src/core/module/ModuleManager.cpp')
-rw-r--r-- | src/core/module/ModuleManager.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/module/ModuleManager.cpp b/src/core/module/ModuleManager.cpp index 17191af2..f49a0b1e 100644 --- a/src/core/module/ModuleManager.cpp +++ b/src/core/module/ModuleManager.cpp @@ -84,6 +84,10 @@ class ModuleManager::Impl { return gmc_->SearchModule(std::move(module_id)); } + auto ListAllRegisteredModuleID() -> QList<ModuleIdentifier> { + return gmc_->ListAllRegisteredModuleID(); + } + void RegisterModule(const ModulePtr& module) { Thread::TaskRunnerGetter::GetInstance() .GetTaskRunner(Thread::TaskRunnerGetter::kTaskRunnerType_Default) @@ -123,6 +127,11 @@ class ModuleManager::Impl { return gmc_->SearchEvent(std::move(trigger_id)); } + auto GetModuleListening(ModuleIdentifier module_id) + -> QList<EventIdentifier> { + return gmc_->GetModuleListening(std::move(module_id)); + } + void ActiveModule(const ModuleIdentifier& identifier) { Thread::TaskRunnerGetter::GetInstance() .GetTaskRunner(Thread::TaskRunnerGetter::kTaskRunnerType_Default) @@ -209,6 +218,11 @@ void ModuleManager::ListenEvent(ModuleIdentifier module, return p_->ListenEvent(module, event); } +auto ModuleManager::GetModuleListening(ModuleIdentifier module_id) + -> QList<EventIdentifier> { + return p_->GetModuleListening(module_id); +} + void ModuleManager::TriggerEvent(EventRefrernce event) { return p_->TriggerEvent(event); } @@ -250,4 +264,7 @@ auto ModuleManager::IsModuleActivated(ModuleIdentifier id) -> bool { return p_->IsModuleActivated(id); } +auto ModuleManager::ListAllRegisteredModuleID() -> QList<ModuleIdentifier> { + return p_->ListAllRegisteredModuleID(); +}; } // namespace GpgFrontend::Module
\ No newline at end of file |