/* * Copyright (c) 2011 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ #pragma once #include #include #include #include #include #include namespace Swift { class JingleSession { friend class JingleResponder; public: typedef boost::shared_ptr ref; JingleSession(const String& id, const std::vector& contents); virtual ~JingleSession(); String getID() const { return id; } template JingleContent::ref getContentWithDescription() const { foreach (JingleContent::ref content, contents) { if (content->getDescription()) { return content; } } return JingleContent::ref(); } const std::vector getContents() const { return contents; } void terminate(JinglePayload::Reason::Type reason); private: void handleIncomingAction(JinglePayload::ref); private: String id; std::vector contents; }; }