mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 13:05:53 +08:00
Feat: Simple module system
This commit is contained in:
1 parent
e7ce54188b
commit
6858a35754
4 files changed
+82
No files matched your search
@@ -0,0 +1,30 @@
|
||||
#include <modules/Modules.hpp>
|
||||
#include <JuiceAgent/Logger.hpp>
|
||||
|
||||
namespace JuiceAgent::Core::Modules {
|
||||
|
||||
bool JarLoaderModule::init() {
|
||||
if (_initialized) return true;
|
||||
|
||||
PLOGI << "JarLoader init";
|
||||
_initialized = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool JarLoaderModule::start() {
|
||||
if (!_initialized) return false;
|
||||
if (_running) return true;
|
||||
|
||||
PLOGI << "JarLoader start";
|
||||
_running = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
void JarLoaderModule::stop() {
|
||||
if (!_running) return;
|
||||
|
||||
PLOGI << "JarLoader stop";
|
||||
_running = false;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user