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.
5 #ifndef JINGLE_GLUE_RESOLVING_CLIENT_SOCKET_FACTORY_H_
6 #define JINGLE_GLUE_RESOLVING_CLIENT_SOCKET_FACTORY_H_
8 #include "base/memory/scoped_ptr.h"
11 class ClientSocketHandle;
13 class SSLClientSocket;
17 // TODO(sanjeevr): Move this to net/
19 namespace jingle_glue {
21 // Interface for a ClientSocketFactory that creates ClientSockets that can
22 // resolve host names and tunnel through proxies.
23 class ResolvingClientSocketFactory {
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;
30 virtual scoped_ptr<net::SSLClientSocket> CreateSSLClientSocket(
31 scoped_ptr<net::ClientSocketHandle> transport_socket,
32 const net::HostPortPair& host_and_port) = 0;
35 } // namespace jingle_glue
37 #endif // JINGLE_GLUE_RESOLVING_CLIENT_SOCKET_FACTORY_H_