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/base/transport.h" | |
18 #include "webrtc/p2p/quic/quictransportchannel.h" | |
19 | |
20 namespace cricket { | |
21 | |
22 class P2PTransportChannel; | |
23 class PortAllocator; | |
24 | |
25 class QuicTransport : public Transport { | |
26 public: | |
27 QuicTransport(const std::string& name, | |
28 PortAllocator* allocator, | |
29 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate); | |
30 | |
31 ~QuicTransport() override; | |
32 | |
33 // Transport overrides. | |
34 void SetLocalCertificate( | |
35 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) override; | |
36 bool GetLocalCertificate( | |
37 rtc::scoped_refptr<rtc::RTCCertificate>* certificate) override; | |
38 bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version) override { | |
39 return true; // Not needed by QUIC | |
40 } | |
41 bool GetSslRole(rtc::SSLRole* ssl_role) const override; | |
42 | |
43 protected: | |
44 // Transport overrides. | |
45 QuicTransportChannel* CreateTransportChannel(int component) override; | |
46 void DestroyTransportChannel(TransportChannelImpl* channel) override; | |
47 bool ApplyLocalTransportDescription(TransportChannelImpl* channel, | |
48 std::string* error_desc) override; | |
49 bool NegotiateTransportDescription(ContentAction local_role, | |
50 std::string* error_desc) override; | |
51 bool ApplyNegotiatedTransportDescription(TransportChannelImpl* channel, | |
52 std::string* error_desc) override; | |
53 | |
54 private: | |
55 // QuicTransportChannel* => P2PTransportChanel* map that contains | |
56 // transport channels owned by this class. DestroyTransportChannel() uses this | |
57 // to delete the transport channels. | |
58 std::map<TransportChannelImpl*, P2PTransportChannel*> | |
59 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()
| |
60 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.
| |
61 rtc::SSLRole secure_role_; | |
pthatcher1
2016/04/12 00:13:12
And local_role_
mikescarlett
2016/04/12 19:28:17
Done.
| |
62 rtc::scoped_ptr<rtc::SSLFingerprint> remote_fingerprint_; | |
63 }; | |
64 | |
65 } // namespace cricket | |
66 | |
67 #endif // WEBRTC_P2P_QUIC_QUICTRANSPORT_H_ | |
OLD | NEW |