| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 const std::string& ice_pwd) = 0; | 50 const std::string& ice_pwd) = 0; |
| 51 | 51 |
| 52 // SetRemoteIceMode must be implemented only by the ICE transport channels. | 52 // SetRemoteIceMode must be implemented only by the ICE transport channels. |
| 53 virtual void SetRemoteIceMode(IceMode mode) = 0; | 53 virtual void SetRemoteIceMode(IceMode mode) = 0; |
| 54 | 54 |
| 55 virtual void SetReceivingTimeout(int timeout_ms) = 0; | 55 virtual void SetReceivingTimeout(int timeout_ms) = 0; |
| 56 | 56 |
| 57 // Begins the process of attempting to make a connection to the other client. | 57 // Begins the process of attempting to make a connection to the other client. |
| 58 virtual void Connect() = 0; | 58 virtual void Connect() = 0; |
| 59 | 59 |
| 60 // Allows an individual channel to request signaling and be notified when it | 60 sigslot::signal1<TransportChannelImpl*> SignalGatheringState; |
| 61 // is ready. This is useful if the individual named channels have need to | |
| 62 // send their own transport-info stanzas. | |
| 63 sigslot::signal1<TransportChannelImpl*> SignalRequestSignaling; | |
| 64 virtual void OnSignalingReady() = 0; | |
| 65 | 61 |
| 66 // Handles sending and receiving of candidates. The Transport | 62 // Handles sending and receiving of candidates. The Transport |
| 67 // receives the candidates and may forward them to the relevant | 63 // receives the candidates and may forward them to the relevant |
| 68 // channel. | 64 // channel. |
| 69 // | 65 // |
| 70 // Note: Since candidates are delivered asynchronously to the | 66 // Note: Since candidates are delivered asynchronously to the |
| 71 // channel, they cannot return an error if the message is invalid. | 67 // channel, they cannot return an error if the message is invalid. |
| 72 // It is assumed that the Transport will have checked validity | 68 // It is assumed that the Transport will have checked validity |
| 73 // before forwarding. | 69 // before forwarding. |
| 74 sigslot::signal2<TransportChannelImpl*, | 70 sigslot::signal2<TransportChannelImpl*, const Candidate&> |
| 75 const Candidate&> SignalCandidateReady; | 71 SignalCandidateGathered; |
| 76 virtual void OnCandidate(const Candidate& candidate) = 0; | 72 virtual void OnCandidate(const Candidate& candidate) = 0; |
| 77 | 73 |
| 74 virtual GatheringState gathering_state() const = 0; |
| 75 |
| 78 // DTLS methods | 76 // DTLS methods |
| 79 // Set DTLS local identity. The identity object is not copied, but the caller | 77 // Set DTLS local identity. The identity object is not copied, but the caller |
| 80 // retains ownership and must delete it after this TransportChannelImpl is | 78 // retains ownership and must delete it after this TransportChannelImpl is |
| 81 // destroyed. | 79 // destroyed. |
| 82 // TODO(bemasc): Fix the ownership semantics of this method. | 80 // TODO(bemasc): Fix the ownership semantics of this method. |
| 83 virtual bool SetLocalIdentity(rtc::SSLIdentity* identity) = 0; | 81 virtual bool SetLocalIdentity(rtc::SSLIdentity* identity) = 0; |
| 84 | 82 |
| 85 // Set DTLS Remote fingerprint. Must be after local identity set. | 83 // Set DTLS Remote fingerprint. Must be after local identity set. |
| 86 virtual bool SetRemoteFingerprint(const std::string& digest_alg, | 84 virtual bool SetRemoteFingerprint(const std::string& digest_alg, |
| 87 const uint8* digest, | 85 const uint8* digest, |
| 88 size_t digest_len) = 0; | 86 size_t digest_len) = 0; |
| 89 | 87 |
| 90 virtual bool SetSslRole(rtc::SSLRole role) = 0; | 88 virtual bool SetSslRole(rtc::SSLRole role) = 0; |
| 91 | 89 |
| 92 // TransportChannel is forwarding this signal from PortAllocatorSession. | |
| 93 sigslot::signal1<TransportChannelImpl*> SignalCandidatesAllocationDone; | |
| 94 | |
| 95 // Invoked when there is conflict in the ICE role between local and remote | 90 // Invoked when there is conflict in the ICE role between local and remote |
| 96 // agents. | 91 // agents. |
| 97 sigslot::signal1<TransportChannelImpl*> SignalRoleConflict; | 92 sigslot::signal1<TransportChannelImpl*> SignalRoleConflict; |
| 98 | 93 |
| 99 // Emitted whenever the number of connections available to the transport | 94 // Emitted whenever the number of connections available to the transport |
| 100 // channel decreases. | 95 // channel decreases. |
| 101 sigslot::signal1<TransportChannelImpl*> SignalConnectionRemoved; | 96 sigslot::signal1<TransportChannelImpl*> SignalConnectionRemoved; |
| 102 | 97 |
| 103 private: | 98 private: |
| 104 DISALLOW_COPY_AND_ASSIGN(TransportChannelImpl); | 99 DISALLOW_COPY_AND_ASSIGN(TransportChannelImpl); |
| 105 }; | 100 }; |
| 106 | 101 |
| 107 } // namespace cricket | 102 } // namespace cricket |
| 108 | 103 |
| 109 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ | 104 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ |
| OLD | NEW |