blob: f3a174f228f9064dc867060794afdd86f428d704 [file] [log] [blame]
Harald Alvestrand98462622019-01-30 14:57:03 +01001/*
2 * Copyright 2019 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 API_ICE_TRANSPORT_FACTORY_H_
12#define API_ICE_TRANSPORT_FACTORY_H_
13
14#include "api/ice_transport_interface.h"
15#include "api/scoped_refptr.h"
Mirko Bonadei66e76792019-04-02 11:33:59 +020016#include "rtc_base/system/rtc_export.h"
Harald Alvestrand98462622019-01-30 14:57:03 +010017
18namespace cricket {
19class PortAllocator;
20}
21
22namespace webrtc {
23
24// Static factory for an IceTransport object that can be created
25// without using a webrtc::PeerConnection.
26// The returned object must be accessed and destroyed on the thread that
27// created it.
28// The PortAllocator must outlive the created IceTransportInterface object.
Mirko Bonadei66e76792019-04-02 11:33:59 +020029RTC_EXPORT rtc::scoped_refptr<IceTransportInterface> CreateIceTransport(
Harald Alvestrand98462622019-01-30 14:57:03 +010030 cricket::PortAllocator* port_allocator);
31
32} // namespace webrtc
33
34#endif // API_ICE_TRANSPORT_FACTORY_H_