/* * Implements Privilege tag for XEP-0356: Privileged Entity * Licensed under the Simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ #pragma once #include #include #include namespace Swift { class PayloadParserFactoryCollection; class PayloadParser; class PrivilegeParser : public GenericPayloadParser { public: PrivilegeParser(PayloadParserFactoryCollection* factories); virtual void handleStartElement(const std::string& element, const std::string&, const AttributeMap& attributes); virtual void handleEndElement(const std::string& element, const std::string&); virtual void handleCharacterData(const std::string& data); enum Level { TopLevel = 0, PayloadLevel = 1 }; private: PayloadParserFactoryCollection* factories_; SWIFTEN_SHRPTR_NAMESPACE::shared_ptr childParser_; int level_; }; }