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

Side by Side Diff: webrtc/p2p/client/basicportallocator.h

Issue 1361183004: When doing DisableEquivalentPhases, exclude those AllocationSequences (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Removed the new state kTerminated 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 bool prepare_address); 175 bool prepare_address);
176 void OnCandidateReady(Port* port, const Candidate& c); 176 void OnCandidateReady(Port* port, const Candidate& c);
177 void OnPortComplete(Port* port); 177 void OnPortComplete(Port* port);
178 void OnPortError(Port* port); 178 void OnPortError(Port* port);
179 void OnProtocolEnabled(AllocationSequence* seq, ProtocolType proto); 179 void OnProtocolEnabled(AllocationSequence* seq, ProtocolType proto);
180 void OnPortDestroyed(PortInterface* port); 180 void OnPortDestroyed(PortInterface* port);
181 void OnShake(); 181 void OnShake();
182 void MaybeSignalCandidatesAllocationDone(); 182 void MaybeSignalCandidatesAllocationDone();
183 void OnPortAllocationComplete(AllocationSequence* seq); 183 void OnPortAllocationComplete(AllocationSequence* seq);
184 PortData* FindPort(Port* port); 184 PortData* FindPort(Port* port);
185 void GetNetworks(std::vector<rtc::Network*>* networks);
185 186
186 bool CheckCandidateFilter(const Candidate& c); 187 bool CheckCandidateFilter(const Candidate& c);
187 188
188 BasicPortAllocator* allocator_; 189 BasicPortAllocator* allocator_;
189 rtc::Thread* network_thread_; 190 rtc::Thread* network_thread_;
190 rtc::scoped_ptr<rtc::PacketSocketFactory> owned_socket_factory_; 191 rtc::scoped_ptr<rtc::PacketSocketFactory> owned_socket_factory_;
191 rtc::PacketSocketFactory* socket_factory_; 192 rtc::PacketSocketFactory* socket_factory_;
192 bool allocation_started_; 193 bool allocation_started_;
193 bool network_manager_started_; 194 bool network_manager_started_;
194 bool running_; // set when StartGetAllPorts is called 195 bool running_; // set when StartGetAllPorts is called
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 254
254 // kInit --> kRunning --> {kCompleted|kStopped} 255 // kInit --> kRunning --> {kCompleted|kStopped}
255 }; 256 };
256 AllocationSequence(BasicPortAllocatorSession* session, 257 AllocationSequence(BasicPortAllocatorSession* session,
257 rtc::Network* network, 258 rtc::Network* network,
258 PortConfiguration* config, 259 PortConfiguration* config,
259 uint32 flags); 260 uint32 flags);
260 ~AllocationSequence(); 261 ~AllocationSequence();
261 bool Init(); 262 bool Init();
262 void Clear(); 263 void Clear();
264 void RemoveNetwork();
263 265
264 State state() const { return state_; } 266 State state() const { return state_; }
267 const rtc::Network* network() const { return network_; }
265 268
266 // Disables the phases for a new sequence that this one already covers for an 269 // Disables the phases for a new sequence that this one already covers for an
267 // equivalent network setup. 270 // equivalent network setup.
268 void DisableEquivalentPhases(rtc::Network* network, 271 void DisableEquivalentPhases(rtc::Network* network,
269 PortConfiguration* config, 272 PortConfiguration* config,
270 uint32* flags); 273 uint32* flags);
271 274
272 // Starts and stops the sequence. When started, it will continue allocating 275 // Starts and stops the sequence. When started, it will continue allocating
273 // new ports on its own timed schedule. 276 // new ports on its own timed schedule.
274 void Start(); 277 void Start();
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 rtc::scoped_ptr<rtc::AsyncPacketSocket> udp_socket_; 323 rtc::scoped_ptr<rtc::AsyncPacketSocket> udp_socket_;
321 // There will be only one udp port per AllocationSequence. 324 // There will be only one udp port per AllocationSequence.
322 UDPPort* udp_port_; 325 UDPPort* udp_port_;
323 std::vector<TurnPort*> turn_ports_; 326 std::vector<TurnPort*> turn_ports_;
324 int phase_; 327 int phase_;
325 }; 328 };
326 329
327 } // namespace cricket 330 } // namespace cricket
328 331
329 #endif // WEBRTC_P2P_CLIENT_BASICPORTALLOCATOR_H_ 332 #endif // WEBRTC_P2P_CLIENT_BASICPORTALLOCATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698