]> 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 #include "../../../tariffs.h"
8
9 class RPC_CONFIG;
10
11 class METHOD_TARIFF_GET : public xmlrpc_c::method {
12 public:
13     METHOD_TARIFF_GET(RPC_CONFIG * c,
14                       TARIFFS * t)
15         : config(c),
16           tariffs(t)
17     {
18     }
19
20     void execute(xmlrpc_c::paramList const & paramList,
21                  xmlrpc_c::value *   const   retvalPtr);
22 private:
23     RPC_CONFIG * config;
24     TARIFFS * tariffs;
25 };
26
27 class METHOD_TARIFF_CHG : public xmlrpc_c::method {
28 public:
29     METHOD_TARIFF_CHG(RPC_CONFIG * c,
30                       ADMINS * a,
31                       TARIFFS * t)
32         : config(c),
33           admins(a),
34           tariffs(t)
35     {
36     }
37
38     void execute(xmlrpc_c::paramList const & paramList,
39                  xmlrpc_c::value *   const   retvalPtr);
40 private:
41     RPC_CONFIG * config;
42     ADMINS * admins;
43     TARIFFS * tariffs;
44 };
45
46 class METHOD_TARIFFS_GET : public xmlrpc_c::method {
47 public:
48     METHOD_TARIFFS_GET(RPC_CONFIG * c,
49                       TARIFFS * t)
50         : config(c),
51           tariffs(t)
52     {
53     }
54
55     void execute(xmlrpc_c::paramList const & paramList,
56                  xmlrpc_c::value *   const   retvalPtr);
57 private:
58     RPC_CONFIG * config;
59     TARIFFS * tariffs;
60 };
61
62 class METHOD_TARIFF_ADD : public xmlrpc_c::method {
63 public:
64     METHOD_TARIFF_ADD(RPC_CONFIG * c,
65                       ADMINS * a,
66                       TARIFFS * t)
67         : config(c),
68           admins(a),
69           tariffs(t)
70     {
71     }
72
73     void execute(xmlrpc_c::paramList const & paramList,
74                  xmlrpc_c::value *   const   retvalP);
75 private:
76     RPC_CONFIG * config;
77     ADMINS * admins;
78     TARIFFS * tariffs;
79 };
80
81 class METHOD_TARIFF_DEL : public xmlrpc_c::method {
82 public:
83     METHOD_TARIFF_DEL(RPC_CONFIG * c,
84                       ADMINS * a,
85                       TARIFFS * t,
86                       USERS * u)
87         : config(c),
88           admins(a),
89           tariffs(t),
90           users(u)
91     {
92     }
93
94     void execute(xmlrpc_c::paramList const & paramList,
95                  xmlrpc_c::value *   const   retvalP);
96 private:
97     RPC_CONFIG * config;
98     ADMINS * admins;
99     TARIFFS * tariffs;
100     USERS * users;
101 };
102
103 #endif