Index: webrtc/p2p/base/icetransportinternal.h |
diff --git a/webrtc/p2p/base/icetransportinternal.h b/webrtc/p2p/base/icetransportinternal.h |
index 4c47a140a5145103bf1d259ccecdf5368d4fd7ea..e48b36ad10aee007cd562de3c0797875a77f3d9e 100644 |
--- a/webrtc/p2p/base/icetransportinternal.h |
+++ b/webrtc/p2p/base/icetransportinternal.h |
@@ -25,11 +25,12 @@ class MetricsObserverInterface; |
namespace cricket { |
-enum class TransportState { |
+// TODO(zhihuang): replace it with PeerConnectionInterface::IceConnectionState. |
+enum class IceTransportState { |
STATE_INIT, |
STATE_CONNECTING, // Will enter this state once a connection is created |
STATE_COMPLETED, |
- STATE_FAILEDs |
+ STATE_FAILED |
}; |
// TODO(zhihuang): Remove this once it's no longer used in |
@@ -44,9 +45,9 @@ enum IceProtocolType { |
// the IceTransportInterface will be split from this class. |
class IceTransportInternal : public rtc::PacketTransportInterface { |
public: |
- virtual ~IceTransportInternal(); |
+ virtual ~IceTransportInternal(){}; |
- virtual TransportState GetState() const = 0; |
+ virtual IceTransportState GetState() const = 0; |
virtual const std::string& transport_name() const = 0; |
@@ -95,6 +96,9 @@ class IceTransportInternal : public rtc::PacketTransportInterface { |
virtual IceGatheringState gathering_state() const = 0; |
+ // Returns the current stats for this connection. |
+ virtual bool GetStats(ConnectionInfos* infos) = 0; |
+ |
sigslot::signal1<IceTransportInternal*> SignalGatheringState; |
// Handles sending and receiving of candidates. |
@@ -119,11 +123,20 @@ class IceTransportInternal : public rtc::PacketTransportInterface { |
sigslot::signal4<IceTransportInternal*, CandidatePairInterface*, int, bool> |
SignalSelectedCandidatePairChanged; |
+ // Invoked when there is conflict in the ICE role between local and remote |
+ // agents. |
+ sigslot::signal1<IceTransportInternal*> SignalRoleConflict; |
+ |
+ // Emitted whenever the transport state changed. |
+ sigslot::signal1<IceTransportInternal*> SignalStateChanged; |
+ |
// Invoked when the transport is being destroyed. |
sigslot::signal1<IceTransportInternal*> SignalDestroyed; |
// Debugging description of this transport. |
- std::string ToString() const; |
+ std::string debug_name() const override { |
+ return transport_name() + " " + std::to_string(component()); |
+ } |
}; |
} // namespace cricket |