#ifndef SERVCONF_H
#define SERVCONF_H
-#include "os_int.h"
-
#include <expat.h>
+
#include <list>
#include <string>
+
+#include "os_int.h"
#include "netunit.h"
#include "stg_const.h"
class PARSER
{
public:
- PARSER();
- virtual ~PARSER(){};
+ PARSER() {}
+ virtual ~PARSER() {}
virtual int ParseStart(const char *el, const char **attr) = 0;
virtual void ParseEnd(const char *el) = 0;
- void Reset();
- //virtual bool GetError() = 0;
- //virtual void SetUserDataRecvCb(RecvUserDataCb_t) = 0;
-protected:
- //RecvUserDataCb_t RecvUserDataCb;
-private:
};
//-----------------------------------------------------------------------------
class PARSER_CHG_USER: public PARSER
PARSER_CHG_USER();
int ParseStart(const char *el, const char **attr);
void ParseEnd(const char *el);
- void Reset();
void ParseAnswer(const char *el, const char **attr);
void SetChgUserRecvCb(RecvChgUserCb_t, void * data);
private:
PARSER_CHECK_USER();
int ParseStart(const char *el, const char **attr);
void ParseEnd(const char *el);
- void Reset();
void ParseAnswer(const char *el, const char **attr);
void SetCheckUserRecvCb(RecvCheckUserCb_t, void * data);
private:
PARSER_GET_USERS();
int ParseStart(const char *el, const char **attr);
void ParseEnd(const char *el);
- void Reset();
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);
- //bool GetError();
void SetUserDataRecvCb(RecvUserDataCb_t, void * data);
private:
RecvUserDataCb_t RecvUserDataCb;
PARSER_GET_USER();
int ParseStart(const char *el, const char **attr);
void ParseEnd(const char *el);
- void Reset();
void ParseUsers(const char *el, const char **attr);
void ParseUser(const char *el, const char **attr);
void ParseUserParams(const char *el, const char **attr);
PARSER_GET_SERVER_INFO();
int ParseStart(const char *el, const char **attr);
void ParseEnd(const char *el);
- void Reset();
void ParseServerInfo(const char *el, const char **attr);
bool GetError();
void SetServerInfoRecvCb(RecvServerInfoDataCb_t, void * data);
PARSER_SEND_MESSAGE();
int ParseStart(const char *el, const char **attr);
void ParseEnd(const char *el);
- void Reset();
void ParseAnswer(const char *el, const char **attr);
void SetSendMessageRecvCb(RecvSendMessageCb_t, void * data);
private:
//-----------------------------------------------------------------------------
#endif /* _SERVCONF_H_ */
-
-/* EOF */
-