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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 virtual ~PortAllocatorSession() {} | 84 virtual ~PortAllocatorSession() {} |
85 | 85 |
86 uint32 flags() const { return flags_; } | 86 uint32 flags() const { return flags_; } |
87 void set_flags(uint32 flags) { flags_ = flags; } | 87 void set_flags(uint32 flags) { flags_ = flags; } |
88 std::string content_name() const { return content_name_; } | 88 std::string content_name() const { return content_name_; } |
89 int component() const { return component_; } | 89 int component() const { return component_; } |
90 | 90 |
91 // Starts gathering STUN and Relay configurations. | 91 // Starts gathering STUN and Relay configurations. |
92 virtual void StartGettingPorts() = 0; | 92 virtual void StartGettingPorts() = 0; |
93 virtual void StopGettingPorts() = 0; | 93 virtual void StopGettingPorts() = 0; |
| 94 // Only stop the existing gathering process but may start new ones if needed. |
| 95 virtual void ClearGettingPorts() = 0; |
| 96 // Whether the process of getting ports has been stopped. |
94 virtual bool IsGettingPorts() = 0; | 97 virtual bool IsGettingPorts() = 0; |
95 | 98 |
96 sigslot::signal2<PortAllocatorSession*, PortInterface*> SignalPortReady; | 99 sigslot::signal2<PortAllocatorSession*, PortInterface*> SignalPortReady; |
97 sigslot::signal2<PortAllocatorSession*, | 100 sigslot::signal2<PortAllocatorSession*, |
98 const std::vector<Candidate>&> SignalCandidatesReady; | 101 const std::vector<Candidate>&> SignalCandidatesReady; |
99 sigslot::signal1<PortAllocatorSession*> SignalCandidatesAllocationDone; | 102 sigslot::signal1<PortAllocatorSession*> SignalCandidatesAllocationDone; |
100 | 103 |
101 virtual uint32 generation() { return generation_; } | 104 virtual uint32 generation() { return generation_; } |
102 virtual void set_generation(uint32 generation) { generation_ = generation; } | 105 virtual void set_generation(uint32 generation) { generation_ = generation; } |
103 sigslot::signal1<PortAllocatorSession*> SignalDestroyed; | 106 sigslot::signal1<PortAllocatorSession*> SignalDestroyed; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 int max_port_; | 202 int max_port_; |
200 uint32 step_delay_; | 203 uint32 step_delay_; |
201 bool allow_tcp_listen_; | 204 bool allow_tcp_listen_; |
202 uint32 candidate_filter_; | 205 uint32 candidate_filter_; |
203 std::string origin_; | 206 std::string origin_; |
204 }; | 207 }; |
205 | 208 |
206 } // namespace cricket | 209 } // namespace cricket |
207 | 210 |
208 #endif // WEBRTC_P2P_BASE_PORTALLOCATOR_H_ | 211 #endif // WEBRTC_P2P_BASE_PORTALLOCATOR_H_ |
OLD | NEW |