Bumping manifests a=b2g-bump
[gecko.git] / netwerk / socket / nsISocketProvider.idl
blob57f6c4d7060a8da983d1a2799c983560cae0c759
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
8 [ptr] native PRFileDescStar(struct PRFileDesc);
10 /**
11 * nsISocketProvider
13 [scriptable, uuid(00b3df92-e830-11d8-d48e-0004e22243f8)]
14 interface nsISocketProvider : nsISupports
16 /**
17 * newSocket
19 * @param aFamily
20 * The address family for this socket (PR_AF_INET or PR_AF_INET6).
21 * @param aHost
22 * The hostname for this connection.
23 * @param aPort
24 * The port for this connection.
25 * @param aProxyHost
26 * If non-null, the proxy hostname for this connection.
27 * @param aProxyPort
28 * The proxy port for this connection.
29 * @param aFlags
30 * Control flags that govern this connection (see below.)
31 * @param aFileDesc
32 * The resulting PRFileDesc.
33 * @param aSecurityInfo
34 * Any security info that should be associated with aFileDesc. This
35 * object typically implements nsITransportSecurityInfo.
37 [noscript]
38 void newSocket(in long aFamily,
39 in string aHost,
40 in long aPort,
41 in string aProxyHost,
42 in long aProxyPort,
43 in unsigned long aFlags,
44 out PRFileDescStar aFileDesc,
45 out nsISupports aSecurityInfo);
47 /**
48 * addToSocket
50 * This function is called to allow the socket provider to layer a
51 * PRFileDesc on top of another PRFileDesc. For example, SSL via a SOCKS
52 * proxy.
54 * Parameters are the same as newSocket with the exception of aFileDesc,
55 * which is an in-param instead.
57 [noscript]
58 void addToSocket(in long aFamily,
59 in string aHost,
60 in long aPort,
61 in string aProxyHost,
62 in long aProxyPort,
63 in unsigned long aFlags,
64 in PRFileDescStar aFileDesc,
65 out nsISupports aSecurityInfo);
67 /**
68 * PROXY_RESOLVES_HOST
70 * This flag is set if the proxy is to perform hostname resolution instead
71 * of the client. When set, the hostname parameter passed when in this
72 * interface will be used instead of the address structure passed for a
73 * later connect et al. request.
75 const long PROXY_RESOLVES_HOST = 1 << 0;
77 /**
78 * When setting this flag, the socket will not apply any
79 * credentials when establishing a connection. For example,
80 * an SSL connection would not send any client-certificates
81 * if this flag is set.
83 const long ANONYMOUS_CONNECT = 1 << 1;
85 /**
86 * If set, indicates that the connection was initiated from a source
87 * defined as being private in the sense of Private Browsing. Generally,
88 * there should be no state shared between connections that are private
89 * and those that are not; it is OK for multiple private connections
90 * to share state with each other, and it is OK for multiple non-private
91 * connections to share state with each other.
93 const unsigned long NO_PERMANENT_STORAGE = 1 << 2;
96 %{C++
97 /**
98 * nsISocketProvider implementations should be registered with XPCOM under a
99 * contract ID of the form: "@mozilla.org/network/socket;2?type=foo"
101 #define NS_NETWORK_SOCKET_CONTRACTID_PREFIX \
102 "@mozilla.org/network/socket;2?type="