#include <string>
#include <vector>
-#include "talk/base/messagequeue.h"
-#include "talk/p2p/base/transportchannelimpl.h"
-#include "talk/p2p/base/rawtransport.h"
#include "talk/p2p/base/candidate.h"
+#include "talk/p2p/base/rawtransport.h"
+#include "talk/p2p/base/transportchannelimpl.h"
+#include "webrtc/base/messagequeue.h"
#if defined(FEATURE_ENABLE_PSTN)
-namespace talk_base {
+namespace rtc {
class Thread;
}
// address of the other side. We pick a single address to send them based on
// a simple investigation of NAT type.
class RawTransportChannel : public TransportChannelImpl,
- public talk_base::MessageHandler {
+ public rtc::MessageHandler {
public:
RawTransportChannel(const std::string& content_name,
int component,
RawTransport* transport,
- talk_base::Thread *worker_thread,
+ rtc::Thread *worker_thread,
PortAllocator *allocator);
virtual ~RawTransportChannel();
// Implementation of normal channel packet sending.
virtual int SendPacket(const char *data, size_t len,
- const talk_base::PacketOptions& options, int flags);
- virtual int SetOption(talk_base::Socket::Option opt, int value);
+ const rtc::PacketOptions& options, int flags);
+ virtual int SetOption(rtc::Socket::Option opt, int value);
virtual int GetError();
// Implements TransportChannelImpl.
// have this since we now know where to send.
virtual void OnCandidate(const Candidate& candidate);
- void OnRemoteAddress(const talk_base::SocketAddress& remote_address);
+ void OnRemoteAddress(const rtc::SocketAddress& remote_address);
// Below ICE specific virtual methods not implemented.
virtual IceRole GetIceRole() const { return ICEROLE_UNKNOWN; }
virtual bool IsDtlsActive() const { return false; }
// Default implementation.
- virtual bool GetSslRole(talk_base::SSLRole* role) const {
+ virtual bool GetSslRole(rtc::SSLRole* role) const {
return false;
}
- virtual bool SetSslRole(talk_base::SSLRole role) {
+ virtual bool SetSslRole(rtc::SSLRole role) {
return false;
}
}
// Returns false because the channel is not DTLS.
- virtual bool GetLocalIdentity(talk_base::SSLIdentity** identity) const {
+ virtual bool GetLocalIdentity(rtc::SSLIdentity** identity) const {
return false;
}
- virtual bool GetRemoteCertificate(talk_base::SSLCertificate** cert) const {
+ virtual bool GetRemoteCertificate(rtc::SSLCertificate** cert) const {
return false;
}
return false;
}
- virtual bool SetLocalIdentity(talk_base::SSLIdentity* identity) {
+ virtual bool SetLocalIdentity(rtc::SSLIdentity* identity) {
return false;
}
private:
RawTransport* raw_transport_;
- talk_base::Thread *worker_thread_;
+ rtc::Thread *worker_thread_;
PortAllocator* allocator_;
PortAllocatorSession* allocator_session_;
StunPort* stun_port_;
RelayPort* relay_port_;
PortInterface* port_;
bool use_relay_;
- talk_base::SocketAddress remote_address_;
+ rtc::SocketAddress remote_address_;
// Called when the allocator creates another port.
void OnPortReady(PortAllocatorSession* session, PortInterface* port);
// Called when we receive a packet from the other client.
void OnReadPacket(PortInterface* port, const char* data, size_t size,
- const talk_base::SocketAddress& addr);
+ const rtc::SocketAddress& addr);
// Handles a message to destroy unused ports.
- virtual void OnMessage(talk_base::Message *msg);
+ virtual void OnMessage(rtc::Message *msg);
DISALLOW_EVIL_CONSTRUCTORS(RawTransportChannel);
};