summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Parser/PayloadParsers/MUCUserPayloadParser.h')
-rw-r--r--Swiften/Parser/PayloadParsers/MUCUserPayloadParser.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/Swiften/Parser/PayloadParsers/MUCUserPayloadParser.h b/Swiften/Parser/PayloadParsers/MUCUserPayloadParser.h
index 384f0cd..66e63a8 100644
--- a/Swiften/Parser/PayloadParsers/MUCUserPayloadParser.h
+++ b/Swiften/Parser/PayloadParsers/MUCUserPayloadParser.h
@@ -8,24 +8,17 @@
#include <boost/optional.hpp>
-#include "Swiften/Elements/MUCUserPayload.h"
-#include "Swiften/Parser/GenericPayloadParser.h"
+#include <Swiften/Elements/MUCUserPayload.h>
+#include <Swiften/Parser/GenericPayloadTreeParser.h>
+#include <Swiften/Parser/PayloadParsers/MUCItemParser.h>
namespace Swift {
- class MUCUserPayloadParser : public GenericPayloadParser<MUCUserPayload> {
+ class PayloadParserFactoryCollection;
+ 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;
+ MUCUserPayloadParser(PayloadParserFactoryCollection* collection) : factories(collection) {}
+ virtual void handleTree(ParserElement::ref root);
private:
- enum Level {
- TopLevel = 0,
- ItemLevel = 1
- };
- int level;
+ PayloadParserFactoryCollection* factories;
};
}