| 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 26 matching lines...) Expand all Loading... |
| 37 int component) | 37 int component) |
| 38 : TransportChannel(transport_name, component) {} | 38 : TransportChannel(transport_name, component) {} |
| 39 | 39 |
| 40 // For ICE channels. | 40 // For ICE channels. |
| 41 virtual IceRole GetIceRole() const = 0; | 41 virtual IceRole GetIceRole() const = 0; |
| 42 virtual void SetIceRole(IceRole role) = 0; | 42 virtual void SetIceRole(IceRole role) = 0; |
| 43 virtual void SetIceTiebreaker(uint64_t tiebreaker) = 0; | 43 virtual void SetIceTiebreaker(uint64_t tiebreaker) = 0; |
| 44 // TODO(pthatcher): Remove this once it's no longer called in | 44 // TODO(pthatcher): Remove this once it's no longer called in |
| 45 // remoting/protocol/libjingle_transport_factory.cc | 45 // remoting/protocol/libjingle_transport_factory.cc |
| 46 virtual void SetIceProtocolType(IceProtocolType type) {} | 46 virtual void SetIceProtocolType(IceProtocolType type) {} |
| 47 // SetIceCredentials only need to be implemented by the ICE | 47 // TODO(honghaiz): Remove this once the call in chromoting is removed. |
| 48 // transport channels. Non-ICE transport channels can just ignore. | |
| 49 // The ufrag and pwd must be set before candidate gathering can start. | |
| 50 virtual void SetIceCredentials(const std::string& ice_ufrag, | 48 virtual void SetIceCredentials(const std::string& ice_ufrag, |
| 51 const std::string& ice_pwd) = 0; | 49 const std::string& ice_pwd) { |
| 52 // SetRemoteIceCredentials only need to be implemented by the ICE | 50 SetIceParameters(IceParameters(ice_ufrag, ice_pwd, false)); |
| 53 // transport channels. Non-ICE transport channels can just ignore. | 51 } |
| 52 // TODO(honghaiz): Remove this once the call in chromoting is removed. |
| 54 virtual void SetRemoteIceCredentials(const std::string& ice_ufrag, | 53 virtual void SetRemoteIceCredentials(const std::string& ice_ufrag, |
| 55 const std::string& ice_pwd) = 0; | 54 const std::string& ice_pwd) { |
| 55 SetRemoteIceParameters(IceParameters(ice_ufrag, ice_pwd, false)); |
| 56 } |
| 57 |
| 58 // SetIceParameters only needs to be implemented by the ICE transport |
| 59 // channels. Non-ICE transport channels should pass them down to the inner |
| 60 // ICE transport channel. The ufrag and pwd in |ice_params| must be set |
| 61 // before candidate gathering can start. |
| 62 virtual void SetIceParameters(const IceParameters& ice_params) = 0; |
| 63 // SetRemoteIceParameters only needs to be implemented by the ICE transport |
| 64 // channels. Non-ICE transport channels should pass them down to the inner |
| 65 // ICE transport channel. |
| 66 virtual void SetRemoteIceParameters(const IceParameters& ice_params) = 0; |
| 56 | 67 |
| 57 // SetRemoteIceMode must be implemented only by the ICE transport channels. | 68 // SetRemoteIceMode must be implemented only by the ICE transport channels. |
| 58 virtual void SetRemoteIceMode(IceMode mode) = 0; | 69 virtual void SetRemoteIceMode(IceMode mode) = 0; |
| 59 | 70 |
| 60 virtual void SetIceConfig(const IceConfig& config) = 0; | 71 virtual void SetIceConfig(const IceConfig& config) = 0; |
| 61 | 72 |
| 62 // Start gathering candidates if not already started, or if an ICE restart | 73 // Start gathering candidates if not already started, or if an ICE restart |
| 63 // occurred. | 74 // occurred. |
| 64 virtual void MaybeStartGathering() = 0; | 75 virtual void MaybeStartGathering() = 0; |
| 65 | 76 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // Emitted whenever the Dtls handshake failed on some transport channel. | 114 // Emitted whenever the Dtls handshake failed on some transport channel. |
| 104 sigslot::signal1<rtc::SSLHandshakeError> SignalDtlsHandshakeError; | 115 sigslot::signal1<rtc::SSLHandshakeError> SignalDtlsHandshakeError; |
| 105 | 116 |
| 106 private: | 117 private: |
| 107 RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannelImpl); | 118 RTC_DISALLOW_COPY_AND_ASSIGN(TransportChannelImpl); |
| 108 }; | 119 }; |
| 109 | 120 |
| 110 } // namespace cricket | 121 } // namespace cricket |
| 111 | 122 |
| 112 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ | 123 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ |
| OLD | NEW |