X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/55a204e46261850f1a26ebafc45fb3ba6f0604c6..862223ebc00e6153adb8f02f9c3b117547d16314:/projects/stargazer/plugin_runner.h?ds=sidebyside diff --git a/projects/stargazer/plugin_runner.h b/projects/stargazer/plugin_runner.h index 1402d2ef..a30b6940 100644 --- a/projects/stargazer/plugin_runner.h +++ b/projects/stargazer/plugin_runner.h @@ -42,10 +42,11 @@ class STORE; class PLUGIN_RUNNER { public: struct Error : public std::runtime_error { - Error(const std::string & msg) : runtime_error(msg) {} + explicit Error(const std::string & msg) : runtime_error(msg) {} }; PLUGIN_RUNNER(const std::string & pluginFileName, + const std::string & pluginName, const MODULE_SETTINGS & ms, ADMINS & admins, TARIFFS & tariffs, @@ -59,13 +60,14 @@ public: int Start(); int Stop(); - int Reload(); + int Reload(const MODULE_SETTINGS & ms); int Restart(); bool IsRunning() { return m_plugin.IsRunning(); } const std::string & GetStrError() const { return errorStr; } PLUGIN & GetPlugin() { return m_plugin; } const std::string & GetFileName() const { return pluginFileName; } + const std::string & GetName() const { return pluginName; } uint16_t GetStartPosition() const { return m_plugin.GetStartPosition(); } uint16_t GetStopPosition() const { return m_plugin.GetStopPosition(); } @@ -85,6 +87,7 @@ private: const SETTINGS & settings); std::string pluginFileName; + std::string pluginName; void * libHandle; PLUGIN & m_plugin;