OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 bool RemoveRemoteCandidates(const std::vector<Candidate>& candidates, | 307 bool RemoveRemoteCandidates(const std::vector<Candidate>& candidates, |
308 std::string* error); | 308 std::string* error); |
309 | 309 |
310 virtual bool GetSslRole(rtc::SSLRole* ssl_role) const { return false; } | 310 virtual bool GetSslRole(rtc::SSLRole* ssl_role) const { return false; } |
311 | 311 |
312 // Must be called before channel is starting to connect. | 312 // Must be called before channel is starting to connect. |
313 virtual bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version) { | 313 virtual bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version) { |
314 return false; | 314 return false; |
315 } | 315 } |
316 | 316 |
| 317 // The current local transport description, for use by derived classes |
| 318 // when performing transport description negotiation, and possibly used |
| 319 // by the transport controller. |
| 320 const TransportDescription* local_description() const { |
| 321 return local_description_.get(); |
| 322 } |
| 323 |
| 324 // The current remote transport description, for use by derived classes |
| 325 // when performing transport description negotiation, and possibly used |
| 326 // by the transport controller. |
| 327 const TransportDescription* remote_description() const { |
| 328 return remote_description_.get(); |
| 329 } |
| 330 |
317 protected: | 331 protected: |
318 // These are called by Create/DestroyChannel above in order to create or | 332 // These are called by Create/DestroyChannel above in order to create or |
319 // destroy the appropriate type of channel. | 333 // destroy the appropriate type of channel. |
320 virtual TransportChannelImpl* CreateTransportChannel(int component) = 0; | 334 virtual TransportChannelImpl* CreateTransportChannel(int component) = 0; |
321 virtual void DestroyTransportChannel(TransportChannelImpl* channel) = 0; | 335 virtual void DestroyTransportChannel(TransportChannelImpl* channel) = 0; |
322 | 336 |
323 // The current local transport description, for use by derived classes | |
324 // when performing transport description negotiation. | |
325 const TransportDescription* local_description() const { | |
326 return local_description_.get(); | |
327 } | |
328 | |
329 // The current remote transport description, for use by derived classes | |
330 // when performing transport description negotiation. | |
331 const TransportDescription* remote_description() const { | |
332 return remote_description_.get(); | |
333 } | |
334 | |
335 // Pushes down the transport parameters from the local description, such | 337 // Pushes down the transport parameters from the local description, such |
336 // as the ICE ufrag and pwd. | 338 // as the ICE ufrag and pwd. |
337 // Derived classes can override, but must call the base as well. | 339 // Derived classes can override, but must call the base as well. |
338 virtual bool ApplyLocalTransportDescription(TransportChannelImpl* channel, | 340 virtual bool ApplyLocalTransportDescription(TransportChannelImpl* channel, |
339 std::string* error_desc); | 341 std::string* error_desc); |
340 | 342 |
341 // Pushes down remote ice credentials from the remote description to the | 343 // Pushes down remote ice credentials from the remote description to the |
342 // transport channel. | 344 // transport channel. |
343 virtual bool ApplyRemoteTransportDescription(TransportChannelImpl* ch, | 345 virtual bool ApplyRemoteTransportDescription(TransportChannelImpl* ch, |
344 std::string* error_desc); | 346 std::string* error_desc); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 | 401 |
400 ChannelMap channels_; | 402 ChannelMap channels_; |
401 | 403 |
402 RTC_DISALLOW_COPY_AND_ASSIGN(Transport); | 404 RTC_DISALLOW_COPY_AND_ASSIGN(Transport); |
403 }; | 405 }; |
404 | 406 |
405 | 407 |
406 } // namespace cricket | 408 } // namespace cricket |
407 | 409 |
408 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_ | 410 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_ |
OLD | NEW |