call_factory_interface.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. #ifndef API_CALL_CALL_FACTORY_INTERFACE_H_
  11. #define API_CALL_CALL_FACTORY_INTERFACE_H_
  12. #include <memory>
  13. #include "rtc_base/system/rtc_export.h"
  14. namespace webrtc {
  15. // These classes are not part of the API, and are treated as opaque pointers.
  16. class Call;
  17. struct CallConfig;
  18. // This interface exists to allow webrtc to be optionally built without media
  19. // support (i.e., if only being used for data channels). PeerConnectionFactory
  20. // is constructed with a CallFactoryInterface, which may or may not be null.
  21. class CallFactoryInterface {
  22. public:
  23. virtual ~CallFactoryInterface() {}
  24. virtual Call* CreateCall(const CallConfig& config) = 0;
  25. };
  26. RTC_EXPORT std::unique_ptr<CallFactoryInterface> CreateCallFactory();
  27. } // namespace webrtc
  28. #endif // API_CALL_CALL_FACTORY_INTERFACE_H_