/* * Copyright (c) 2012 Yoann Blein * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ #pragma once #include #include #include #include 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 ref; public: JingleRawUDPTransportPayload() {} const std::vector& getCandidates() const { return candidates; } void addCandidate(const Candidate& candidate) { candidates.push_back(candidate); } private: std::vector candidates; }; }