]> git.stg.codes - stg.git/blobdiff - stglibs/srvconf.lib/parsers/server_info.cpp
Simplified parser interfaces.
[stg.git] / stglibs / srvconf.lib / parsers / server_info.cpp
index d4c610e0aea839f9311011cb2d02160aceff2cbf..da6b85e0c0521614c39836b80749523e7d6a9955 100644 (file)
  *    Author : Maxim Mamontov <faust@stargazer.dp.ua>
  */
 
-#include "parser_server_info.h"
+#include "server_info.h"
 
 #include "stg/common.h"
 
 #include <cstdio> // sprintf
-#include <cstddef>
 
 #include <strings.h>
 
@@ -39,9 +38,9 @@ const size_t DIRNAME_LEN  = 16;
 
 }
 
-SERVER_INFO::PARSER::PARSER()
-    : callback(NULL),
-      data(NULL),
+SERVER_INFO::PARSER::PARSER(CALLBACK f, void * d)
+    : callback(f),
+      data(d),
       depth(0),
       parsingAnswer(false)
 {
@@ -80,9 +79,3 @@ if (depth == 0 && parsingAnswer)
     parsingAnswer = false;
     }
 }
-//-----------------------------------------------------------------------------
-void SERVER_INFO::PARSER::SetCallback(CALLBACK f, void * d)
-{
-callback = f;
-data = d;
-}