blob: c3d5b41a9ca748b18548ccabd9144d1a0b328938 [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
zhihuang38ede132017-06-15 12:52:32 -070016namespace webrtc {
17
Niels Möller8366e172018-02-14 12:20:13 +010018// These classes are not part of the API, and are treated as opaque pointers.
19class Call;
20struct CallConfig;
21
zhihuang38ede132017-06-15 12:52:32 -070022// This interface exists to allow webrtc to be optionally built without media
23// support (i.e., if only being used for data channels). PeerConnectionFactory
24// is constructed with a CallFactoryInterface, which may or may not be null.
25class CallFactoryInterface {
26 public:
27 virtual ~CallFactoryInterface() {}
28
Niels Möller8366e172018-02-14 12:20:13 +010029 virtual Call* CreateCall(const CallConfig& config) = 0;
zhihuang38ede132017-06-15 12:52:32 -070030};
31
32std::unique_ptr<CallFactoryInterface> CreateCallFactory();
33
34} // namespace webrtc
35
Steve Anton10542f22019-01-11 09:11:00 -080036#endif // API_CALL_CALL_FACTORY_INTERFACE_H_