]> git.stg.codes - stg.git/blobdiff - stglibs/srvconf.lib/parsers/auth_by.h
Always think about \0 and block boundry during encryption.
[stg.git] / stglibs / srvconf.lib / parsers / auth_by.h
index a4bab9dd508999ba369689d8df9675fb8dcf965e..5b2dfe52fb6cbf9b3ef1f32c93da99902cf71f11 100644 (file)
@@ -35,14 +35,15 @@ namespace AUTH_BY
 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:
     CALLBACK callback;
     void * data;
+    std::string encoding;
     int depth;
     bool parsingAnswer;
     INFO info;