Make webrtc::ParseCandidate() public.
This is intended to be used in Blink to implement proper support
for the JavaScript RTCIceCandidate API.
Bug: chromium:683094
Change-Id: I93d117ef1bd9541593f2715bdf3291dc2941737f
Reviewed-on: https://webrtc-review.googlesource.com/c/119940
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Guido Urdaneta <guidou@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26404}diff --git a/pc/webrtc_sdp.cc b/pc/webrtc_sdp.cc
index 094525a..1b2ff15 100644
--- a/pc/webrtc_sdp.cc
+++ b/pc/webrtc_sdp.cc
@@ -335,10 +335,6 @@
std::string* parameter,
std::string* value,
SdpParseError* error);
-static bool ParseCandidate(const std::string& message,
- Candidate* candidate,
- SdpParseError* error,
- bool is_raw);
static bool ParseRtcpFbAttribute(const std::string& line,
const cricket::MediaType media_type,
MediaContentDescription* media_desc,
diff --git a/pc/webrtc_sdp.h b/pc/webrtc_sdp.h
index 1d1e7aa..3ba5c7f 100644
--- a/pc/webrtc_sdp.h
+++ b/pc/webrtc_sdp.h
@@ -84,6 +84,17 @@
cricket::Candidate* candidate,
SdpParseError* error);
+// Parses |message| according to the grammar defined in RFC 5245, Section 15.1
+// and, if successful, stores the result in |candidate| and returns true.
+// If unsuccessful, returns false and stores error information in |error| if
+// |error| is not null.
+// If |is_raw| is false, |message| is expected to be prefixed with "a=".
+// If |is_raw| is true, no prefix is expected in |messaage|.
+RTC_EXPORT bool ParseCandidate(const std::string& message,
+ cricket::Candidate* candidate,
+ SdpParseError* error,
+ bool is_raw);
+
} // namespace webrtc
#endif // PC_WEBRTC_SDP_H_