Index: webrtc/p2p/client/basicportallocator.h |
diff --git a/webrtc/p2p/client/basicportallocator.h b/webrtc/p2p/client/basicportallocator.h |
index a27ff4c6274f66e9b783d45238eaf83cee6fbe9f..f2c4a0ab516e99d986bc916ec8d2e95a82c2582a 100644 |
--- a/webrtc/p2p/client/basicportallocator.h |
+++ b/webrtc/p2p/client/basicportallocator.h |
@@ -182,6 +182,7 @@ class BasicPortAllocatorSession : public PortAllocatorSession, |
void MaybeSignalCandidatesAllocationDone(); |
void OnPortAllocationComplete(AllocationSequence* seq); |
PortData* FindPort(Port* port); |
+ void GetNetworks(std::vector<rtc::Network*>* networks); |
bool CheckCandidateFilter(const Candidate& c); |
@@ -250,8 +251,12 @@ class AllocationSequence : public rtc::MessageHandler, |
kRunning, // Started allocating ports. |
kStopped, // Stopped from running. |
kCompleted, // All ports are allocated. |
+ kTerminated, // An AllocationSequence is terminated when the network |
+ // it depends on is removed (disconnected). |
pthatcher1
2015/09/24 17:11:43
How is that different than kStopped?
honghaiz3
2015/09/24 19:27:00
Removed the state.
|
// kInit --> kRunning --> {kCompleted|kStopped} |
+ // | | | |
+ // --------------------------------> kTerminated |
}; |
AllocationSequence(BasicPortAllocatorSession* session, |
rtc::Network* network, |
@@ -260,8 +265,11 @@ class AllocationSequence : public rtc::MessageHandler, |
~AllocationSequence(); |
bool Init(); |
void Clear(); |
+ void Terminate(); |
+ bool IsTerminated() { return state_ == kTerminated; } |
pthatcher1
2015/09/24 17:11:43
Is this needed when you can just do state() == kTe
honghaiz3
2015/09/24 19:27:00
Removed the new state.
|
State state() const { return state_; } |
+ const rtc::Network* network() const { return network_; } |
// Disables the phases for a new sequence that this one already covers for an |
// equivalent network setup. |