X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/26d5d878270d01123669ba6a38c306c398ed7b8d..c3b507d1eb8a82f9eda3a5e7f7b2dd2f2e9bb4c0:/stglibs/srvconf.lib/include/stg/parser_get_users.h?ds=sidebyside diff --git a/stglibs/srvconf.lib/include/stg/parser_get_users.h b/stglibs/srvconf.lib/include/stg/parser_get_users.h index 07d76cc5..35fcd126 100644 --- a/stglibs/srvconf.lib/include/stg/parser_get_users.h +++ b/stglibs/srvconf.lib/include/stg/parser_get_users.h @@ -23,7 +23,9 @@ #ifndef __STG_STGLIBS_SRVCONF_PARSER_GET_USERS_H__ #define __STG_STGLIBS_SRVCONF_PARSER_GET_USERS_H__ -#include "stg/parser.h" +#include "parser.h" + +#include "parser_get_user.h" #include @@ -31,7 +33,7 @@ class PARSER_GET_USERS: public PARSER { public: typedef std::vector INFO; - typedef void (* CALLBACK)(const INFO & info, void * data); + typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO & info, void * data); PARSER_GET_USERS(); int ParseStart(const char * el, const char ** attr); @@ -43,11 +45,13 @@ private: PARSER_GET_USER userParser; INFO info; int depth; + bool parsingAnswer; + std::string error; void AddUser(const PARSER_GET_USER::INFO & userInfo); - void ParseUsers(const char * el, const char ** attr); + void SetError(const std::string & e) { error = e; } - static void UserCallback(const PARSER_GET_USER::INFO & info, void * data); + static void UserCallback(bool result, const std::string& reason, const PARSER_GET_USER::INFO & info, void * data); }; #endif