diff options
Diffstat (limited to 'Swiften/Parser/PayloadParsers/InputEventParser.h')
-rw-r--r-- | Swiften/Parser/PayloadParsers/InputEventParser.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Swiften/Parser/PayloadParsers/InputEventParser.h b/Swiften/Parser/PayloadParsers/InputEventParser.h new file mode 100644 index 0000000..a131254 --- /dev/null +++ b/Swiften/Parser/PayloadParsers/InputEventParser.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2012 Yoann Blein + * Licensed under the simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. + */ + +#pragma once + +#include <Swiften/Elements/InputEventPayload.h> +#include <Swiften/Parser/GenericPayloadParser.h> + +namespace Swift { + class InputEventParser : public GenericPayloadParser<InputEventPayload> { + public: + virtual void handleStartElement(const std::string& element, const std::string&, const AttributeMap& attributes); + virtual void handleEndElement(const std::string&, const std::string&); + virtual void handleCharacterData(const std::string&); + + private: + static InputEventPayload::Action actionFromString(const std::string& action); + static InputEventPayload::Event::EventType eventTypeFromString(const std::string& eventType); + + private: + int level; + }; +} |