| Index: webrtc/p2p/base/transportchannel.h
|
| diff --git a/webrtc/p2p/base/transportchannel.h b/webrtc/p2p/base/transportchannel.h
|
| index 9b0ac7bd5bcae60bd95d6c1c5c264d363c2e1160..f117e0127f2d222eb07500f303d7734e61b53290 100644
|
| --- a/webrtc/p2p/base/transportchannel.h
|
| +++ b/webrtc/p2p/base/transportchannel.h
|
| @@ -18,6 +18,7 @@
|
| #include "webrtc/base/constructormagic.h"
|
| #include "webrtc/p2p/base/candidate.h"
|
| #include "webrtc/p2p/base/candidatepairinterface.h"
|
| +#include "webrtc/p2p/base/packettransport.h"
|
| #include "webrtc/p2p/base/transport.h"
|
| #include "webrtc/p2p/base/transportdescription.h"
|
| #include "webrtc/base/asyncpacketsocket.h"
|
| @@ -51,7 +52,7 @@ enum TransportChannelState {
|
| // between the two sides of a session.
|
| // TODO(deadbeef): This interface currently represents the unity of an ICE
|
| // transport and a DTLS transport. They need to be separated apart.
|
| -class TransportChannel : public sigslot::has_slots<> {
|
| +class TransportChannel : public rtc::PacketTransport {
|
| public:
|
| TransportChannel(const std::string& transport_name, int component)
|
| : transport_name_(transport_name),
|
| @@ -66,41 +67,19 @@ class TransportChannel : public sigslot::has_slots<> {
|
| return TransportChannelState::STATE_CONNECTING;
|
| }
|
|
|
| - const std::string& transport_name() const { return transport_name_; }
|
| - int component() const { return component_; }
|
| + const std::string& transport_name() const override { return transport_name_; }
|
| + int component() const override { return component_; }
|
|
|
| // Returns the states of this channel. Each time one of these states changes,
|
| // a signal is raised. These states are aggregated by the TransportManager.
|
| - bool writable() const { return writable_; }
|
| + bool writable() const override { return writable_; }
|
| bool receiving() const { return receiving_; }
|
| DtlsTransportState dtls_state() const { return dtls_state_; }
|
| - sigslot::signal1<TransportChannel*> SignalWritableState;
|
| - // Emitted when the TransportChannel's ability to send has changed.
|
| - sigslot::signal1<TransportChannel*> SignalReadyToSend;
|
| sigslot::signal1<TransportChannel*> SignalReceivingState;
|
| // Emitted whenever DTLS-SRTP is setup which will require setting up a new
|
| // SRTP context.
|
| sigslot::signal2<TransportChannel*, DtlsTransportState> SignalDtlsState;
|
|
|
| - // Attempts to send the given packet. The return value is < 0 on failure.
|
| - // TODO: Remove the default argument once channel code is updated.
|
| - virtual int SendPacket(const char* data, size_t len,
|
| - const rtc::PacketOptions& options,
|
| - int flags = 0) = 0;
|
| -
|
| - // Sets a socket option on this channel. Note that not all options are
|
| - // supported by all transport types.
|
| - virtual int SetOption(rtc::Socket::Option opt, int value) = 0;
|
| - // TODO(pthatcher): Once Chrome's MockTransportChannel implments
|
| - // this, remove the default implementation.
|
| - virtual bool GetOption(rtc::Socket::Option opt, int* value) { return false; }
|
| -
|
| - // Returns the most recent error that occurred on this channel.
|
| - virtual int GetError() = 0;
|
| -
|
| - // Returns the current stats for this connection.
|
| - virtual bool GetStats(ConnectionInfos* infos) = 0;
|
| -
|
| // Is DTLS active?
|
| virtual bool IsDtlsActive() const = 0;
|
|
|
| @@ -139,13 +118,6 @@ class TransportChannel : public sigslot::has_slots<> {
|
| uint8_t* result,
|
| size_t result_len) = 0;
|
|
|
| - // Signalled each time a packet is received on this channel.
|
| - sigslot::signal5<TransportChannel*, const char*,
|
| - size_t, const rtc::PacketTime&, int> SignalReadPacket;
|
| -
|
| - // Signalled each time a packet is sent on this channel.
|
| - sigslot::signal2<TransportChannel*, const rtc::SentPacket&> SignalSentPacket;
|
| -
|
| // Deprecated by SignalSelectedCandidatePairChanged
|
| // This signal occurs when there is a change in the way that packets are
|
| // being routed, i.e. to a different remote location. The candidate
|
|
|