]> git.stg.codes - stg.git/blobdiff - stglibs/srvconf.lib/include/stg/parser_auth_by.h
Configuration library refactoring (AUTH_BY)
[stg.git] / stglibs / srvconf.lib / include / stg / parser_auth_by.h
diff --git a/stglibs/srvconf.lib/include/stg/parser_auth_by.h b/stglibs/srvconf.lib/include/stg/parser_auth_by.h
new file mode 100644 (file)
index 0000000..3ef1d00
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef __STG_STGLIBS_SRVCONF_PARSER_AUTH_BY_H__
+#define __STG_STGLIBS_SRVCONF_PARSER_AUTH_BY_H__
+
+#include "stg/parser.h"
+
+#include <vector>
+#include <string>
+
+class PARSER_AUTH_BY: public PARSER
+{
+public:
+    typedef std::vector<std::string> INFO;
+    typedef void (* CALLBACK)(const INFO & info, void * data);
+
+    PARSER_AUTH_BY();
+    int  ParseStart(const char *el, const char **attr);
+    void ParseEnd(const char *el);
+    void SetCallback(CALLBACK f, void * data);
+private:
+    CALLBACK callback;
+    void * data;
+    int depth;
+    INFO info;
+};
+
+#endif