summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordknn <yoann.blein@free.fr>2012-07-07 10:54:37 (GMT)
committerdknn <yoann.blein@free.fr>2012-09-22 08:55:56 (GMT)
commitdfebe4b6b999845c0ff6c15073f0ae0d0e5b4183 (patch)
tree5f586f38ed96caf5dc96cf09a36af4e26ac072f1
parent62f54e12354e208c8931e069fce235c4ca14d205 (diff)
downloadswift-contrib-dfebe4b6b999845c0ff6c15073f0ae0d0e5b4183.zip
swift-contrib-dfebe4b6b999845c0ff6c15073f0ae0d0e5b4183.tar.bz2
Add missing file
-rw-r--r--Swiften/Elements/JingleRawUDPTransportPayload.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/Swiften/Elements/JingleRawUDPTransportPayload.h b/Swiften/Elements/JingleRawUDPTransportPayload.h
new file mode 100644
index 0000000..ecd6539
--- /dev/null
+++ b/Swiften/Elements/JingleRawUDPTransportPayload.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2012 Yoann Blein
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include <vector>
+
+#include <boost/shared_ptr.hpp>
+
+#include <Swiften/Elements/JingleTransportPayload.h>
+#include <Swiften/Network/HostAddressPort.h>
+
+
+namespace Swift {
+ class JingleRawUDPTransportPayload : public JingleTransportPayload {
+ public:
+ struct Candidate {
+ enum Type {
+ Unknown, // default case
+ Host,
+ PeerReflected,
+ Relayed,
+ ServerReflected,
+ };
+
+ Candidate() : component(0), generation(0), type(Unknown) {}
+
+ boost::uint8_t component;
+ boost::uint8_t generation;
+ std::string cid;
+ HostAddressPort hostAddressPort;
+ Type type;
+ };
+
+ public:
+ typedef boost::shared_ptr<JingleRawUDPTransportPayload> ref;
+
+ public:
+ JingleRawUDPTransportPayload() {}
+
+ const std::vector<Candidate>& getCandidates() const {
+ return candidates;
+ }
+
+ void addCandidate(const Candidate& candidate) {
+ candidates.push_back(candidate);
+ }
+
+ private:
+ std::vector<Candidate> candidates;
+ };
+}