]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/rpcconfig/user_helper.h
Use std::lock_guard instead of STG_LOCKER.
[stg.git] / projects / stargazer / plugins / configuration / rpcconfig / user_helper.h
index ab5fd32f089857f47a4168ff2bcf58e44209878b..fc1417b4d3e70d553240ed112b3e861ddb6cde1a 100644 (file)
@@ -1,33 +1,38 @@
-#ifndef __USER_HELPER_H__
-#define __USER_HELPER_H__
+#pragma once
 
 #include <string>
 
 #include <xmlrpc-c/base.hpp>
 
-#include "../../../users.h"
+namespace STG
+{
+
+class Admin;
+struct Store;
+class Tariffs;
+class User;
+class Users;
 
-class ADMIN;
-class BASE_STORE;
-class TARIFFS;
+}
 
 class USER_HELPER
 {
 public:
-    USER_HELPER(user_iter & it)
-        : iter(it)
+    using UserPtr = STG::User*;
+    USER_HELPER(UserPtr & p, STG::Users & us)
+        : ptr(p),
+          users(us)
     {
     }
 
     void GetUserInfo(xmlrpc_c::value * info,
                      bool hidePassword = false);
     bool SetUserInfo(const xmlrpc_c::value & info,
-                     const ADMIN & admin,
+                     const STG::Admin& admin,
                      const std::string & login,
-                     const BASE_STORE & store,
-                     TARIFFS * tariffs);
+                     const STG::Store & store,
+                     STG::Tariffs * tariffs);
 private:
-    user_iter & iter;
+    UserPtr & ptr;
+    STG::Users & users;
 };
-
-#endif