]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp
Rename BASE_AUTH and BASE_STORE to AUTH and STORE
[stg.git] / projects / stargazer / plugins / configuration / rpcconfig / rpcconfig.cpp
index c059ba6142f70b3cbee587c9366dae269a252197..7304f280f9a48bf47a859a004dcff3445c7afc96 100644 (file)
@@ -1,15 +1,18 @@
-#include "rpcconfig.h"
-
 #include <cstdlib>
 #include <csignal>
 #include <cstdlib>
 #include <csignal>
+
+#include "rpcconfig.h"
+
+#include "admin.h"
+#include "module_settings.h"
+
 #include "info_methods.h"
 #include "users_methods.h"
 #include "tariffs_methods.h"
 #include "admins_methods.h"
 #include "messages_methods.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;
 
 private:
     RPC_CONFIG * rpcconfig;
 
@@ -17,16 +20,16 @@ public:
     RPC_CONFIG_CREATOR()
         : rpcconfig(new RPC_CONFIG())
         {
     RPC_CONFIG_CREATOR()
         : rpcconfig(new RPC_CONFIG())
         {
-        };
+        }
     ~RPC_CONFIG_CREATOR()
         {
         delete rpcconfig;
     ~RPC_CONFIG_CREATOR()
         {
         delete rpcconfig;
-        };
+        }
 
     RPC_CONFIG * GetPlugin()
         {
         return rpcconfig;
 
     RPC_CONFIG * GetPlugin()
         {
         return rpcconfig;
-        };
+        }
 };
 
 RPC_CONFIG_CREATOR rpcc;
 };
 
 RPC_CONFIG_CREATOR rpcc;
@@ -103,9 +106,15 @@ return rpcc.GetPlugin();
 }
 
 RPC_CONFIG::RPC_CONFIG()
 }
 
 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()
 }
 
 RPC_CONFIG::~RPC_CONFIG()
@@ -311,6 +320,7 @@ rpcRegistry.addMethod("stargazer.get_users", methodGetUsersPtr);
 xmlrpc_c::methodPtr const methodChgUserPtr(new METHOD_USER_CHG(
             this,
             admins,
 xmlrpc_c::methodPtr const methodChgUserPtr(new METHOD_USER_CHG(
             this,
             admins,
+            tariffs,
             store,
             users
             ));
             store,
             users
             ));