- std::list<std::string> * answerList;
-};
-//-----------------------------------------------------------------------------
-class PARSER_GET_ADMINS: public BASE_PARSER {
-public:
- int ParseStart(void *data, const char *el, const char **attr);
- int ParseEnd(void *data, const char *el);
- void CreateAnswer();
-};
-//-----------------------------------------------------------------------------
-class PARSER_ADD_ADMIN: public BASE_PARSER {
-public:
- PARSER_ADD_ADMIN() : BASE_PARSER(), adminToAdd() {}
- int ParseStart(void *data, const char *el, const char **attr);
- int ParseEnd(void *data, const char *el);
- void CreateAnswer();
-private:
- std::string adminToAdd;
-};
-//-----------------------------------------------------------------------------
-class PARSER_DEL_ADMIN: public BASE_PARSER {
-public:
- PARSER_DEL_ADMIN() : BASE_PARSER(), adminToDel() {}
- int ParseStart(void *data, const char *el, const char **attr);
- int ParseEnd(void *data, const char *el);
- void CreateAnswer();
-private:
- int CheckAttr(const char **attr);
- std::string adminToDel;
-};
-//-----------------------------------------------------------------------------
-class PARSER_CHG_ADMIN: public BASE_PARSER {
-public:
- PARSER_CHG_ADMIN() : BASE_PARSER(), login(), password(), privAsString() {}
- int ParseStart(void *data, const char *el, const char **attr);
- int ParseEnd(void *data, const char *el);
- void CreateAnswer();
-private:
- RESETABLE<std::string> login;
- RESETABLE<std::string> password;
- RESETABLE<std::string> privAsString;
-};
-//-----------------------------------------------------------------------------
-class PARSER_GET_SERVER_INFO: public BASE_PARSER {
-public:
- int ParseStart(void *data, const char *el, const char **attr);
- int ParseEnd(void *data, const char *el);
- void CreateAnswer();
-};
-//-----------------------------------------------------------------------------
-class PARSER_GET_USER: public BASE_PARSER {
-public:
- PARSER_GET_USER() : BASE_PARSER(), login() {}
- ~PARSER_GET_USER() {}
- int ParseStart(void *data, const char *el, const char **attr);
- int ParseEnd(void *data, const char *el);
- void CreateAnswer();
-private:
- std::string login;
-};
-//-----------------------------------------------------------------------------
-class PARSER_GET_USERS: public BASE_PARSER {
-public:
- PARSER_GET_USERS() : BASE_PARSER(), lastUserUpdateTime(0), lastUpdateFound(false) {}
- int ParseStart(void *data, const char *el, const char **attr);
- int ParseEnd(void *data, const char *el);
- void CreateAnswer();
-private:
- time_t lastUserUpdateTime;
- bool lastUpdateFound;
-};
-//-----------------------------------------------------------------------------
-class PARSER_GET_TARIFFS: public BASE_PARSER {
-public:
- int ParseStart(void *data, const char *el, const char **attr);
- int ParseEnd(void *data, const char *el);
- void CreateAnswer();
-};
-//-----------------------------------------------------------------------------
-class PARSER_ADD_TARIFF: public BASE_PARSER {
-public:
- PARSER_ADD_TARIFF() : BASE_PARSER(), tariffToAdd() {}
- int ParseStart(void *data, const char *el, const char **attr);
- int ParseEnd(void *data, const char *el);
- void CreateAnswer();
-private:
- std::string tariffToAdd;
-};
-//-----------------------------------------------------------------------------
-class PARSER_DEL_TARIFF: public BASE_PARSER {
-public:
- PARSER_DEL_TARIFF() : BASE_PARSER(), tariffToDel() {}
- int ParseStart(void *data, const char *el, const char **attr);
- int ParseEnd(void *data, const char *el);
- void CreateAnswer();
-private:
- std::string tariffToDel;
-};
-//-----------------------------------------------------------------------------
-class PARSER_CHG_TARIFF: public BASE_PARSER {
-public:
- PARSER_CHG_TARIFF() : BASE_PARSER(), td() {}
- int ParseStart(void *data, const char *el, const char **attr);
- int ParseEnd(void *data, const char *el);
- void CreateAnswer();
-private:
- int ParseSlashedIntParams(int paramsNum, const std::string & s, int * params);
- int ParseSlashedDoubleParams(int paramsNum, const std::string & s, double * params);
- int CheckTariffData();
- int AplayChanges();
-
- TARIFF_DATA_RES td;
-};
-//-----------------------------------------------------------------------------/
-class PARSER_ADD_USER: public BASE_PARSER {
-public:
- PARSER_ADD_USER() : BASE_PARSER(), login() {}
- ~PARSER_ADD_USER() {}
- int ParseStart(void *data, const char *el, const char **attr);
- int ParseEnd(void *data, const char *el);
- void CreateAnswer();
- void Reset();
-private:
- int CheckUserData();
- std::string login;
-};
-//-----------------------------------------------------------------------------
-class PARSER_CHG_USER: public BASE_PARSER {
-public:
- PARSER_CHG_USER();
- ~PARSER_CHG_USER();
- int ParseStart(void *data, const char *el, const char **attr);
- int ParseEnd(void *data, const char *el);
- void CreateAnswer();
- void Reset();
-private:
- PARSER_CHG_USER(const PARSER_CHG_USER & rvalue);
- PARSER_CHG_USER & operator=(const PARSER_CHG_USER & rvalue);
-
- std::string EncChar2String(const char *);
- int AplayChanges();
-
- USER_STAT_RES * usr;
- USER_CONF_RES * ucr;
- RESETABLE<uint64_t> * upr;
- RESETABLE<uint64_t> * downr;
- std::string cashMsg;
- std::string login;
- bool cashMustBeAdded;
- int res;
-};
-//-----------------------------------------------------------------------------
-class PARSER_DEL_USER: public BASE_PARSER {
-public:
- PARSER_DEL_USER() : BASE_PARSER(), res(0), u(NULL) {}
- int ParseStart(void *data, const char *el, const char **attr);
- int ParseEnd(void *data, const char *el);
- void CreateAnswer();