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

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

Issue 1998813002: Fixing the behavior of the candidate filter with pooled candidates. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Undoing unintentional "git cl format" of unrelated files. Created 4 years, 7 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/port.cc ('k') | webrtc/p2p/base/portallocator.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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 virtual ~PortAllocatorSession() {} 134 virtual ~PortAllocatorSession() {}
135 135
136 uint32_t flags() const { return flags_; } 136 uint32_t flags() const { return flags_; }
137 void set_flags(uint32_t flags) { flags_ = flags; } 137 void set_flags(uint32_t flags) { flags_ = flags; }
138 std::string content_name() const { return content_name_; } 138 std::string content_name() const { return content_name_; }
139 int component() const { return component_; } 139 int component() const { return component_; }
140 const std::string& ice_ufrag() const { return ice_ufrag_; } 140 const std::string& ice_ufrag() const { return ice_ufrag_; }
141 const std::string& ice_pwd() const { return ice_pwd_; } 141 const std::string& ice_pwd() const { return ice_pwd_; }
142 bool pooled() const { return ice_ufrag_.empty(); } 142 bool pooled() const { return ice_ufrag_.empty(); }
143 143
144 // Setting this filter should affect not only candidates gathered in the
145 // future, but candidates already gathered and ports already "ready",
146 // which would be returned by ReadyCandidates() and ReadyPorts().
147 //
148 // Default filter should be CF_ALL.
149 virtual void SetCandidateFilter(uint32_t filter) = 0;
150
144 // Starts gathering STUN and Relay configurations. 151 // Starts gathering STUN and Relay configurations.
145 virtual void StartGettingPorts() = 0; 152 virtual void StartGettingPorts() = 0;
146 virtual void StopGettingPorts() = 0; 153 virtual void StopGettingPorts() = 0;
147 // Only stop the existing gathering process but may start new ones if needed. 154 // Only stop the existing gathering process but may start new ones if needed.
148 virtual void ClearGettingPorts() = 0; 155 virtual void ClearGettingPorts() = 0;
149 // Whether the process of getting ports has been stopped. 156 // Whether the process of getting ports has been stopped.
150 virtual bool IsGettingPorts() = 0; 157 virtual bool IsGettingPorts() = 0;
151 158
152 // Another way of getting the information provided by the signals below. 159 // Another way of getting the information provided by the signals below.
153 // 160 //
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 uint32_t step_delay() const { return step_delay_; } 300 uint32_t step_delay() const { return step_delay_; }
294 void set_step_delay(uint32_t delay) { step_delay_ = delay; } 301 void set_step_delay(uint32_t delay) { step_delay_ = delay; }
295 302
296 bool allow_tcp_listen() const { return allow_tcp_listen_; } 303 bool allow_tcp_listen() const { return allow_tcp_listen_; }
297 void set_allow_tcp_listen(bool allow_tcp_listen) { 304 void set_allow_tcp_listen(bool allow_tcp_listen) {
298 allow_tcp_listen_ = allow_tcp_listen; 305 allow_tcp_listen_ = allow_tcp_listen;
299 } 306 }
300 307
301 uint32_t candidate_filter() { return candidate_filter_; } 308 uint32_t candidate_filter() { return candidate_filter_; }
302 void set_candidate_filter(uint32_t filter) { 309 void set_candidate_filter(uint32_t filter) {
303 // TODO(mallinath) - Do transition check?
304 candidate_filter_ = filter; 310 candidate_filter_ = filter;
305 } 311 }
306 312
307 // Gets/Sets the Origin value used for WebRTC STUN requests. 313 // Gets/Sets the Origin value used for WebRTC STUN requests.
308 const std::string& origin() const { return origin_; } 314 const std::string& origin() const { return origin_; }
309 void set_origin(const std::string& origin) { origin_ = origin; } 315 void set_origin(const std::string& origin) { origin_ = origin; }
310 316
311 protected: 317 protected:
312 virtual PortAllocatorSession* CreateSessionInternal( 318 virtual PortAllocatorSession* CreateSessionInternal(
313 const std::string& content_name, 319 const std::string& content_name,
(...skipping 18 matching lines...) Expand all
332 int target_pooled_session_count_ = 0; 338 int target_pooled_session_count_ = 0;
333 // This variable represents the total number of pooled sessions 339 // This variable represents the total number of pooled sessions
334 // both owned by this class and taken by TakePooledSession. 340 // both owned by this class and taken by TakePooledSession.
335 int allocated_pooled_session_count_ = 0; 341 int allocated_pooled_session_count_ = 0;
336 std::deque<std::unique_ptr<PortAllocatorSession>> pooled_sessions_; 342 std::deque<std::unique_ptr<PortAllocatorSession>> pooled_sessions_;
337 }; 343 };
338 344
339 } // namespace cricket 345 } // namespace cricket
340 346
341 #endif // WEBRTC_P2P_BASE_PORTALLOCATOR_H_ 347 #endif // WEBRTC_P2P_BASE_PORTALLOCATOR_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/port.cc ('k') | webrtc/p2p/base/portallocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698