X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/23d052c42f43430e4ff776a80b9643dbc7d1289d..01ee16d4dc8527fce90f353b60d3df9c313f54ce:/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 b35aa48c..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,7 @@ #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" @@ -33,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); @@ -45,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