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

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

Issue 1369773003: Add a continual_gathering_policy in PeerConnection RTCConfiguration (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 2 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // Information about all the channels of a transport. 132 // Information about all the channels of a transport.
133 // TODO(hta): Consider if a simple vector is as good as a map. 133 // TODO(hta): Consider if a simple vector is as good as a map.
134 typedef std::vector<TransportChannelStats> TransportChannelStatsList; 134 typedef std::vector<TransportChannelStats> TransportChannelStatsList;
135 135
136 // Information about the stats of a transport. 136 // Information about the stats of a transport.
137 struct TransportStats { 137 struct TransportStats {
138 std::string transport_name; 138 std::string transport_name;
139 TransportChannelStatsList channel_stats; 139 TransportChannelStatsList channel_stats;
140 }; 140 };
141 141
142 struct IceConfig {
143 int receiving_timeout_ms = -1;
144 bool continue_getting_ports = false;
pthatcher1 2015/09/25 17:37:47 We need to comment what effect these have here.
honghaiz3 2015/09/25 20:10:20 Done.
145 };
146
142 bool BadTransportDescription(const std::string& desc, std::string* err_desc); 147 bool BadTransportDescription(const std::string& desc, std::string* err_desc);
143 148
144 bool IceCredentialsChanged(const std::string& old_ufrag, 149 bool IceCredentialsChanged(const std::string& old_ufrag,
145 const std::string& old_pwd, 150 const std::string& old_pwd,
146 const std::string& new_ufrag, 151 const std::string& new_ufrag,
147 const std::string& new_pwd); 152 const std::string& new_pwd);
148 153
149 class Transport : public sigslot::has_slots<> { 154 class Transport : public sigslot::has_slots<> {
150 public: 155 public:
151 Transport(const std::string& name, PortAllocator* allocator); 156 Transport(const std::string& name, PortAllocator* allocator);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 195
191 // Returns whether the client has requested the channels to connect. 196 // Returns whether the client has requested the channels to connect.
192 bool connect_requested() const { return connect_requested_; } 197 bool connect_requested() const { return connect_requested_; }
193 198
194 void SetIceRole(IceRole role); 199 void SetIceRole(IceRole role);
195 IceRole ice_role() const { return ice_role_; } 200 IceRole ice_role() const { return ice_role_; }
196 201
197 void SetIceTiebreaker(uint64 IceTiebreaker) { tiebreaker_ = IceTiebreaker; } 202 void SetIceTiebreaker(uint64 IceTiebreaker) { tiebreaker_ = IceTiebreaker; }
198 uint64 IceTiebreaker() { return tiebreaker_; } 203 uint64 IceTiebreaker() { return tiebreaker_; }
199 204
200 void SetChannelReceivingTimeout(int timeout_ms); 205 void SetIceConfig(const IceConfig& config);
201 206
202 // Must be called before applying local session description. 207 // Must be called before applying local session description.
203 virtual void SetLocalCertificate( 208 virtual void SetLocalCertificate(
204 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) {} 209 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) {}
205 210
206 // Get a copy of the local certificate provided by SetLocalCertificate. 211 // Get a copy of the local certificate provided by SetLocalCertificate.
207 virtual bool GetLocalCertificate( 212 virtual bool GetLocalCertificate(
208 rtc::scoped_refptr<rtc::RTCCertificate>* certificate) { 213 rtc::scoped_refptr<rtc::RTCCertificate>* certificate) {
209 return false; 214 return false;
210 } 215 }
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 PortAllocator* const allocator_; 397 PortAllocator* const allocator_;
393 bool channels_destroyed_ = false; 398 bool channels_destroyed_ = false;
394 TransportState readable_ = TRANSPORT_STATE_NONE; 399 TransportState readable_ = TRANSPORT_STATE_NONE;
395 TransportState writable_ = TRANSPORT_STATE_NONE; 400 TransportState writable_ = TRANSPORT_STATE_NONE;
396 TransportState receiving_ = TRANSPORT_STATE_NONE; 401 TransportState receiving_ = TRANSPORT_STATE_NONE;
397 bool was_writable_ = false; 402 bool was_writable_ = false;
398 bool connect_requested_ = false; 403 bool connect_requested_ = false;
399 IceRole ice_role_ = ICEROLE_UNKNOWN; 404 IceRole ice_role_ = ICEROLE_UNKNOWN;
400 uint64 tiebreaker_ = 0; 405 uint64 tiebreaker_ = 0;
401 IceMode remote_ice_mode_ = ICEMODE_FULL; 406 IceMode remote_ice_mode_ = ICEMODE_FULL;
402 int channel_receiving_timeout_ = -1; 407 IceConfig ice_config_;
403 rtc::scoped_ptr<TransportDescription> local_description_; 408 rtc::scoped_ptr<TransportDescription> local_description_;
404 rtc::scoped_ptr<TransportDescription> remote_description_; 409 rtc::scoped_ptr<TransportDescription> remote_description_;
405 bool local_description_set_ = false; 410 bool local_description_set_ = false;
406 bool remote_description_set_ = false; 411 bool remote_description_set_ = false;
407 IceGatheringState gathering_state_ = kIceGatheringNew; 412 IceGatheringState gathering_state_ = kIceGatheringNew;
408 413
409 ChannelMap channels_; 414 ChannelMap channels_;
410 415
411 RTC_DISALLOW_COPY_AND_ASSIGN(Transport); 416 RTC_DISALLOW_COPY_AND_ASSIGN(Transport);
412 }; 417 };
413 418
414 419
415 } // namespace cricket 420 } // namespace cricket
416 421
417 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_ 422 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698