X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/641204dfbdb9fc870cdd2e7f9e3169a44693e7bf..2cb51233d326dc99fa8aefafa72c1ecefb605d02:/projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp diff --git a/projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp b/projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp index c059ba61..7d764a7d 100644 --- a/projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp +++ b/projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp @@ -1,15 +1,19 @@ -#include "rpcconfig.h" - #include #include + +#include "rpcconfig.h" + +#include "admin.h" +#include "module_settings.h" +#include "common.h" + #include "info_methods.h" #include "users_methods.h" #include "tariffs_methods.h" #include "admins_methods.h" #include "messages_methods.h" -class RPC_CONFIG_CREATOR -{ +class RPC_CONFIG_CREATOR { private: RPC_CONFIG * rpcconfig; @@ -17,16 +21,16 @@ public: RPC_CONFIG_CREATOR() : rpcconfig(new RPC_CONFIG()) { - }; + } ~RPC_CONFIG_CREATOR() { delete rpcconfig; - }; + } RPC_CONFIG * GetPlugin() { return rpcconfig; - }; + } }; RPC_CONFIG_CREATOR rpcc; @@ -38,7 +42,7 @@ RPC_CONFIG_SETTINGS::RPC_CONFIG_SETTINGS() { } -int RPC_CONFIG_SETTINGS::ParseIntInRange(const string & str, +int RPC_CONFIG_SETTINGS::ParseIntInRange(const std::string & str, int min, int max, int * val) @@ -103,9 +107,15 @@ return rpcc.GetPlugin(); } RPC_CONFIG::RPC_CONFIG() - : rpcServer(NULL) + : users(NULL), + admins(NULL), + tariffs(NULL), + store(NULL), + stgSettings(NULL), + rpcServer(NULL), + running(false), + stopped(true) { - } RPC_CONFIG::~RPC_CONFIG() @@ -311,6 +321,7 @@ rpcRegistry.addMethod("stargazer.get_users", methodGetUsersPtr); xmlrpc_c::methodPtr const methodChgUserPtr(new METHOD_USER_CHG( this, admins, + tariffs, store, users ));