Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: webrtc/p2p/base/transportchannelimpl.h

Issue 1246913005: TransportController refactoring (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // transport channels. Non-ICE transport channels can just ignore. 54 // transport channels. Non-ICE transport channels can just ignore.
55 virtual void SetRemoteIceCredentials(const std::string& ice_ufrag, 55 virtual void SetRemoteIceCredentials(const std::string& ice_ufrag,
56 const std::string& ice_pwd) = 0; 56 const std::string& ice_pwd) = 0;
57 57
58 // SetRemoteIceMode must be implemented only by the ICE transport channels. 58 // SetRemoteIceMode must be implemented only by the ICE transport channels.
59 virtual void SetRemoteIceMode(IceMode mode) = 0; 59 virtual void SetRemoteIceMode(IceMode mode) = 0;
60 60
61 virtual void SetReceivingTimeout(int timeout_ms) = 0; 61 virtual void SetReceivingTimeout(int timeout_ms) = 0;
62 62
63 // Begins the process of attempting to make a connection to the other client. 63 // Begins the process of attempting to make a connection to the other client.
64 // This includes starting to gather candidates.
64 virtual void Connect() = 0; 65 virtual void Connect() = 0;
65 66
66 // Allows an individual channel to request signaling and be notified when it 67 sigslot::signal1<TransportChannelImpl*> SignalGatheringState;
67 // is ready. This is useful if the individual named channels have need to
68 // send their own transport-info stanzas.
69 sigslot::signal1<TransportChannelImpl*> SignalRequestSignaling;
70 virtual void OnSignalingReady() = 0;
71 68
72 // Handles sending and receiving of candidates. The Transport 69 // Handles sending and receiving of candidates. The Transport
73 // receives the candidates and may forward them to the relevant 70 // receives the candidates and may forward them to the relevant
74 // channel. 71 // channel.
75 // 72 //
76 // Note: Since candidates are delivered asynchronously to the 73 // Note: Since candidates are delivered asynchronously to the
77 // channel, they cannot return an error if the message is invalid. 74 // channel, they cannot return an error if the message is invalid.
78 // It is assumed that the Transport will have checked validity 75 // It is assumed that the Transport will have checked validity
79 // before forwarding. 76 // before forwarding.
80 sigslot::signal2<TransportChannelImpl*, 77 sigslot::signal2<TransportChannelImpl*, const Candidate&>
81 const Candidate&> SignalCandidateReady; 78 SignalCandidateGathered;
82 virtual void OnCandidate(const Candidate& candidate) = 0; 79 virtual void AddRemoteCandidate(const Candidate& candidate) = 0;
80
81 virtual IceGatheringState gathering_state() const = 0;
83 82
84 // DTLS methods 83 // DTLS methods
85 // Set DTLS local identity. The identity object is not copied, but the caller 84 // Set DTLS local identity. The identity object is not copied, but the caller
86 // retains ownership and must delete it after this TransportChannelImpl is 85 // retains ownership and must delete it after this TransportChannelImpl is
87 // destroyed. 86 // destroyed.
88 // TODO(bemasc): Fix the ownership semantics of this method. 87 // TODO(bemasc): Fix the ownership semantics of this method.
89 virtual bool SetLocalIdentity(rtc::SSLIdentity* identity) = 0; 88 virtual bool SetLocalIdentity(rtc::SSLIdentity* identity) = 0;
90 89
91 // Set DTLS Remote fingerprint. Must be after local identity set. 90 // Set DTLS Remote fingerprint. Must be after local identity set.
92 virtual bool SetRemoteFingerprint(const std::string& digest_alg, 91 virtual bool SetRemoteFingerprint(const std::string& digest_alg,
93 const uint8* digest, 92 const uint8* digest,
94 size_t digest_len) = 0; 93 size_t digest_len) = 0;
95 94
96 virtual bool SetSslRole(rtc::SSLRole role) = 0; 95 virtual bool SetSslRole(rtc::SSLRole role) = 0;
97 96
98 // TransportChannel is forwarding this signal from PortAllocatorSession.
99 sigslot::signal1<TransportChannelImpl*> SignalCandidatesAllocationDone;
100
101 // Invoked when there is conflict in the ICE role between local and remote 97 // Invoked when there is conflict in the ICE role between local and remote
102 // agents. 98 // agents.
103 sigslot::signal1<TransportChannelImpl*> SignalRoleConflict; 99 sigslot::signal1<TransportChannelImpl*> SignalRoleConflict;
104 100
105 // Emitted whenever the number of connections available to the transport 101 // Emitted whenever the number of connections available to the transport
106 // channel decreases. 102 // channel decreases.
107 sigslot::signal1<TransportChannelImpl*> SignalConnectionRemoved; 103 sigslot::signal1<TransportChannelImpl*> SignalConnectionRemoved;
108 104
109 private: 105 private:
110 DISALLOW_COPY_AND_ASSIGN(TransportChannelImpl); 106 DISALLOW_COPY_AND_ASSIGN(TransportChannelImpl);
111 }; 107 };
112 108
113 } // namespace cricket 109 } // namespace cricket
114 110
115 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ 111 #endif // WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698