summaryrefslogtreecommitdiff
path: root/chromium/jingle/glue/resolving_client_socket_factory.h
blob: d1b9fc1f389f42b2bfbe912981b99b93a5beda99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef JINGLE_GLUE_RESOLVING_CLIENT_SOCKET_FACTORY_H_
#define JINGLE_GLUE_RESOLVING_CLIENT_SOCKET_FACTORY_H_

#include "base/memory/scoped_ptr.h"

namespace net {
class ClientSocketHandle;
class HostPortPair;
class SSLClientSocket;
class StreamSocket;
}  // namespace net

// TODO(sanjeevr): Move this to net/

namespace jingle_glue {

// Interface for a ClientSocketFactory that creates ClientSockets that can
// resolve host names and tunnel through proxies.
class ResolvingClientSocketFactory {
 public:
  virtual ~ResolvingClientSocketFactory() { }
  // Method to create a transport socket using a HostPortPair.
  virtual scoped_ptr<net::StreamSocket> CreateTransportClientSocket(
      const net::HostPortPair& host_and_port) = 0;

  virtual scoped_ptr<net::SSLClientSocket> CreateSSLClientSocket(
      scoped_ptr<net::ClientSocketHandle> transport_socket,
      const net::HostPortPair& host_and_port) = 0;
};

}  // namespace jingle_glue

#endif  // JINGLE_GLUE_RESOLVING_CLIENT_SOCKET_FACTORY_H_