2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 * Author : Maxim Mamontov <faust@stargazer.dp.ua>
21 #ifndef __STG_STGLIBS_SRVCONF_TYPES_H__
22 #define __STG_STGLIBS_SRVCONF_TYPES_H__
24 #include "stg/const.h" // DIR_NUM
59 typedef void (* CALLBACK)(bool result, const std::string & reason, void * data);
63 namespace GET_CONTAINER
66 template <typename INFO>
69 typedef void (* TYPE)(bool result, const std::string & reason, const std::vector<INFO> & info, void * data);
72 } // namespace GET_CONTAINER
77 typedef std::vector<std::string> INFO;
78 typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO & info, void * data);
80 } // namespace AUTH_BY
93 std::array<std::string, DIR_NUM> dirName;
95 typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO & info, void * data);
97 } // namespace SERVER_INFO
102 typedef void (* CALLBACK)(bool result, const std::string & reason, const std::string & response, void * data);
104 } // namespace RAW_XML
111 std::array<long long, DIR_NUM> su;
112 std::array<long long, DIR_NUM> sd;
113 std::array<long long, DIR_NUM> mu;
114 std::array<long long, DIR_NUM> md;
120 std::string password;
125 double lastCashAddTime;
130 int disableDetailStat;
145 time_t lastActivityTime;
146 std::array<std::string, USERDATA_NUM> userData;
147 std::vector<std::string> services;
148 std::vector<std::string> authBy;
151 typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO & info, void * data);
153 } // namespace GET_USER
158 typedef ADMIN_CONF INFO;
159 typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO & info, void * data);
161 } // namespace GET_ADMIN
166 typedef TARIFF_DATA INFO;
167 typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO & info, void * data);
169 } // namespace GET_TARIFF
171 namespace GET_SERVICE
174 typedef SERVICE_CONF INFO;
175 typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO & info, void * data);
177 } // namespace GET_SERVICE
182 typedef CORP_CONF INFO;
183 typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO & info, void * data);
185 } // namespace GET_CORP