]> git.stg.codes - stg.git/blob - projects/stargazer/plugins/configuration/rpcconfig/tariffs_methods.h
Merge branch 'stg-2.409-radius'
[stg.git] / projects / stargazer / plugins / configuration / rpcconfig / tariffs_methods.h
1 #ifndef __TARIFFS_METHODS_H__
2 #define __TARIFFS_METHODS_H__
3
4 #include <xmlrpc-c/base.hpp>
5 #include <xmlrpc-c/registry.hpp>
6
7 class RPC_CONFIG;
8 class TARIFFS;
9 class USERS;
10 class ADMINS;
11
12 class METHOD_TARIFF_GET : public xmlrpc_c::method {
13 public:
14     METHOD_TARIFF_GET(RPC_CONFIG * c,
15                       TARIFFS * t)
16         : config(c),
17           tariffs(t)
18     {
19     }
20
21     void execute(xmlrpc_c::paramList const & paramList,
22                  xmlrpc_c::value *   const   retvalPtr);
23
24 private:
25     METHOD_TARIFF_GET(const METHOD_TARIFF_GET & rvalue);
26     METHOD_TARIFF_GET & operator=(const METHOD_TARIFF_GET & rvalue);
27
28     RPC_CONFIG * config;
29     TARIFFS * tariffs;
30 };
31
32 class METHOD_TARIFF_CHG : public xmlrpc_c::method {
33 public:
34     METHOD_TARIFF_CHG(RPC_CONFIG * c,
35                       ADMINS * a,
36                       TARIFFS * t)
37         : config(c),
38           admins(a),
39           tariffs(t)
40     {
41     }
42
43     void execute(xmlrpc_c::paramList const & paramList,
44                  xmlrpc_c::value *   const   retvalPtr);
45
46 private:
47     METHOD_TARIFF_CHG(const METHOD_TARIFF_CHG & rvalue);
48     METHOD_TARIFF_CHG & operator=(const METHOD_TARIFF_CHG & rvalue);
49
50     RPC_CONFIG * config;
51     ADMINS * admins;
52     TARIFFS * tariffs;
53 };
54
55 class METHOD_TARIFFS_GET : public xmlrpc_c::method {
56 public:
57     METHOD_TARIFFS_GET(RPC_CONFIG * c,
58                       TARIFFS * t)
59         : config(c),
60           tariffs(t)
61     {
62     }
63
64     void execute(xmlrpc_c::paramList const & paramList,
65                  xmlrpc_c::value *   const   retvalPtr);
66
67 private:
68     METHOD_TARIFFS_GET(const METHOD_TARIFFS_GET & rvalue);
69     METHOD_TARIFFS_GET & operator=(const METHOD_TARIFFS_GET & rvalue);
70
71     RPC_CONFIG * config;
72     TARIFFS * tariffs;
73 };
74
75 class METHOD_TARIFF_ADD : public xmlrpc_c::method {
76 public:
77     METHOD_TARIFF_ADD(RPC_CONFIG * c,
78                       ADMINS * a,
79                       TARIFFS * t)
80         : config(c),
81           admins(a),
82           tariffs(t)
83     {
84     }
85
86     void execute(xmlrpc_c::paramList const & paramList,
87                  xmlrpc_c::value *   const   retvalP);
88
89 private:
90     METHOD_TARIFF_ADD(const METHOD_TARIFF_ADD & rvalue);
91     METHOD_TARIFF_ADD & operator=(const METHOD_TARIFF_ADD & rvalue);
92
93     RPC_CONFIG * config;
94     ADMINS * admins;
95     TARIFFS * tariffs;
96 };
97
98 class METHOD_TARIFF_DEL : public xmlrpc_c::method {
99 public:
100     METHOD_TARIFF_DEL(RPC_CONFIG * c,
101                       ADMINS * a,
102                       TARIFFS * t,
103                       USERS * u)
104         : config(c),
105           admins(a),
106           tariffs(t),
107           users(u)
108     {
109     }
110
111     void execute(xmlrpc_c::paramList const & paramList,
112                  xmlrpc_c::value *   const   retvalP);
113
114 private:
115     METHOD_TARIFF_DEL(const METHOD_TARIFF_DEL & rvalue);
116     METHOD_TARIFF_DEL & operator=(const METHOD_TARIFF_DEL & rvalue);
117
118     RPC_CONFIG * config;
119     ADMINS * admins;
120     TARIFFS * tariffs;
121     USERS * users;
122 };
123
124 #endif