diff options
author | dknn <yoann.blein@free.fr> | 2012-08-10 18:04:56 (GMT) |
---|---|---|
committer | dknn <yoann.blein@free.fr> | 2012-09-22 09:32:38 (GMT) |
commit | 955c4589ca254814ae7ec6ed911e0a62febc5da1 (patch) | |
tree | 1d3ba8ecc732f8239462f7428e758224f3d38b94 /Swiften/Parser/PayloadParsers/InputEventParser.h | |
parent | 577fffec4a1da6909740a392cf76617bdcbe5570 (diff) | |
download | swift-contrib-955c4589ca254814ae7ec6ed911e0a62febc5da1.zip swift-contrib-955c4589ca254814ae7ec6ed911e0a62febc5da1.tar.bz2 |
Capture and send user UI events
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; + }; +} |