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