xref: /aosp_15_r20/external/webrtc/p2p/base/active_ice_controller_factory_interface.h (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1 /*
2  *  Copyright 2022 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 P2P_BASE_ACTIVE_ICE_CONTROLLER_FACTORY_INTERFACE_H_
12 #define P2P_BASE_ACTIVE_ICE_CONTROLLER_FACTORY_INTERFACE_H_
13 
14 #include <memory>
15 
16 #include "p2p/base/active_ice_controller_interface.h"
17 #include "p2p/base/ice_agent_interface.h"
18 #include "p2p/base/ice_controller_factory_interface.h"
19 
20 namespace cricket {
21 
22 // An active ICE controller may be constructed with the same arguments as a
23 // legacy ICE controller. Additionally, an ICE agent must be provided for the
24 // active ICE controller to interact with.
25 struct ActiveIceControllerFactoryArgs {
26   IceControllerFactoryArgs legacy_args;
27   IceAgentInterface* ice_agent;
28 };
29 
30 class ActiveIceControllerFactoryInterface {
31  public:
32   virtual ~ActiveIceControllerFactoryInterface() = default;
33   virtual std::unique_ptr<ActiveIceControllerInterface> Create(
34       const ActiveIceControllerFactoryArgs&) = 0;
35 };
36 
37 }  // namespace cricket
38 
39 #endif  // P2P_BASE_ACTIVE_ICE_CONTROLLER_FACTORY_INTERFACE_H_
40