X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/85f8f0b545228f3cffec62d8e2251e756a2fac15..97f1f905311bcb76c3b500e3e49c1b9f49dff491:/stglibs/srvconf.lib/parser_send_message.cpp diff --git a/stglibs/srvconf.lib/parser_send_message.cpp b/stglibs/srvconf.lib/parser_send_message.cpp index c1955fce..318cc8eb 100644 --- a/stglibs/srvconf.lib/parser_send_message.cpp +++ b/stglibs/srvconf.lib/parser_send_message.cpp @@ -19,20 +19,22 @@ * Author : Maxim Mamontov */ -#include "stg/parser_send_message.h" +#include "parser_send_message.h" #include #include -PARSER_SEND_MESSAGE::PARSER_SEND_MESSAGE() +using namespace STG; + +SEND_MESSAGE::PARSER::PARSER() : callback(NULL), data(NULL), depth(0) { } //----------------------------------------------------------------------------- -int PARSER_SEND_MESSAGE::ParseStart(const char * el, const char ** attr) +int SEND_MESSAGE::PARSER::ParseStart(const char * el, const char ** attr) { depth++; if (depth == 1) @@ -41,12 +43,12 @@ if (depth == 1) return 0; } //----------------------------------------------------------------------------- -void PARSER_SEND_MESSAGE::ParseEnd(const char * /*el*/) +void SEND_MESSAGE::PARSER::ParseEnd(const char * /*el*/) { depth--; } //----------------------------------------------------------------------------- -void PARSER_SEND_MESSAGE::ParseAnswer(const char * /*el*/, const char **attr) +void SEND_MESSAGE::PARSER::ParseAnswer(const char * /*el*/, const char **attr) { if (!callback) return; @@ -56,7 +58,7 @@ else callback(false, "Invalid response.", data); } //----------------------------------------------------------------------------- -void PARSER_SEND_MESSAGE::SetCallback(CALLBACK f, void * d) +void SEND_MESSAGE::PARSER::SetCallback(CALLBACK f, void * d) { callback = f; data = d;