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

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: Rebase to master 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
« no previous file with comments | « webrtc/p2p/base/session.cc ('k') | webrtc/p2p/base/transport.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Information about ICE configuration.
143 struct IceConfig {
144 // The ICE connection receiving timeout value.
145 int receiving_timeout_ms = -1;
146 // If true, the most recent port allocator session will keep on running.
147 bool gather_continually = false;
148 };
149
142 bool BadTransportDescription(const std::string& desc, std::string* err_desc); 150 bool BadTransportDescription(const std::string& desc, std::string* err_desc);
143 151
144 bool IceCredentialsChanged(const std::string& old_ufrag, 152 bool IceCredentialsChanged(const std::string& old_ufrag,
145 const std::string& old_pwd, 153 const std::string& old_pwd,
146 const std::string& new_ufrag, 154 const std::string& new_ufrag,
147 const std::string& new_pwd); 155 const std::string& new_pwd);
148 156
149 class Transport : public sigslot::has_slots<> { 157 class Transport : public sigslot::has_slots<> {
150 public: 158 public:
151 Transport(const std::string& name, PortAllocator* allocator); 159 Transport(const std::string& name, PortAllocator* allocator);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 198
191 // Returns whether the client has requested the channels to connect. 199 // Returns whether the client has requested the channels to connect.
192 bool connect_requested() const { return connect_requested_; } 200 bool connect_requested() const { return connect_requested_; }
193 201
194 void SetIceRole(IceRole role); 202 void SetIceRole(IceRole role);
195 IceRole ice_role() const { return ice_role_; } 203 IceRole ice_role() const { return ice_role_; }
196 204
197 void SetIceTiebreaker(uint64 IceTiebreaker) { tiebreaker_ = IceTiebreaker; } 205 void SetIceTiebreaker(uint64 IceTiebreaker) { tiebreaker_ = IceTiebreaker; }
198 uint64 IceTiebreaker() { return tiebreaker_; } 206 uint64 IceTiebreaker() { return tiebreaker_; }
199 207
200 void SetChannelReceivingTimeout(int timeout_ms); 208 void SetIceConfig(const IceConfig& config);
201 209
202 // Must be called before applying local session description. 210 // Must be called before applying local session description.
203 virtual void SetLocalCertificate( 211 virtual void SetLocalCertificate(
204 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) {} 212 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) {}
205 213
206 // Get a copy of the local certificate provided by SetLocalCertificate. 214 // Get a copy of the local certificate provided by SetLocalCertificate.
207 virtual bool GetLocalCertificate( 215 virtual bool GetLocalCertificate(
208 rtc::scoped_refptr<rtc::RTCCertificate>* certificate) { 216 rtc::scoped_refptr<rtc::RTCCertificate>* certificate) {
209 return false; 217 return false;
210 } 218 }
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 PortAllocator* const allocator_; 400 PortAllocator* const allocator_;
393 bool channels_destroyed_ = false; 401 bool channels_destroyed_ = false;
394 TransportState readable_ = TRANSPORT_STATE_NONE; 402 TransportState readable_ = TRANSPORT_STATE_NONE;
395 TransportState writable_ = TRANSPORT_STATE_NONE; 403 TransportState writable_ = TRANSPORT_STATE_NONE;
396 TransportState receiving_ = TRANSPORT_STATE_NONE; 404 TransportState receiving_ = TRANSPORT_STATE_NONE;
397 bool was_writable_ = false; 405 bool was_writable_ = false;
398 bool connect_requested_ = false; 406 bool connect_requested_ = false;
399 IceRole ice_role_ = ICEROLE_UNKNOWN; 407 IceRole ice_role_ = ICEROLE_UNKNOWN;
400 uint64 tiebreaker_ = 0; 408 uint64 tiebreaker_ = 0;
401 IceMode remote_ice_mode_ = ICEMODE_FULL; 409 IceMode remote_ice_mode_ = ICEMODE_FULL;
402 int channel_receiving_timeout_ = -1; 410 IceConfig ice_config_;
403 rtc::scoped_ptr<TransportDescription> local_description_; 411 rtc::scoped_ptr<TransportDescription> local_description_;
404 rtc::scoped_ptr<TransportDescription> remote_description_; 412 rtc::scoped_ptr<TransportDescription> remote_description_;
405 bool local_description_set_ = false; 413 bool local_description_set_ = false;
406 bool remote_description_set_ = false; 414 bool remote_description_set_ = false;
407 IceGatheringState gathering_state_ = kIceGatheringNew; 415 IceGatheringState gathering_state_ = kIceGatheringNew;
408 416
409 ChannelMap channels_; 417 ChannelMap channels_;
410 418
411 RTC_DISALLOW_COPY_AND_ASSIGN(Transport); 419 RTC_DISALLOW_COPY_AND_ASSIGN(Transport);
412 }; 420 };
413 421
414 422
415 } // namespace cricket 423 } // namespace cricket
416 424
417 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_ 425 #endif // WEBRTC_P2P_BASE_TRANSPORT_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/session.cc ('k') | webrtc/p2p/base/transport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698