diff --git a/include/Swiften/Parser/PayloadParsers/PrivilegeParser.h b/include/Swiften/Parser/PayloadParsers/PrivilegeParser.h new file mode 100644 index 0000000000000000000000000000000000000000..0bffe973328e74c288fb4ae55db7e942c8eae966 --- /dev/null +++ b/include/Swiften/Parser/PayloadParsers/PrivilegeParser.h @@ -0,0 +1,35 @@ +/* + * 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_; + }; +}