summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Parser/PayloadParsers/JingleRTPDescriptionParser.h')
-rw-r--r--Swiften/Parser/PayloadParsers/JingleRTPDescriptionParser.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/Swiften/Parser/PayloadParsers/JingleRTPDescriptionParser.h b/Swiften/Parser/PayloadParsers/JingleRTPDescriptionParser.h
new file mode 100644
index 0000000..d250754
--- /dev/null
+++ b/Swiften/Parser/PayloadParsers/JingleRTPDescriptionParser.h
@@ -0,0 +1,38 @@
+/*
+ * 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/JingleRTPDescription.h>
+#include <Swiften/Parser/GenericPayloadParser.h>
+#include <Swiften/Parser/PayloadParser.h>
+
+namespace Swift {
+
+class PayloadParserFactoryCollection;
+
+class JingleRTPDescriptionParser : public GenericPayloadParser<JingleRTPDescription> {
+ public:
+ JingleRTPDescriptionParser(PayloadParserFactoryCollection* factories);
+
+ virtual void handleStartElement(const std::string& element, const std::string&, const AttributeMap& attributes);
+ virtual void handleEndElement(const std::string& element, const std::string& ns);
+ virtual void handleCharacterData(const std::string& data);
+
+ private:
+ JingleRTPDescription::MediaType mediaTypeFromString(const std::string& media) const;
+
+ private:
+ PayloadParserFactoryCollection* factories;
+ int level;
+ //CurrentParseElement currentElement;
+ boost::shared_ptr<PayloadParser> currentPayloadParser;
+ bool parsingBandwidth;
+ std::string bandwidthType;
+ std::string bandwidthValue;
+};
+
+}