Index: webrtc/p2p/base/portallocator.h |
diff --git a/webrtc/p2p/base/portallocator.h b/webrtc/p2p/base/portallocator.h |
index 7d2a59f278ccb307ce0266ef89f65234eb291768..93c3352d18e73fe46fda90c483686d188f7b8df7 100644 |
--- a/webrtc/p2p/base/portallocator.h |
+++ b/webrtc/p2p/base/portallocator.h |
@@ -23,6 +23,11 @@ |
#include "webrtc/base/sigslot.h" |
#include "webrtc/base/thread.h" |
+namespace rtc { |
+class Network; |
+class NetworkManager; |
+} // namespace rtc |
+ |
namespace cricket { |
// PortAllocator is responsible for allocating Port types for a given |
@@ -165,6 +170,9 @@ class PortAllocatorSession : public sigslot::has_slots<> { |
virtual void ClearGettingPorts() = 0; |
// Whether the process of getting ports has been stopped. |
virtual bool IsGettingPorts() = 0; |
+ // Get ports and re-gather candidates on the given networks. |
+ // If |networks| is nullptr, get ports and candidates on all networks. |
+ virtual void GetPortsOnNetworks(const std::vector<rtc::Network*>* networks) {} |
pthatcher1
2016/06/07 18:54:34
I think this would be more clear with two methods:
|
// Another way of getting the information provided by the signals below. |
// |
@@ -172,6 +180,8 @@ class PortAllocatorSession : public sigslot::has_slots<> { |
// signals were emitted in. |
virtual std::vector<PortInterface*> ReadyPorts() const = 0; |
virtual std::vector<Candidate> ReadyCandidates() const = 0; |
+ // Returns the sanitized candidates on |port|. |
+ virtual std::vector<Candidate> ReadyCandidates(PortInterface* port) const = 0; |
virtual bool CandidatesAllocationDone() const = 0; |
sigslot::signal2<PortAllocatorSession*, PortInterface*> SignalPortReady; |
@@ -263,6 +273,8 @@ class PortAllocator : public sigslot::has_slots<> { |
// loopback interfaces. |
virtual void SetNetworkIgnoreMask(int network_ignore_mask) = 0; |
+ virtual rtc::NetworkManager* network_manager() const = 0; |
pthatcher1
2016/06/07 18:54:34
***
|
+ |
std::unique_ptr<PortAllocatorSession> CreateSession( |
const std::string& sid, |
const std::string& content_name, |