xref: /aosp_15_r20/external/webrtc/rtc_base/network_monitor_factory.h (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1 /*
2  *  Copyright 2020 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 RTC_BASE_NETWORK_MONITOR_FACTORY_H_
12 #define RTC_BASE_NETWORK_MONITOR_FACTORY_H_
13 
14 namespace webrtc {
15 class FieldTrialsView;
16 }  // namespace webrtc
17 
18 namespace rtc {
19 
20 // Forward declaring this so it's not part of the API surface; it's only
21 // expected to be used by Android/iOS SDK code.
22 class NetworkMonitorInterface;
23 
24 /*
25  * NetworkMonitorFactory creates NetworkMonitors.
26  * Note that CreateNetworkMonitor is expected to be called on the network
27  * thread with the returned object only being used on that thread thereafter.
28  */
29 class NetworkMonitorFactory {
30  public:
31   virtual NetworkMonitorInterface* CreateNetworkMonitor(
32       const webrtc::FieldTrialsView& field_trials) = 0;
33 
34   virtual ~NetworkMonitorFactory();
35 
36  protected:
37   NetworkMonitorFactory();
38 };
39 
40 }  // namespace rtc
41 
42 #endif  // RTC_BASE_NETWORK_MONITOR_FACTORY_H_
43