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 P2P_CLIENT_TURN_PORT_FACTORY_H_
12 #define P2P_CLIENT_TURN_PORT_FACTORY_H_
13 
14 #include <memory>
15 
16 #include "p2p/base/port.h"
17 #include "p2p/client/relay_port_factory_interface.h"
18 #include "rtc_base/async_packet_socket.h"
19 
20 namespace cricket {
21 
22 // This is a RelayPortFactory that produces TurnPorts.
23 class TurnPortFactory : public RelayPortFactoryInterface {
24  public:
25   ~TurnPortFactory() override;
26 
27   std::unique_ptr<Port> Create(const CreateRelayPortArgs& args,
28                                rtc::AsyncPacketSocket* udp_socket) override;
29 
30   std::unique_ptr<Port> Create(const CreateRelayPortArgs& args,
31                                int min_port,
32                                int max_port) override;
33 };
34 
35 }  // namespace cricket
36 
37 #endif  // P2P_CLIENT_TURN_PORT_FACTORY_H_
38