• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright 2019 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_ICE_CONTROLLER_FACTORY_INTERFACE_H_
12 #define P2P_BASE_ICE_CONTROLLER_FACTORY_INTERFACE_H_
13 
14 #include <memory>
15 #include <string>
16 
17 #include "p2p/base/ice_controller_interface.h"
18 #include "p2p/base/ice_transport_internal.h"
19 
20 namespace cricket {
21 
22 // struct with arguments to IceControllerFactoryInterface::Create
23 struct IceControllerFactoryArgs {
24   std::function<IceTransportState()> ice_transport_state_func;
25   std::function<IceRole()> ice_role_func;
26   std::function<bool(const Connection*)> is_connection_pruned_func;
27   const IceFieldTrials* ice_field_trials;
28   std::string ice_controller_field_trials;
29 };
30 
31 class IceControllerFactoryInterface {
32  public:
33   virtual ~IceControllerFactoryInterface() = default;
34   virtual std::unique_ptr<IceControllerInterface> Create(
35       const IceControllerFactoryArgs& args) = 0;
36 };
37 
38 }  // namespace cricket
39 
40 #endif  // P2P_BASE_ICE_CONTROLLER_FACTORY_INTERFACE_H_
41