X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fhtml_parser.hpp;h=bba263ccba27a8782ae2afa9540d2f78afee3941;hb=b893b551f97213efbf6e84732c26a2ddb89bcb9b;hp=ad46061ff54a435c3681e8761172680f202d6f29;hpb=0ce322844494022dc85a9c776d9ff041aad17520;p=metaproxy-moved-to-github.git diff --git a/src/html_parser.hpp b/src/html_parser.hpp index ad46061..bba263c 100644 --- a/src/html_parser.hpp +++ b/src/html_parser.hpp @@ -24,20 +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) = 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 parse(HTMLParserEvent &event, const char *str) const; + void set_verbose(int v); + private: + boost::scoped_ptr m_p; }; }