diff options
Diffstat (limited to 'Swiften/Parser/XMPPParser.h')
-rw-r--r-- | Swiften/Parser/XMPPParser.h | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/Swiften/Parser/XMPPParser.h b/Swiften/Parser/XMPPParser.h index dcc98ca..52b2921 100644 --- a/Swiften/Parser/XMPPParser.h +++ b/Swiften/Parser/XMPPParser.h @@ -14,43 +14,43 @@ #include <Swiften/Parser/XMLParserClient.h> namespace Swift { - class XMLParser; - class XMPPParserClient; - class XMLParserFactory; - class ElementParser; - class PayloadParserFactoryCollection; - - class SWIFTEN_API XMPPParser : public XMLParserClient, boost::noncopyable { - public: - XMPPParser( - XMPPParserClient* parserClient, - PayloadParserFactoryCollection* payloadParserFactories, - XMLParserFactory* xmlParserFactory); - virtual ~XMPPParser(); - - bool parse(const std::string&); - - private: - virtual void handleStartElement( - const std::string& element, - const std::string& ns, - const AttributeMap& attributes); - virtual void handleEndElement(const std::string& element, const std::string& ns); - virtual void handleCharacterData(const std::string& data); - - ElementParser* createElementParser(const std::string& element, const std::string& xmlns); - - private: - XMLParser* xmlParser_; - XMPPParserClient* client_; - PayloadParserFactoryCollection* payloadParserFactories_; - enum Level { - TopLevel = 0, - StreamLevel = 1, - ElementLevel = 2 - }; - int level_; - ElementParser* currentElementParser_; - bool parseErrorOccurred_; - }; + class XMLParser; + class XMPPParserClient; + class XMLParserFactory; + class ElementParser; + class PayloadParserFactoryCollection; + + class SWIFTEN_API XMPPParser : public XMLParserClient, boost::noncopyable { + public: + XMPPParser( + XMPPParserClient* parserClient, + PayloadParserFactoryCollection* payloadParserFactories, + XMLParserFactory* xmlParserFactory); + virtual ~XMPPParser(); + + bool parse(const std::string&); + + private: + virtual void handleStartElement( + const std::string& element, + const std::string& ns, + const AttributeMap& attributes); + virtual void handleEndElement(const std::string& element, const std::string& ns); + virtual void handleCharacterData(const std::string& data); + + ElementParser* createElementParser(const std::string& element, const std::string& xmlns); + + private: + XMLParser* xmlParser_; + XMPPParserClient* client_; + PayloadParserFactoryCollection* payloadParserFactories_; + enum Level { + TopLevel = 0, + StreamLevel = 1, + ElementLevel = 2 + }; + int level_; + ElementParser* currentElementParser_; + bool parseErrorOccurred_; + }; } |