summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMateusz Piekos <mateuszpiekos@gmail.com>2012-06-01 17:13:40 (GMT)
committerMateusz Piekos <mateuszpiekos@gmail.com>2012-06-01 17:13:40 (GMT)
commite8ab1af885ff61715ab0350c3cb22ed6988a082a (patch)
treeabfd1f18bf6bda8865c1269c1ecb4a1b4ff802d0 /Swiften/Parser/PayloadParsers/WhiteboardParser.h
parent4f9ad66f222d4bf1cb740a9e1b4b4496cfbc0910 (diff)
downloadswift-contrib-e8ab1af885ff61715ab0350c3cb22ed6988a082a.zip
swift-contrib-e8ab1af885ff61715ab0350c3cb22ed6988a082a.tar.bz2
Added simple whiteboard payload and it's parser and serializer
Diffstat (limited to 'Swiften/Parser/PayloadParsers/WhiteboardParser.h')
-rw-r--r--Swiften/Parser/PayloadParsers/WhiteboardParser.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/Swiften/Parser/PayloadParsers/WhiteboardParser.h b/Swiften/Parser/PayloadParsers/WhiteboardParser.h
new file mode 100644
index 0000000..265e12d
--- /dev/null
+++ b/Swiften/Parser/PayloadParsers/WhiteboardParser.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2012 Mateusz Piękos
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#pragma once
+
+#include <Swiften/Elements/WhiteboardPayload.h>
+#include <Swiften/Parser/GenericPayloadParser.h>
+
+namespace Swift {
+ class WhiteboardParser : public Swift::GenericPayloadParser<WhiteboardPayload> {
+ public:
+ WhiteboardParser();
+
+ 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);
+ private:
+ int level_;
+ std::string data_;
+ };
+}