OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 public: | 52 public: |
53 virtual ~IceCandidateInterface() {} | 53 virtual ~IceCandidateInterface() {} |
54 // If present, this is the value of the "a=mid" attribute of the candidate's | 54 // If present, this is the value of the "a=mid" attribute of the candidate's |
55 // m= section in SDP, which identifies the m= section. | 55 // m= section in SDP, which identifies the m= section. |
56 virtual std::string sdp_mid() const = 0; | 56 virtual std::string sdp_mid() const = 0; |
57 // This indicates the index (starting at zero) of m= section this candidate | 57 // This indicates the index (starting at zero) of m= section this candidate |
58 // is assocated with. Needed when an endpoint doesn't support MIDs. | 58 // is assocated with. Needed when an endpoint doesn't support MIDs. |
59 virtual int sdp_mline_index() const = 0; | 59 virtual int sdp_mline_index() const = 0; |
60 // Only for use internally. | 60 // Only for use internally. |
61 virtual const cricket::Candidate& candidate() const = 0; | 61 virtual const cricket::Candidate& candidate() const = 0; |
| 62 // The URL of the ICE server which this candidate was gathered from. |
| 63 // TODO(zhihuang): Remove the default implementation once the subclasses |
| 64 // implement this method. |
| 65 virtual std::string server_url() const { return ""; } |
62 // Creates a SDP-ized form of this candidate. | 66 // Creates a SDP-ized form of this candidate. |
63 virtual bool ToString(std::string* out) const = 0; | 67 virtual bool ToString(std::string* out) const = 0; |
64 }; | 68 }; |
65 | 69 |
66 // Creates a IceCandidateInterface based on SDP string. | 70 // Creates a IceCandidateInterface based on SDP string. |
67 // Returns NULL if the sdp string can't be parsed. | 71 // Returns NULL if the sdp string can't be parsed. |
68 // |error| may be NULL. | 72 // |error| may be NULL. |
69 IceCandidateInterface* CreateIceCandidate(const std::string& sdp_mid, | 73 IceCandidateInterface* CreateIceCandidate(const std::string& sdp_mid, |
70 int sdp_mline_index, | 74 int sdp_mline_index, |
71 const std::string& sdp, | 75 const std::string& sdp, |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 virtual void OnSuccess() = 0; | 166 virtual void OnSuccess() = 0; |
163 virtual void OnFailure(const std::string& error) = 0; | 167 virtual void OnFailure(const std::string& error) = 0; |
164 | 168 |
165 protected: | 169 protected: |
166 ~SetSessionDescriptionObserver() {} | 170 ~SetSessionDescriptionObserver() {} |
167 }; | 171 }; |
168 | 172 |
169 } // namespace webrtc | 173 } // namespace webrtc |
170 | 174 |
171 #endif // WEBRTC_API_JSEP_H_ | 175 #endif // WEBRTC_API_JSEP_H_ |
OLD | NEW |