diff options
Diffstat (limited to 'Swiften/Parser/PayloadParsers/MUCUserPayloadParser.h')
-rw-r--r-- | Swiften/Parser/PayloadParsers/MUCUserPayloadParser.h | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/Swiften/Parser/PayloadParsers/MUCUserPayloadParser.h b/Swiften/Parser/PayloadParsers/MUCUserPayloadParser.h index b819905..e020127 100644 --- a/Swiften/Parser/PayloadParsers/MUCUserPayloadParser.h +++ b/Swiften/Parser/PayloadParsers/MUCUserPayloadParser.h @@ -9,23 +9,12 @@ #include <boost/optional.hpp> #include <Swiften/Elements/MUCUserPayload.h> -#include <Swiften/Parser/GenericPayloadParser.h> +#include <Swiften/Parser/GenericPayloadTreeParser.h> +#include <Swiften/Parser/PayloadParsers/MUCItemParser.h> namespace Swift { - class MUCUserPayloadParser : public GenericPayloadParser<MUCUserPayload> { + class MUCUserPayloadParser : public GenericPayloadTreeParser<MUCUserPayload> { public: - MUCUserPayloadParser(); - - 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); - MUCOccupant::Role parseRole(const std::string& itemString) const; - MUCOccupant::Affiliation parseAffiliation(const std::string& statusString) const; - private: - enum Level { - TopLevel = 0, - ItemLevel = 1 - }; - int level; + virtual void handleTree(ParserElement::ref root); }; } |