| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2010 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 contents_.push_back(ContentInfo(name, type, description)); | 125 contents_.push_back(ContentInfo(name, type, description)); |
| 126 } | 126 } |
| 127 | 127 |
| 128 void SessionDescription::AddContent(const std::string& name, | 128 void SessionDescription::AddContent(const std::string& name, |
| 129 const std::string& type, | 129 const std::string& type, |
| 130 bool rejected, | 130 bool rejected, |
| 131 ContentDescription* description) { | 131 ContentDescription* description) { |
| 132 contents_.push_back(ContentInfo(name, type, rejected, description)); | 132 contents_.push_back(ContentInfo(name, type, rejected, description)); |
| 133 } | 133 } |
| 134 | 134 |
| 135 void SessionDescription::AddContent(const std::string& name, |
| 136 const std::string& type, |
| 137 bool rejected, |
| 138 bool bundle_only, |
| 139 ContentDescription* description) { |
| 140 contents_.push_back( |
| 141 ContentInfo(name, type, rejected, bundle_only, description)); |
| 142 } |
| 143 |
| 135 bool SessionDescription::RemoveContentByName(const std::string& name) { | 144 bool SessionDescription::RemoveContentByName(const std::string& name) { |
| 136 for (ContentInfos::iterator content = contents_.begin(); | 145 for (ContentInfos::iterator content = contents_.begin(); |
| 137 content != contents_.end(); ++content) { | 146 content != contents_.end(); ++content) { |
| 138 if (content->name == name) { | 147 if (content->name == name) { |
| 139 delete content->description; | 148 delete content->description; |
| 140 contents_.erase(content); | 149 contents_.erase(content); |
| 141 return true; | 150 return true; |
| 142 } | 151 } |
| 143 } | 152 } |
| 144 | 153 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 for (ContentGroups::const_iterator iter = content_groups_.begin(); | 220 for (ContentGroups::const_iterator iter = content_groups_.begin(); |
| 212 iter != content_groups_.end(); ++iter) { | 221 iter != content_groups_.end(); ++iter) { |
| 213 if (iter->semantics() == name) { | 222 if (iter->semantics() == name) { |
| 214 return &(*iter); | 223 return &(*iter); |
| 215 } | 224 } |
| 216 } | 225 } |
| 217 return NULL; | 226 return NULL; |
| 218 } | 227 } |
| 219 | 228 |
| 220 } // namespace cricket | 229 } // namespace cricket |
| OLD | NEW |