#include "pc/session_description.h"
#include "absl/algorithm/container.h"
#include "absl/memory/memory.h"
#include "rtc_base/checks.h"
#include "rtc_base/strings/string_builder.h"
namespace cricket {
namespace {
ContentInfo* FindContentInfoByName(ContentInfos* contents,
const std::string& name) { … }
}
const ContentInfo* FindContentInfoByName(const ContentInfos& contents,
const std::string& name) { … }
const ContentInfo* FindContentInfoByType(const ContentInfos& contents,
MediaProtocolType type) { … }
ContentGroup::ContentGroup(const std::string& semantics)
: … { … }
ContentGroup::ContentGroup(const ContentGroup&) = default;
ContentGroup::ContentGroup(ContentGroup&&) = default;
ContentGroup& ContentGroup::operator=(const ContentGroup&) = default;
ContentGroup& ContentGroup::operator=(ContentGroup&&) = default;
ContentGroup::~ContentGroup() = default;
const std::string* ContentGroup::FirstContentName() const { … }
bool ContentGroup::HasContentName(absl::string_view content_name) const { … }
void ContentGroup::AddContentName(absl::string_view content_name) { … }
bool ContentGroup::RemoveContentName(absl::string_view content_name) { … }
std::string ContentGroup::ToString() const { … }
SessionDescription::SessionDescription() = default;
SessionDescription::SessionDescription(const SessionDescription&) = default;
SessionDescription::~SessionDescription() { … }
std::unique_ptr<SessionDescription> SessionDescription::Clone() const { … }
const ContentInfo* SessionDescription::GetContentByName(
const std::string& name) const { … }
ContentInfo* SessionDescription::GetContentByName(const std::string& name) { … }
const MediaContentDescription* SessionDescription::GetContentDescriptionByName(
const std::string& name) const { … }
MediaContentDescription* SessionDescription::GetContentDescriptionByName(
const std::string& name) { … }
const ContentInfo* SessionDescription::FirstContentByType(
MediaProtocolType type) const { … }
const ContentInfo* SessionDescription::FirstContent() const { … }
void SessionDescription::AddContent(
const std::string& name,
MediaProtocolType type,
std::unique_ptr<MediaContentDescription> description) { … }
void SessionDescription::AddContent(
const std::string& name,
MediaProtocolType type,
bool rejected,
std::unique_ptr<MediaContentDescription> description) { … }
void SessionDescription::AddContent(
const std::string& name,
MediaProtocolType type,
bool rejected,
bool bundle_only,
std::unique_ptr<MediaContentDescription> description) { … }
void SessionDescription::AddContent(ContentInfo&& content) { … }
bool SessionDescription::RemoveContentByName(const std::string& name) { … }
void SessionDescription::AddTransportInfo(const TransportInfo& transport_info) { … }
bool SessionDescription::RemoveTransportInfoByName(const std::string& name) { … }
const TransportInfo* SessionDescription::GetTransportInfoByName(
const std::string& name) const { … }
TransportInfo* SessionDescription::GetTransportInfoByName(
const std::string& name) { … }
void SessionDescription::RemoveGroupByName(const std::string& name) { … }
bool SessionDescription::HasGroup(const std::string& name) const { … }
const ContentGroup* SessionDescription::GetGroupByName(
const std::string& name) const { … }
std::vector<const ContentGroup*> SessionDescription::GetGroupsByName(
const std::string& name) const { … }
ContentInfo::~ContentInfo() { … }
ContentInfo::ContentInfo(const ContentInfo& o)
: … { … }
ContentInfo& ContentInfo::operator=(const ContentInfo& o) { … }
const MediaContentDescription* ContentInfo::media_description() const { … }
MediaContentDescription* ContentInfo::media_description() { … }
}