X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/abe068d00ecc304c855886f5e511b563b352dd0a..7ccca7457b662dc61214893626f236483926ae18:/stglibs/srvconf.lib/parsers/server_info.h diff --git a/stglibs/srvconf.lib/parsers/server_info.h b/stglibs/srvconf.lib/parsers/server_info.h index 7bcbbba4..03906389 100644 --- a/stglibs/srvconf.lib/parsers/server_info.h +++ b/stglibs/srvconf.lib/parsers/server_info.h @@ -37,15 +37,16 @@ namespace SERVER_INFO class PARSER: public STG::PARSER { public: - PARSER(); + PARSER(CALLBACK f, void * data, const std::string & encoding); int ParseStart(const char * el, const char ** attr); void ParseEnd(const char * el); - void SetCallback(CALLBACK f, void * data); + void Failure(const std::string & reason) { callback(false, reason, info, data); } private: PROPERTY_PARSERS propertyParsers; CALLBACK callback; void * data; + std::string encoding; int depth; bool parsingAnswer; INFO info;