blob: 7c4a24adc896a046817a8185503554c81ff5a7c9 [file] [log] [blame]
Qingsi Wang25ec8882019-11-15 20:33:051/*
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
20namespace 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.
28class DtlsTransportFactory {
29 public:
30 virtual ~DtlsTransportFactory() = default;
31
32 virtual std::unique_ptr<DtlsTransportInternal> CreateDtlsTransport(
33 IceTransportInternal* ice,
Tommi653bab62021-04-03 15:53:5434 const webrtc::CryptoOptions& crypto_options,
35 rtc::SSLProtocolVersion max_version) = 0;
Qingsi Wang25ec8882019-11-15 20:33:0536};
37
38} // namespace cricket
39
40#endif // P2P_BASE_DTLS_TRANSPORT_FACTORY_H_