- add sources.
[platform/framework/web/crosswalk.git] / src / jingle / glue / resolving_client_socket_factory.h
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
3 // found in the LICENSE file.
4
5 #ifndef JINGLE_GLUE_RESOLVING_CLIENT_SOCKET_FACTORY_H_
6 #define JINGLE_GLUE_RESOLVING_CLIENT_SOCKET_FACTORY_H_
7
8 #include "base/memory/scoped_ptr.h"
9
10 namespace net {
11 class ClientSocketHandle;
12 class HostPortPair;
13 class SSLClientSocket;
14 class StreamSocket;
15 }  // namespace net
16
17 // TODO(sanjeevr): Move this to net/
18
19 namespace jingle_glue {
20
21 // Interface for a ClientSocketFactory that creates ClientSockets that can
22 // resolve host names and tunnel through proxies.
23 class ResolvingClientSocketFactory {
24  public:
25   virtual ~ResolvingClientSocketFactory() { }
26   // Method to create a transport socket using a HostPortPair.
27   virtual scoped_ptr<net::StreamSocket> CreateTransportClientSocket(
28       const net::HostPortPair& host_and_port) = 0;
29
30   virtual scoped_ptr<net::SSLClientSocket> CreateSSLClientSocket(
31       scoped_ptr<net::ClientSocketHandle> transport_socket,
32       const net::HostPortPair& host_and_port) = 0;
33 };
34
35 }  // namespace jingle_glue
36
37 #endif  // JINGLE_GLUE_RESOLVING_CLIENT_SOCKET_FACTORY_H_