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/array.h"
25 #include "stg/const.h" // DIR_NUM
26 #include "stg/os_int.h" // uint32_t, etc...
32 #define STG_HEADER "SG04"
33 #define OK_HEADER "OKHD"
34 #define ERR_HEADER "ERHD"
35 #define OK_LOGIN "OKLG"
36 #define ERR_LOGIN "ERLG"
37 #define OK_LOGINS "OKLS"
38 #define ERR_LOGINS "ERLS"
40 #define ENC_MSG_LEN (8)
77 typedef void (* CALLBACK)(bool result, const std::string & reason, void * data);
81 namespace GET_CONTAINER
84 template <typename INFO>
87 typedef void (* TYPE)(bool result, const std::string & reason, const std::vector<INFO> & info, void * data);
95 typedef std::vector<std::string> INFO;
96 typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO & info, void * data);
98 } // namespace AUTH_BY
100 namespace SERVER_INFO
111 ARRAY<std::string, DIR_NUM> dirName;
113 typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO & info, void * data);
115 } // namespace SERVER_INFO
120 typedef void (* CALLBACK)(bool result, const std::string & reason, const std::string & response, void * data);
129 ARRAY<long long, DIR_NUM> su;
130 ARRAY<long long, DIR_NUM> sd;
131 ARRAY<long long, DIR_NUM> mu;
132 ARRAY<long long, DIR_NUM> md;
139 std::string password;
144 double lastCashAddTime;
149 int disableDetailStat;
163 time_t lastActivityTime;
164 ARRAY<std::string, USERDATA_NUM> userData;
167 typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO & info, void * data);
169 } // namespace GET_USER
174 typedef ADMIN_CONF INFO;
175 typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO & info, void * data);
182 typedef TARIFF_DATA INFO;
183 typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO & info, void * data);
187 namespace GET_SERVICE
190 typedef SERVICE_CONF INFO;
191 typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO & info, void * data);
198 typedef CORP_CONF INFO;
199 typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO & info, void * data);