]> git.stg.codes - stg.git/blobdiff - libs/srvconf/parsers/auth_by.h
Public interfaces: part 1
[stg.git] / libs / srvconf / parsers / auth_by.h
index 5b2dfe52fb6cbf9b3ef1f32c93da99902cf71f11..f485fdde204eb3226a2d5307081461176000bf39 100644 (file)
@@ -18,8 +18,7 @@
  *    Author : Maxim Mamontov <faust@stargazer.dp.ua>
  */
 
-#ifndef __STG_STGLIBS_SRVCONF_PARSER_AUTH_BY_H__
-#define __STG_STGLIBS_SRVCONF_PARSER_AUTH_BY_H__
+#pragma once
 
 #include "base.h"
 
 
 namespace STG
 {
-namespace AUTH_BY
+namespace AuthBy
 {
 
-class PARSER: public STG::PARSER
+class Parser: public STG::Parser
 {
-public:
-    PARSER(CALLBACK f, void * data, const std::string & encoding);
-    int  ParseStart(const char * el, const char ** attr);
-    void ParseEnd(const char * el);
-    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;
-    std::string error;
+    public:
+        Parser(Callback f, void* data, const std::string& encoding);
+
+        int  ParseStart(const char* el, const char** attr) override;
+        void ParseEnd(const char* el) override;
+        void Failure(const std::string& reason) override { callback(false, reason, info, data); }
+
+    private:
+        Callback callback;
+        void* data;
+        std::string encoding;
+        int depth;
+        bool parsingAnswer;
+        Info info;
+        std::string error;
 };
 
-} // namespace AUTH_BY
+} // namespace AuthBy
 } // namespace STG
-
-#endif