OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef REMOTING_PROTOCOL_LIBJINGLE_TRANSPORT_FACTORY_H_ | 5 #ifndef REMOTING_PROTOCOL_LIBJINGLE_TRANSPORT_FACTORY_H_ |
6 #define REMOTING_PROTOCOL_LIBJINGLE_TRANSPORT_FACTORY_H_ | 6 #define REMOTING_PROTOCOL_LIBJINGLE_TRANSPORT_FACTORY_H_ |
7 | 7 |
8 #include "remoting/protocol/transport.h" | 8 #include "remoting/protocol/transport.h" |
9 | 9 |
| 10 namespace cricket { |
| 11 class PortAllocator; |
| 12 } // namespace cricket |
| 13 |
10 namespace talk_base { | 14 namespace talk_base { |
11 class NetworkManager; | 15 class NetworkManager; |
12 class PacketSocketFactory; | 16 class PacketSocketFactory; |
13 } // namespace talk_base | 17 } // namespace talk_base |
14 | 18 |
15 namespace remoting { | 19 namespace remoting { |
16 namespace protocol { | 20 namespace protocol { |
17 | 21 |
18 class LibjingleTransportFactory : public TransportFactory { | 22 class LibjingleTransportFactory : public TransportFactory { |
19 public: | 23 public: |
| 24 LibjingleTransportFactory( |
| 25 scoped_ptr<talk_base::NetworkManager> network_manager, |
| 26 scoped_ptr<talk_base::PacketSocketFactory> socket_factory, |
| 27 scoped_ptr<cricket::PortAllocator> port_allocator, |
| 28 bool incoming_only); |
| 29 |
| 30 // Creates BasicNetworkManager, BasicPacketSocketFactory and |
| 31 // BasicPortAllocator. |
20 LibjingleTransportFactory(); | 32 LibjingleTransportFactory(); |
| 33 |
21 virtual ~LibjingleTransportFactory(); | 34 virtual ~LibjingleTransportFactory(); |
22 | 35 |
23 virtual scoped_ptr<StreamTransport> CreateStreamTransport() OVERRIDE; | 36 virtual scoped_ptr<StreamTransport> CreateStreamTransport() OVERRIDE; |
24 virtual scoped_ptr<DatagramTransport> CreateDatagramTransport() OVERRIDE; | 37 virtual scoped_ptr<DatagramTransport> CreateDatagramTransport() OVERRIDE; |
25 | 38 |
26 private: | 39 private: |
27 scoped_ptr<talk_base::NetworkManager> network_manager_; | 40 scoped_ptr<talk_base::NetworkManager> network_manager_; |
28 scoped_ptr<talk_base::PacketSocketFactory> socket_factory_; | 41 scoped_ptr<talk_base::PacketSocketFactory> socket_factory_; |
| 42 scoped_ptr<cricket::PortAllocator> port_allocator_; |
| 43 bool incoming_only_; |
29 | 44 |
30 DISALLOW_COPY_AND_ASSIGN(LibjingleTransportFactory); | 45 DISALLOW_COPY_AND_ASSIGN(LibjingleTransportFactory); |
31 }; | 46 }; |
32 | 47 |
33 } // namespace protocol | 48 } // namespace protocol |
34 } // namespace remoting | 49 } // namespace remoting |
35 | 50 |
36 #endif // REMOTING_PROTOCOL_LIBJINGLE_TRANSPORT_FACTORY_H_ | 51 #endif // REMOTING_PROTOCOL_LIBJINGLE_TRANSPORT_FACTORY_H_ |
OLD | NEW |