| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2011 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 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 class IceCandidateInterface; | 27 class IceCandidateInterface; |
| 28 class JsepIceCandidate; | 28 class JsepIceCandidate; |
| 29 class JsepSessionDescription; | 29 class JsepSessionDescription; |
| 30 struct SdpParseError; | 30 struct SdpParseError; |
| 31 | 31 |
| 32 // Serializes the passed in JsepSessionDescription. | 32 // Serializes the passed in JsepSessionDescription. |
| 33 // Serialize SessionDescription including candidates if | 33 // Serialize SessionDescription including candidates if |
| 34 // JsepSessionDescription has candidates. | 34 // JsepSessionDescription has candidates. |
| 35 // jdesc - The JsepSessionDescription object to be serialized. | 35 // jdesc - The JsepSessionDescription object to be serialized. |
| 36 // unified_plan_sdp - If set to true, include "a=msid" lines where appropriate. |
| 36 // return - SDP string serialized from the arguments. | 37 // return - SDP string serialized from the arguments. |
| 37 std::string SdpSerialize(const JsepSessionDescription& jdesc); | 38 std::string SdpSerialize(const JsepSessionDescription& jdesc, |
| 39 bool unified_plan_sdp); |
| 38 | 40 |
| 39 // Serializes the passed in IceCandidateInterface to a SDP string. | 41 // Serializes the passed in IceCandidateInterface to a SDP string. |
| 40 // candidate - The candidate to be serialized. | 42 // candidate - The candidate to be serialized. |
| 41 std::string SdpSerializeCandidate(const IceCandidateInterface& candidate); | 43 std::string SdpSerializeCandidate(const IceCandidateInterface& candidate); |
| 42 | 44 |
| 43 // Deserializes the passed in SDP string to a JsepSessionDescription. | 45 // Deserializes the passed in SDP string to a JsepSessionDescription. |
| 44 // message - SDP string to be Deserialized. | 46 // message - SDP string to be Deserialized. |
| 45 // jdesc - The JsepSessionDescription deserialized from the SDP string. | 47 // jdesc - The JsepSessionDescription deserialized from the SDP string. |
| 46 // error - The detail error information when parsing fails. | 48 // error - The detail error information when parsing fails. |
| 47 // return - true on success, false on failure. | 49 // return - true on success, false on failure. |
| 48 bool SdpDeserialize(const std::string& message, | 50 bool SdpDeserialize(const std::string& message, |
| 49 JsepSessionDescription* jdesc, | 51 JsepSessionDescription* jdesc, |
| 50 SdpParseError* error); | 52 SdpParseError* error); |
| 51 | 53 |
| 52 // Deserializes the passed in SDP string to one JsepIceCandidate. | 54 // Deserializes the passed in SDP string to one JsepIceCandidate. |
| 53 // The first line must be a=candidate line and only the first line will be | 55 // The first line must be a=candidate line and only the first line will be |
| 54 // parsed. | 56 // parsed. |
| 55 // message - The SDP string to be Deserialized. | 57 // message - The SDP string to be Deserialized. |
| 56 // candidates - The JsepIceCandidate from the SDP string. | 58 // candidates - The JsepIceCandidate from the SDP string. |
| 57 // error - The detail error information when parsing fails. | 59 // error - The detail error information when parsing fails. |
| 58 // return - true on success, false on failure. | 60 // return - true on success, false on failure. |
| 59 bool SdpDeserializeCandidate(const std::string& message, | 61 bool SdpDeserializeCandidate(const std::string& message, |
| 60 JsepIceCandidate* candidate, | 62 JsepIceCandidate* candidate, |
| 61 SdpParseError* error); | 63 SdpParseError* error); |
| 62 } // namespace webrtc | 64 } // namespace webrtc |
| 63 | 65 |
| 64 #endif // WEBRTC_API_WEBRTCSDP_H_ | 66 #endif // WEBRTC_API_WEBRTCSDP_H_ |
| OLD | NEW |