- struct USERDATA * next;
-};
-//-----------------------------------------------------------------------------
-typedef void(*RecvUserDataCb_t)(USERDATA * ud, void * data);
-typedef void(*RecvServerInfoDataCb_t)(SERVERINFO * si, void * data);
-typedef int(*RecvChgUserCb_t)(const char * asnwer, void * data);
-typedef int(*RecvCheckUserCb_t)(const char * answer, void * data);
-typedef int(*RecvSendMessageCb_t)(const char * answer, void * data);
-typedef void(*RecvAuthByDataCb_t)(const std::vector<std::string> & list, void * data);
-//-----------------------------------------------------------------------------
-struct ADMINDATA
-{
- char login[ADM_LOGIN_LEN];
-};
-//-----------------------------------------------------------------------------
-class PARSER
-{
-public:
- PARSER() {}
- virtual ~PARSER() {}
- virtual int ParseStart(const char *el, const char **attr) = 0;
- virtual void ParseEnd(const char *el) = 0;
-};
-//-----------------------------------------------------------------------------
-class PARSER_CHG_USER: public PARSER
-{
-public:
- PARSER_CHG_USER();
- int ParseStart(const char *el, const char **attr);
- void ParseEnd(const char *el);
- void ParseAnswer(const char *el, const char **attr);
- void SetChgUserRecvCb(RecvChgUserCb_t, void * data);
-private:
- RecvChgUserCb_t RecvChgUserCb;
- void * chgUserCbData;
- int depth;
- bool error;
-};
-//-----------------------------------------------------------------------------
-class PARSER_CHECK_USER: public PARSER
-{
-public:
- PARSER_CHECK_USER();
- int ParseStart(const char *el, const char **attr);
- void ParseEnd(const char *el);
- void ParseAnswer(const char *el, const char **attr);
- void SetCheckUserRecvCb(RecvCheckUserCb_t, void * data);
-private:
- RecvCheckUserCb_t RecvCheckUserCb;
- void * checkUserCbData;
- int depth;
- bool error;
-};
-//-----------------------------------------------------------------------------
-class PARSER_GET_USERS: public PARSER
-{
-public:
- PARSER_GET_USERS();
- int ParseStart(const char *el, const char **attr);
- void ParseEnd(const char *el);
- void ParseUsers(const char *el, const char **attr);
- void ParseUser(const char *el, const char **attr);
- void ParseUserParams(const char *el, const char **attr);
- void ParseUserLoadStat(const char * el, const char ** attr);
- void SetUserDataRecvCb(RecvUserDataCb_t, void * data);
-private:
- RecvUserDataCb_t RecvUserDataCb;
- void * userDataCb;
- USERDATA user;
- int depth;
- bool error;
-};
-//-----------------------------------------------------------------------------
-class PARSER_GET_USER: public PARSER