Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license | |
| 5 * that can be found in the LICENSE file in the root of the source | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 | |
| 11 #ifndef WEBRTC_P2P_QUIC_QUICTRANSPORT_H_ | |
| 12 #define WEBRTC_P2P_QUIC_QUICTRANSPORT_H_ | |
| 13 | |
| 14 #include <string> | |
| 15 #include <map> | |
| 16 | |
| 17 #include "webrtc/p2p/quic/quictransportchannel.h" | |
| 18 #include "webrtc/p2p/base/p2ptransportchannel.h" | |
|
Taylor Brandstetter
2016/04/05 22:13:49
You should be able to forward declare P2PTransport
mikescarlett
2016/04/06 18:43:44
Done. Also I realize that transport.h should be in
| |
| 19 | |
| 20 namespace cricket { | |
| 21 | |
| 22 class PortAllocator; | |
| 23 | |
| 24 class QuicTransport : public Transport { | |
| 25 public: | |
| 26 QuicTransport(const std::string& name, | |
| 27 PortAllocator* allocator, | |
| 28 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); | |
| 29 | |
| 30 ~QuicTransport() override; | |
| 31 | |
| 32 // Transport overrides. | |
| 33 void SetLocalCertificate( | |
| 34 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) override; | |
| 35 bool GetLocalCertificate( | |
| 36 rtc::scoped_refptr<rtc::RTCCertificate>* certificate) override; | |
| 37 bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version) override { | |
| 38 return true; // Not needed by QUIC | |
| 39 } | |
| 40 bool GetSslRole(rtc::SSLRole* ssl_role) const override; | |
| 41 | |
| 42 protected: | |
| 43 // Transport overrides. | |
| 44 QuicTransportChannel* CreateTransportChannel(int component) override; | |
| 45 void DestroyTransportChannel(TransportChannelImpl* channel) override; | |
| 46 bool ApplyLocalTransportDescription(TransportChannelImpl* channel, | |
| 47 std::string* error_desc) override; | |
| 48 bool NegotiateTransportDescription(ContentAction local_role, | |
| 49 std::string* error_desc) override; | |
| 50 bool ApplyNegotiatedTransportDescription(TransportChannelImpl* channel, | |
| 51 std::string* error_desc) override; | |
| 52 | |
| 53 private: | |
| 54 // QuicTransportChannel* => P2PTransportChanel* map that contains | |
| 55 // transport channels owned by this class. DestroyTransportChannel() uses this | |
| 56 // to delete the transport channels. | |
| 57 std::map<TransportChannelImpl*, P2PTransportChannel*> | |
| 58 ice_channel_by_quic_channel_; | |
| 59 rtc::scoped_refptr<rtc::RTCCertificate> certificate_; | |
| 60 rtc::SSLRole secure_role_; | |
| 61 rtc::scoped_ptr<rtc::SSLFingerprint> remote_fingerprint_; | |
| 62 }; | |
| 63 | |
| 64 } // namespace cricket | |
| 65 | |
| 66 #endif // WEBRTC_P2P_QUIC_QUICTRANSPORT_H_ | |
| OLD | NEW |