OLD | NEW |
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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 kStopped, // Stopped from running. | 281 kStopped, // Stopped from running. |
282 kCompleted, // All ports are allocated. | 282 kCompleted, // All ports are allocated. |
283 | 283 |
284 // kInit --> kRunning --> {kCompleted|kStopped} | 284 // kInit --> kRunning --> {kCompleted|kStopped} |
285 }; | 285 }; |
286 AllocationSequence(BasicPortAllocatorSession* session, | 286 AllocationSequence(BasicPortAllocatorSession* session, |
287 rtc::Network* network, | 287 rtc::Network* network, |
288 PortConfiguration* config, | 288 PortConfiguration* config, |
289 uint32_t flags); | 289 uint32_t flags); |
290 ~AllocationSequence(); | 290 ~AllocationSequence(); |
291 bool Init(); | 291 void Init(); |
292 void Clear(); | 292 void Clear(); |
293 void OnNetworkFailed(); | 293 void OnNetworkFailed(); |
294 | 294 |
295 State state() const { return state_; } | 295 State state() const { return state_; } |
296 rtc::Network* network() const { return network_; } | 296 rtc::Network* network() const { return network_; } |
297 | 297 |
298 bool network_failed() const { return network_failed_; } | 298 bool network_failed() const { return network_failed_; } |
299 void set_network_failed() { network_failed_ = true; } | 299 void set_network_failed() { network_failed_ = true; } |
300 | 300 |
301 // Disables the phases for a new sequence that this one already covers for an | 301 // Disables the phases for a new sequence that this one already covers for an |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 std::unique_ptr<rtc::AsyncPacketSocket> udp_socket_; | 356 std::unique_ptr<rtc::AsyncPacketSocket> udp_socket_; |
357 // There will be only one udp port per AllocationSequence. | 357 // There will be only one udp port per AllocationSequence. |
358 UDPPort* udp_port_; | 358 UDPPort* udp_port_; |
359 std::vector<TurnPort*> turn_ports_; | 359 std::vector<TurnPort*> turn_ports_; |
360 int phase_; | 360 int phase_; |
361 }; | 361 }; |
362 | 362 |
363 } // namespace cricket | 363 } // namespace cricket |
364 | 364 |
365 #endif // WEBRTC_P2P_CLIENT_BASICPORTALLOCATOR_H_ | 365 #endif // WEBRTC_P2P_CLIENT_BASICPORTALLOCATOR_H_ |
OLD | NEW |