summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordknn <yoann.blein@free.fr>2012-07-07 10:08:42 (GMT)
committerdknn <yoann.blein@free.fr>2012-09-22 08:55:56 (GMT)
commit62f54e12354e208c8931e069fce235c4ca14d205 (patch)
tree87e4c16fd4362b0edf2ab3345c64fe28454e8776 /Swiften/Parser/PayloadParsers/JingleRawUDPTransportPayloadParser.h
parent96d693d51973bd5b2ed47755c8726dc2076f6c53 (diff)
downloadswift-contrib-62f54e12354e208c8931e069fce235c4ca14d205.zip
swift-contrib-62f54e12354e208c8931e069fce235c4ca14d205.tar.bz2
Add raw UDP transport payload: element, serializer, parser and tests
Diffstat (limited to 'Swiften/Parser/PayloadParsers/JingleRawUDPTransportPayloadParser.h')
-rw-r--r--Swiften/Parser/PayloadParsers/JingleRawUDPTransportPayloadParser.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/Swiften/Parser/PayloadParsers/JingleRawUDPTransportPayloadParser.h b/Swiften/Parser/PayloadParsers/JingleRawUDPTransportPayloadParser.h
new file mode 100644
index 0000000..859fe88
--- /dev/null
+++ b/Swiften/Parser/PayloadParsers/JingleRawUDPTransportPayloadParser.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2011 Yoann Blein
+ * Licensed under the simplified BSD license.
+ * See Documentation/Licenses/BSD-simplified.txt for more information.
+ */
+
+#pragma once
+
+#include <Swiften/Elements/JingleRawUDPTransportPayload.h>
+#include <Swiften/Parser/GenericPayloadParser.h>
+
+namespace Swift {
+
+class JingleRawUDPTransportPayloadParser : public GenericPayloadParser<JingleRawUDPTransportPayload> {
+ public:
+ JingleRawUDPTransportPayloadParser();
+
+ 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:
+ JingleRawUDPTransportPayload::Candidate::Type stringToType(const std::string &str) const;
+
+ private:
+ int level;
+};
+
+}