Qingsi Wang | 25ec888 | 2019-11-15 20:33:05 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018 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 P2P_BASE_DTLS_TRANSPORT_FACTORY_H_ |
| 12 | #define P2P_BASE_DTLS_TRANSPORT_FACTORY_H_ |
| 13 | |
| 14 | #include <memory> |
| 15 | #include <string> |
| 16 | |
| 17 | #include "p2p/base/dtls_transport_internal.h" |
| 18 | #include "p2p/base/ice_transport_internal.h" |
| 19 | |
| 20 | namespace cricket { |
| 21 | |
| 22 | // This interface is used to create DTLS transports. The external transports |
| 23 | // can be injected into the JsepTransportController through it. |
| 24 | // |
| 25 | // TODO(qingsi): Remove this factory in favor of one that produces |
| 26 | // DtlsTransportInterface given by the public API if this is going to be |
| 27 | // injectable. |
| 28 | class DtlsTransportFactory { |
| 29 | public: |
| 30 | virtual ~DtlsTransportFactory() = default; |
| 31 | |
| 32 | virtual std::unique_ptr<DtlsTransportInternal> CreateDtlsTransport( |
| 33 | IceTransportInternal* ice, |
Tommi | 653bab6 | 2021-04-03 15:53:54 | [diff] [blame] | 34 | const webrtc::CryptoOptions& crypto_options, |
| 35 | rtc::SSLProtocolVersion max_version) = 0; |
Qingsi Wang | 25ec888 | 2019-11-15 20:33:05 | [diff] [blame] | 36 | }; |
| 37 | |
| 38 | } // namespace cricket |
| 39 | |
| 40 | #endif // P2P_BASE_DTLS_TRANSPORT_FACTORY_H_ |