X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fhtml_parser.hpp;h=b06403d617ed81cdd0a8d26e31a7b366774ed16f;hb=586d78659d671683f33ec55f4a7d32b28e345ccd;hp=72ff60bde4c82e0658123985d5ba285033cbc824;hpb=f51a51c6c6e1f8c5de6e90f548df3d8dc12e00ac;p=metaproxy-moved-to-github.git diff --git a/src/html_parser.hpp b/src/html_parser.hpp index 72ff60b..b06403d 100644 --- a/src/html_parser.hpp +++ b/src/html_parser.hpp @@ -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 m_p; }; }