xref: /aosp_15_r20/external/webrtc/api/rtc_event_log/rtc_event_log_factory_interface.h (revision d9f758449e529ab9291ac668be2861e7a55c2422)
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_RTC_EVENT_LOG_RTC_EVENT_LOG_FACTORY_INTERFACE_H_
12 #define API_RTC_EVENT_LOG_RTC_EVENT_LOG_FACTORY_INTERFACE_H_
13 
14 #include <memory>
15 
16 #include "api/rtc_event_log/rtc_event_log.h"
17 
18 namespace webrtc {
19 
20 // This interface exists to allow webrtc to be optionally built without
21 // RtcEventLog support. A PeerConnectionFactory is constructed with an
22 // RtcEventLogFactoryInterface, which may or may not be null.
23 class RtcEventLogFactoryInterface {
24  public:
25   virtual ~RtcEventLogFactoryInterface() = default;
26 
27   virtual std::unique_ptr<RtcEventLog> Create(
28       RtcEventLog::EncodingType encoding_type) const = 0;
29   [[deprecated]] virtual std::unique_ptr<RtcEventLog> CreateRtcEventLog(
30       RtcEventLog::EncodingType encoding_type) = 0;
31 };
32 
33 }  // namespace webrtc
34 
35 #endif  // API_RTC_EVENT_LOG_RTC_EVENT_LOG_FACTORY_INTERFACE_H_
36