zhihuang | 38ede13 | 2017-06-15 12:52:32 -0700 | [diff] [blame] | 1 | /* |
| 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 Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame^] | 11 | #ifndef API_CALL_CALL_FACTORY_INTERFACE_H_ |
| 12 | #define API_CALL_CALL_FACTORY_INTERFACE_H_ |
zhihuang | 38ede13 | 2017-06-15 12:52:32 -0700 | [diff] [blame] | 13 | |
| 14 | #include <memory> |
| 15 | |
zhihuang | 38ede13 | 2017-06-15 12:52:32 -0700 | [diff] [blame] | 16 | namespace webrtc { |
| 17 | |
Niels Möller | 8366e17 | 2018-02-14 12:20:13 +0100 | [diff] [blame] | 18 | // These classes are not part of the API, and are treated as opaque pointers. |
| 19 | class Call; |
| 20 | struct CallConfig; |
| 21 | |
zhihuang | 38ede13 | 2017-06-15 12:52:32 -0700 | [diff] [blame] | 22 | // 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. |
| 25 | class CallFactoryInterface { |
| 26 | public: |
| 27 | virtual ~CallFactoryInterface() {} |
| 28 | |
Niels Möller | 8366e17 | 2018-02-14 12:20:13 +0100 | [diff] [blame] | 29 | virtual Call* CreateCall(const CallConfig& config) = 0; |
zhihuang | 38ede13 | 2017-06-15 12:52:32 -0700 | [diff] [blame] | 30 | }; |
| 31 | |
| 32 | std::unique_ptr<CallFactoryInterface> CreateCallFactory(); |
| 33 | |
| 34 | } // namespace webrtc |
| 35 | |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame^] | 36 | #endif // API_CALL_CALL_FACTORY_INTERFACE_H_ |