]> git.stg.codes - stg.git/blob - projects/stargazer/plugins/configuration/rpcconfig/tariffs_methods.h
Уменьшена зависимостть между заголовочными файлами путем использования
[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 private:
24     RPC_CONFIG * config;
25     TARIFFS * tariffs;
26 };
27
28 class METHOD_TARIFF_CHG : public xmlrpc_c::method {
29 public:
30     METHOD_TARIFF_CHG(RPC_CONFIG * c,
31                       ADMINS * a,
32                       TARIFFS * t)
33         : config(c),
34           admins(a),
35           tariffs(t)
36     {
37     }
38
39     void execute(xmlrpc_c::paramList const & paramList,
40                  xmlrpc_c::value *   const   retvalPtr);
41 private:
42     RPC_CONFIG * config;
43     ADMINS * admins;
44     TARIFFS * tariffs;
45 };
46
47 class METHOD_TARIFFS_GET : public xmlrpc_c::method {
48 public:
49     METHOD_TARIFFS_GET(RPC_CONFIG * c,
50                       TARIFFS * t)
51         : config(c),
52           tariffs(t)
53     {
54     }
55
56     void execute(xmlrpc_c::paramList const & paramList,
57                  xmlrpc_c::value *   const   retvalPtr);
58 private:
59     RPC_CONFIG * config;
60     TARIFFS * tariffs;
61 };
62
63 class METHOD_TARIFF_ADD : public xmlrpc_c::method {
64 public:
65     METHOD_TARIFF_ADD(RPC_CONFIG * c,
66                       ADMINS * a,
67                       TARIFFS * t)
68         : config(c),
69           admins(a),
70           tariffs(t)
71     {
72     }
73
74     void execute(xmlrpc_c::paramList const & paramList,
75                  xmlrpc_c::value *   const   retvalP);
76 private:
77     RPC_CONFIG * config;
78     ADMINS * admins;
79     TARIFFS * tariffs;
80 };
81
82 class METHOD_TARIFF_DEL : public xmlrpc_c::method {
83 public:
84     METHOD_TARIFF_DEL(RPC_CONFIG * c,
85                       ADMINS * a,
86                       TARIFFS * t,
87                       USERS * u)
88         : config(c),
89           admins(a),
90           tariffs(t),
91           users(u)
92     {
93     }
94
95     void execute(xmlrpc_c::paramList const & paramList,
96                  xmlrpc_c::value *   const   retvalP);
97 private:
98     RPC_CONFIG * config;
99     ADMINS * admins;
100     TARIFFS * tariffs;
101     USERS * users;
102 };
103
104 #endif