Fix Metaproxy stops logging after check config failed MP-590
[metaproxy-moved-to-github.git] / src / html_parser.hpp
index 72ff60b..b06403d 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Metaproxy.
-   Copyright (C) 2005-2013 Index Data
+   Copyright (C) Index Data
 
 Metaproxy is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
@@ -24,19 +24,26 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 namespace metaproxy_1 {
         class HTMLParserEvent {
         public:
-            virtual void openTagStart(const char *name) = 0;
-            virtual void anyTagEnd(const char *name, int close_it) = 0;
-            virtual void attribute(const char *tagName, const char *name,
-                                   const char *value,
-                                   int val_len) = 0;
-            virtual void closeTag(const char *name) = 0;
+            virtual void openTagStart(const char *tag, int tag_len) = 0;
+            virtual void anyTagEnd(const char *tag, int tag_len,
+                                   int close_it) = 0;
+            virtual void attribute(const char *tag, int tag_len,
+                                   const char *attr, int attr_len,
+                                   const char *value, int val_len,
+                                   const char *sep) = 0;
+            virtual void closeTag(const char *tag, int tag_len) = 0;
             virtual void text(const char *value, int len) = 0;
+            virtual ~ HTMLParserEvent();
         };
         class HTMLParser {
+            class Rep;
         public:
             HTMLParser();
             ~HTMLParser();
             void parse(HTMLParserEvent &event, const char *str) const;
+            void set_verbose(int v);
+        private:
+            boost::scoped_ptr<Rep> m_p;
         };
 }