Chromium Code Reviews| Index: webrtc/api/quicdatatransport.h |
| diff --git a/webrtc/api/quicdatatransport.h b/webrtc/api/quicdatatransport.h |
| index 96fe2a0ad73ebf2c56bdea41090ca53604f3df1f..6cc7af51ffb0fbd75dae1e53675a88941dd214a1 100644 |
| --- a/webrtc/api/quicdatatransport.h |
| +++ b/webrtc/api/quicdatatransport.h |
| @@ -19,6 +19,7 @@ |
| #include "webrtc/base/scoped_ref_ptr.h" |
| #include "webrtc/base/sigslot.h" |
| #include "webrtc/base/thread.h" |
| +#include "webrtc/p2p/base/transportcontroller.h" |
| namespace cricket { |
| class QuicTransportChannel; |
| @@ -38,7 +39,8 @@ class QuicDataTransport : public sigslot::has_slots<> { |
| public: |
| QuicDataTransport(rtc::Thread* signaling_thread, |
| rtc::Thread* worker_thread, |
| - rtc::Thread* network_thread); |
| + rtc::Thread* network_thread, |
| + cricket::TransportController* transport_controller); |
| ~QuicDataTransport() override; |
| // Sets the QUIC transport channel for the QuicDataChannels and the |
| @@ -47,6 +49,8 @@ class QuicDataTransport : public sigslot::has_slots<> { |
| // QuicDataChannels, or |channel| is NULL. |
| bool SetTransportChannel(cricket::QuicTransportChannel* channel); |
| + bool SetTransport(const std::string& transport_name); |
| + |
| // Creates a QuicDataChannel that uses this QuicDataTransport. |
| rtc::scoped_refptr<DataChannelInterface> CreateDataChannel( |
| const std::string& label, |
| @@ -62,6 +66,15 @@ class QuicDataTransport : public sigslot::has_slots<> { |
| // True if the QuicDataTransport has data channels. |
| bool HasDataChannels() const; |
| + const std::string& transport_name() const { return transport_name_; } |
| + void set_transport_name(const std::string& transport_name) { |
| + transport_name_ = transport_name; |
| + } |
| + const std::string& content_name() const { return content_name_; } |
| + void set_content_name(const std::string& content_name) { |
| + content_name_ = content_name; |
| + } |
|
pthatcher1
2016/07/22 17:57:57
Can you put this together with SetTransport and pu
Zhi Huang
2016/07/25 23:40:36
Done.
|
| + |
| private: |
| // Called from the QuicTransportChannel when a ReliableQuicStream is created |
| // to receive incoming data. |
| @@ -74,6 +87,9 @@ class QuicDataTransport : public sigslot::has_slots<> { |
| const char* data, |
| size_t len); |
| + bool SetTransport_n(const std::string& transport_name); |
| + void DestroyTransportChannels_n(); |
| + |
| // Map of data channel ID => QUIC data channel values. |
| std::unordered_map<int, rtc::scoped_refptr<QuicDataChannel>> |
| data_channel_by_id_; |
| @@ -86,6 +102,11 @@ class QuicDataTransport : public sigslot::has_slots<> { |
| rtc::Thread* const signaling_thread_; |
| rtc::Thread* const worker_thread_; |
| rtc::Thread* const network_thread_; |
| + |
| + std::string content_name_; |
| + // Transport related members that should be accessed from network thread. |
| + cricket::TransportController* transport_controller_; |
| + std::string transport_name_; |
| }; |
| } // namespace webrtc |