Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / netwerk / socket / base / nsISocketProvider.idl
blobfd6127982cc1176f4ed4495c5adb1321239cb424
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
23 * Malcolm Smith <malsmith@cs.rmit.edu.au>
25 * Alternatively, the contents of this file may be used under the terms of
26 * either the GNU General Public License Version 2 or later (the "GPL"), or
27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
39 #include "nsISupports.idl"
41 [ptr] native PRFileDescStar(struct PRFileDesc);
43 /**
44 * nsISocketProvider
46 [scriptable, uuid(00b3df92-e830-11d8-d48e-0004e22243f8)]
47 interface nsISocketProvider : nsISupports
49 /**
50 * newSocket
52 * @param aFamily
53 * The address family for this socket (PR_AF_INET or PR_AF_INET6).
54 * @param aHost
55 * The hostname for this connection.
56 * @param aPort
57 * The port for this connection.
58 * @param aProxyHost
59 * If non-null, the proxy hostname for this connection.
60 * @param aProxyPort
61 * The proxy port for this connection.
62 * @param aFlags
63 * Control flags that govern this connection (see below.)
64 * @param aFileDesc
65 * The resulting PRFileDesc.
66 * @param aSecurityInfo
67 * Any security info that should be associated with aFileDesc. This
68 * object typically implements nsITransportSecurityInfo.
70 [noscript]
71 void newSocket(in long aFamily,
72 in string aHost,
73 in long aPort,
74 in string aProxyHost,
75 in long aProxyPort,
76 in unsigned long aFlags,
77 out PRFileDescStar aFileDesc,
78 out nsISupports aSecurityInfo);
80 /**
81 * addToSocket
83 * This function is called to allow the socket provider to layer a
84 * PRFileDesc on top of another PRFileDesc. For example, SSL via a SOCKS
85 * proxy.
87 * Parameters are the same as newSocket with the exception of aFileDesc,
88 * which is an in-param instead.
90 [noscript]
91 void addToSocket(in long aFamily,
92 in string aHost,
93 in long aPort,
94 in string aProxyHost,
95 in long aProxyPort,
96 in unsigned long aFlags,
97 in PRFileDescStar aFileDesc,
98 out nsISupports aSecurityInfo);
101 * PROXY_RESOLVES_HOST
103 * This flag is set if the proxy is to perform hostname resolution instead
104 * of the client. When set, the hostname parameter passed when in this
105 * interface will be used instead of the address structure passed for a
106 * later connect et al. request.
108 const long PROXY_RESOLVES_HOST = 1 << 0;
111 %{C++
113 * nsISocketProvider implementations should be registered with XPCOM under a
114 * contract ID of the form: "@mozilla.org/network/socket;2?type=foo"
116 #define NS_NETWORK_SOCKET_CONTRACTID_PREFIX \
117 "@mozilla.org/network/socket;2?type="