nsISystemProxySettings.idl (2361B)
1 /* -*- Mode: IDL; 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/. */ 5 6 #include "nsISupports.idl" 7 8 /** 9 * This interface allows the proxy code to use platform-specific proxy 10 * settings when the proxy preference is set to "automatic discovery". This service 11 * acts like a PAC parser to netwerk, but it will actually read the system settings and 12 * either return the proper proxy data from the autoconfig URL specified in the system proxy, 13 * or generate proxy data based on the system's manual proxy settings. 14 */ 15 [scriptable, uuid(971591cd-277e-409a-bbf6-0a79879cd307)] 16 interface nsISystemProxySettings : nsISupports 17 { 18 /** 19 * Whether or not it is appropriate to execute getProxyForURI off the main thread. 20 * If that method can block (e.g. for WPAD as windows does) then it must be 21 * not mainThreadOnly to avoid creating main thread jank. The main thread only option is 22 * provided for implementations that do not block but use other main thread only 23 * functions such as dbus. 24 */ 25 readonly attribute boolean mainThreadOnly; 26 27 /** 28 * If non-empty, use this PAC file. If empty, call getProxyForURI instead. 29 */ 30 readonly attribute AUTF8String PACURI; 31 32 /** 33 * See ProxyAutoConfig::getProxyForURI; this function behaves similarly except 34 * a more relaxed return string is allowed that includes full urls instead of just 35 * host:port syntax. e.g. "PROXY http://www.foo.com:8080" instead of 36 * "PROXY www.foo.com:8080" 37 */ 38 AUTF8String getProxyForURI(in AUTF8String testSpec, 39 in AUTF8String testScheme, 40 in AUTF8String testHost, 41 in int32_t testPort); 42 43 /** 44 * Check if system settings are configured to use WPAD 45 */ 46 readonly attribute boolean systemWPADSetting; 47 48 /** 49 * Sets the system proxy info. Currently only used on Android. 50 */ 51 void setSystemProxyInfo(in AUTF8String host, 52 in int32_t port, 53 in AUTF8String pacFileUrl, 54 in Array<AUTF8String> exclusionList); 55 };