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
10namespace net {
11class ClientSocketHandle;
12class HostPortPair;
13class SSLClientSocket;
14class StreamSocket;
15}  // namespace net
16
17// TODO(sanjeevr): Move this to net/
18
19namespace jingle_glue {
20
21// Interface for a ClientSocketFactory that creates ClientSockets that can
22// resolve host names and tunnel through proxies.
23class 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_
38