]> git.stg.codes - stg.git/blobdiff - stglibs/srvconf.lib/parser_send_message.cpp
Moved CHG_USER and SEND_MESSAGE parsers from global scope.
[stg.git] / stglibs / srvconf.lib / parser_send_message.cpp
index c1955fce9f5301ee863215e399dd1c66e664866b..318cc8ebb5e48cdf4cb0bb4796604e2cca0f2683 100644 (file)
  *    Author : Maxim Mamontov <faust@stargazer.dp.ua>
  */
 
-#include "stg/parser_send_message.h"
+#include "parser_send_message.h"
 
 #include <cstddef>
 
 #include <strings.h>
 
-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;