blob: 6051409cc3c38d3cf2c4c436eea43311c4c29fdb [file] [log] [blame]
zhihuang38ede132017-06-15 12:52:32 -07001/*
2 * Copyright 2017 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
Steve Anton10542f22019-01-11 09:11:00 -080011#ifndef API_CALL_CALL_FACTORY_INTERFACE_H_
12#define API_CALL_CALL_FACTORY_INTERFACE_H_
zhihuang38ede132017-06-15 12:52:32 -070013
14#include <memory>
15
Mirko Bonadei35214fc2019-09-23 14:54:28 +020016#include "rtc_base/system/rtc_export.h"
17
zhihuang38ede132017-06-15 12:52:32 -070018namespace webrtc {
19
Niels Möller8366e172018-02-14 12:20:13 +010020// These classes are not part of the API, and are treated as opaque pointers.
21class Call;
22struct CallConfig;
23
zhihuang38ede132017-06-15 12:52:32 -070024// This interface exists to allow webrtc to be optionally built without media
25// support (i.e., if only being used for data channels). PeerConnectionFactory
26// is constructed with a CallFactoryInterface, which may or may not be null.
27class CallFactoryInterface {
28 public:
29 virtual ~CallFactoryInterface() {}
30
Niels Möller8366e172018-02-14 12:20:13 +010031 virtual Call* CreateCall(const CallConfig& config) = 0;
zhihuang38ede132017-06-15 12:52:32 -070032};
33
Mirko Bonadei35214fc2019-09-23 14:54:28 +020034RTC_EXPORT std::unique_ptr<CallFactoryInterface> CreateCallFactory();
zhihuang38ede132017-06-15 12:52:32 -070035
36} // namespace webrtc
37
Steve Anton10542f22019-01-11 09:11:00 -080038#endif // API_CALL_CALL_FACTORY_INTERFACE_H_