Chromium Code Reviews| Index: webrtc/p2p/quic/quictransport.h |
| diff --git a/webrtc/p2p/quic/quictransport.h b/webrtc/p2p/quic/quictransport.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..050eb08a2d23049adbdf4ddd070548454412f8e5 |
| --- /dev/null |
| +++ b/webrtc/p2p/quic/quictransport.h |
| @@ -0,0 +1,67 @@ |
| +/* |
| + * Copyright 2016 The WebRTC Project Authors. All rights reserved. |
| + * |
| + * Use of this source code is governed by a BSD-style license |
| + * that can be found in the LICENSE file in the root of the source |
| + * tree. An additional intellectual property rights grant can be found |
| + * in the file PATENTS. All contributing project authors may |
| + * be found in the AUTHORS file in the root of the source tree. |
| + */ |
| + |
| +#ifndef WEBRTC_P2P_QUIC_QUICTRANSPORT_H_ |
| +#define WEBRTC_P2P_QUIC_QUICTRANSPORT_H_ |
| + |
| +#include <string> |
| +#include <map> |
| + |
| +#include "webrtc/p2p/base/transport.h" |
| +#include "webrtc/p2p/quic/quictransportchannel.h" |
| + |
| +namespace cricket { |
| + |
| +class P2PTransportChannel; |
| +class PortAllocator; |
| + |
| +class QuicTransport : public Transport { |
| + public: |
| + QuicTransport(const std::string& name, |
| + PortAllocator* allocator, |
| + const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); |
| + |
| + ~QuicTransport() override; |
| + |
| + // Transport overrides. |
| + void SetLocalCertificate( |
| + const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) override; |
| + bool GetLocalCertificate( |
| + rtc::scoped_refptr<rtc::RTCCertificate>* certificate) override; |
| + bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version) override { |
| + return true; // Not needed by QUIC |
| + } |
| + bool GetSslRole(rtc::SSLRole* ssl_role) const override; |
| + |
| + protected: |
| + // Transport overrides. |
| + QuicTransportChannel* CreateTransportChannel(int component) override; |
| + void DestroyTransportChannel(TransportChannelImpl* channel) override; |
| + bool ApplyLocalTransportDescription(TransportChannelImpl* channel, |
| + std::string* error_desc) override; |
| + bool NegotiateTransportDescription(ContentAction local_role, |
| + std::string* error_desc) override; |
| + bool ApplyNegotiatedTransportDescription(TransportChannelImpl* channel, |
| + std::string* error_desc) override; |
| + |
| + private: |
| + // QuicTransportChannel* => P2PTransportChanel* map that contains |
| + // transport channels owned by this class. DestroyTransportChannel() uses this |
| + // to delete the transport channels. |
| + std::map<TransportChannelImpl*, P2PTransportChannel*> |
| + ice_channel_by_quic_channel_; |
|
pthatcher1
2016/04/12 00:13:12
Why is this needed?
mikescarlett
2016/04/12 19:28:17
Removed. Not needed for DestroyTransportChannel()
|
| + rtc::scoped_refptr<rtc::RTCCertificate> certificate_; |
|
pthatcher1
2016/04/12 00:13:12
local_certificate_ might be a little more clear.
mikescarlett
2016/04/12 19:28:17
Done.
|
| + rtc::SSLRole secure_role_; |
|
pthatcher1
2016/04/12 00:13:12
And local_role_
mikescarlett
2016/04/12 19:28:17
Done.
|
| + rtc::scoped_ptr<rtc::SSLFingerprint> remote_fingerprint_; |
| +}; |
| + |
| +} // namespace cricket |
| + |
| +#endif // WEBRTC_P2P_QUIC_QUICTRANSPORT_H_ |