]> git.stg.codes - stg.git/blobdiff - projects/sgconf/request.h
Add ability to get of value of parameter 'tariff' with name 'tariffName'
[stg.git] / projects / sgconf / request.h
index 2f2408caaea5925ce7dfeff9abe19ede09e5f0aa..bca3c148e1892f1e0306c2683a3aec8cbb6b81e7 100644 (file)
 #define request_h
 
 #include <string>
 #define request_h
 
 #include <string>
-#include "resetable.h"
-#include "stg_const.h"
-#include "os_int.h"
+
+#include "stg/resetable.h"
+#include "stg/const.h"
+#include "stg/os_int.h"
 
 #define TARIFF_NOW  (0)
 #define TARIFF_DEL  (1)
 
 #define TARIFF_NOW  (0)
 #define TARIFF_DEL  (1)
@@ -48,16 +49,19 @@ struct REQUEST
 REQUEST()
     : chgTariff(false),
       createUser(false),
 REQUEST()
     : chgTariff(false),
       createUser(false),
-      deleteUser(false)
+      deleteUser(false),
+      authBy(false)
 {
     for (int i = 0; i < DIR_NUM; i++)
         {
 {
     for (int i = 0; i < DIR_NUM; i++)
         {
-        u[i].reset();
-        d[i].reset();
+        sessionUpload[i].reset();
+        sessionDownload[i].reset();
+        monthUpload[i].reset();
+        monthDownload[i].reset();
         }
 
     for (int i = 0; i < USERDATA_NUM; i++)
         }
 
     for (int i = 0; i < USERDATA_NUM; i++)
-        ud[i].reset();
+        userData[i].reset();
 }
 
 RESETABLE<string>   server;
 }
 
 RESETABLE<string>   server;
@@ -74,9 +78,11 @@ RESETABLE<double>   setCash;
 string              message;
 bool                createUser;
 bool                deleteUser;
 string              message;
 bool                createUser;
 bool                deleteUser;
+bool                authBy;
 
 RESETABLE<string>   usrMsg;
 RESETABLE<double>   credit;
 
 RESETABLE<string>   usrMsg;
 RESETABLE<double>   credit;
+RESETABLE<time_t>   creditExpire;
 RESETABLE<string>   usrPasswd;
 RESETABLE<bool>     down;
 RESETABLE<bool>     passive;
 RESETABLE<string>   usrPasswd;
 RESETABLE<bool>     down;
 RESETABLE<bool>     passive;
@@ -84,10 +90,13 @@ RESETABLE<bool>     disableDetailStat;
 RESETABLE<bool>     alwaysOnline;
 RESETABLE<double>   prepaidTraff;
 
 RESETABLE<bool>     alwaysOnline;
 RESETABLE<double>   prepaidTraff;
 
-RESETABLE<int64_t>  u[DIR_NUM];
-RESETABLE<int64_t>  d[DIR_NUM];
+RESETABLE<int64_t>  sessionUpload[DIR_NUM];
+RESETABLE<int64_t>  sessionDownload[DIR_NUM];
+
+RESETABLE<int64_t>  monthUpload[DIR_NUM];
+RESETABLE<int64_t>  monthDownload[DIR_NUM];
 
 
-RESETABLE<string>   ud[USERDATA_NUM];
+RESETABLE<string>   userData[USERDATA_NUM];
 
 RESETABLE<string>   note;
 RESETABLE<string>   name;
 
 RESETABLE<string>   note;
 RESETABLE<string>   name;