X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/ae21e8d6ad32d0bf3517127aef5cd8129b7507aa..225c7fb0b6ac5ef234d16231eb134dc91b78d889:/stglibs/srvconf.lib/parsers/get_container.h

diff --git a/stglibs/srvconf.lib/parsers/get_container.h b/stglibs/srvconf.lib/parsers/get_container.h
index 31bb4250..cbfd1ead 100644
--- a/stglibs/srvconf.lib/parsers/get_container.h
+++ b/stglibs/srvconf.lib/parsers/get_container.h
@@ -25,6 +25,8 @@
 
 #include <string>
 
+#include <strings.h>
+
 namespace STG
 {
 namespace GET_CONTAINER
@@ -36,9 +38,9 @@ class PARSER: public STG::PARSER
 public:
     typedef std::vector<typename ELEMENT_PARSER::INFO> INFO;
     typedef void (* CALLBACK)(bool result, const std::string & reason, const INFO & info, void * data);
-    PARSER(const std::string & t, CALLBACK f, void * d)
-        : tag(t), callback(f), data(d),
-          elementParser(&PARSER<ELEMENT_PARSER>::ElementCallback, this),
+    PARSER(const std::string & t, CALLBACK f, void * d, const std::string & e)
+        : tag(t), callback(f), data(d), encoding(e),
+          elementParser(&PARSER<ELEMENT_PARSER>::ElementCallback, this, e),
           depth(0), parsingAnswer(false)
     {}
     int  ParseStart(const char * el, const char ** attr)
@@ -67,11 +69,13 @@ public:
         parsingAnswer = false;
         }
     }
+    void Failure(const std::string & reason) { callback(false, reason, info, data); }
 
 private:
     std::string tag;
     CALLBACK callback;
     void * data;
+    std::string encoding;
     ELEMENT_PARSER elementParser;
     INFO info;
     int depth;