• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
11 #ifndef API_CALL_CALL_FACTORY_INTERFACE_H_
12 #define API_CALL_CALL_FACTORY_INTERFACE_H_
13 
14 #include <memory>
15 
16 #include "rtc_base/system/rtc_export.h"
17 
18 namespace webrtc {
19 
20 // These classes are not part of the API, and are treated as opaque pointers.
21 class Call;
22 struct CallConfig;
23 
24 // 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.
27 class CallFactoryInterface {
28  public:
~CallFactoryInterface()29   virtual ~CallFactoryInterface() {}
30 
31   virtual Call* CreateCall(const CallConfig& config) = 0;
32 };
33 
34 RTC_EXPORT std::unique_ptr<CallFactoryInterface> CreateCallFactory();
35 
36 }  // namespace webrtc
37 
38 #endif  // API_CALL_CALL_FACTORY_INTERFACE_H_
39