OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_P2P_BASE_DTLSTRANSPORTINTERNAL_H_ | 11 #ifndef WEBRTC_P2P_BASE_DTLSTRANSPORTINTERNAL_H_ |
12 #define WEBRTC_P2P_BASE_DTLSTRANSPORTINTERNAL_H_ | 12 #define WEBRTC_P2P_BASE_DTLSTRANSPORTINTERNAL_H_ |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 #include <string> | 15 #include <string> |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
18 #include "webrtc/base/sslstreamadapter.h" | 18 #include "webrtc/base/sslstreamadapter.h" |
19 #include "webrtc/p2p/base/icetransportinternal.h" | 19 #include "webrtc/p2p/base/icetransportinternal.h" |
20 #include "webrtc/p2p/base/jseptransport.h" | 20 #include "webrtc/p2p/base/jseptransport.h" |
21 #include "webrtc/p2p/base/packettransportinterface.h" | 21 #include "webrtc/p2p/base/packettransportinterface.h" |
22 | 22 |
23 namespace cricket { | 23 namespace cricket { |
24 | 24 |
25 enum PacketFlags { | |
26 PF_NORMAL = 0x00, // A normal packet. | |
27 PF_SRTP_BYPASS = 0x01, // An encrypted SRTP packet; bypass any additional | |
28 // crypto provided by the transport (e.g. DTLS) | |
29 }; | |
30 | |
31 // DtlsTransportInternal is an internal interface that does DTLS. | 25 // DtlsTransportInternal is an internal interface that does DTLS. |
32 // Once the public interface is supported, | 26 // Once the public interface is supported, |
33 // (https://www.w3.org/TR/webrtc/#rtcdtlstransport-interface) | 27 // (https://www.w3.org/TR/webrtc/#rtcdtlstransport-interface) |
34 // the DtlsTransportInterface will be split from this class. | 28 // the DtlsTransportInterface will be split from this class. |
35 class DtlsTransportInternal : public rtc::PacketTransportInterface { | 29 class DtlsTransportInternal : public rtc::PacketTransportInterface { |
36 public: | 30 public: |
37 virtual ~DtlsTransportInternal() {} | 31 virtual ~DtlsTransportInternal() {} |
38 | 32 |
39 virtual DtlsTransportState dtls_state() const = 0; | 33 virtual DtlsTransportState dtls_state() const = 0; |
40 | 34 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 sigslot::signal2<DtlsTransportInternal*, DtlsTransportState> SignalDtlsState; | 87 sigslot::signal2<DtlsTransportInternal*, DtlsTransportState> SignalDtlsState; |
94 | 88 |
95 // Emitted whenever the Dtls handshake failed on some transport channel. | 89 // Emitted whenever the Dtls handshake failed on some transport channel. |
96 sigslot::signal1<rtc::SSLHandshakeError> SignalDtlsHandshakeError; | 90 sigslot::signal1<rtc::SSLHandshakeError> SignalDtlsHandshakeError; |
97 | 91 |
98 // Debugging description of this transport. | 92 // Debugging description of this transport. |
99 std::string debug_name() const override { | 93 std::string debug_name() const override { |
100 return transport_name() + " " + std::to_string(component()); | 94 return transport_name() + " " + std::to_string(component()); |
101 } | 95 } |
102 | 96 |
103 protected: | |
104 DtlsTransportInternal() {} | |
105 | |
106 private: | 97 private: |
107 RTC_DISALLOW_COPY_AND_ASSIGN(DtlsTransportInternal); | 98 RTC_DISALLOW_COPY_AND_ASSIGN(DtlsTransportInternal); |
108 }; | 99 }; |
109 | 100 |
110 } // namespace cricket | 101 } // namespace cricket |
111 | 102 |
112 #endif // WEBRTC_P2P_BASE_DTLSTRANSPORTINTERNAL_H_ | 103 #endif // WEBRTC_P2P_BASE_DTLSTRANSPORTINTERNAL_H_ |
OLD | NEW |