michael@0: /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: /** michael@0: * This interface allows the proxy code to use platform-specific proxy michael@0: * settings when the proxy preference is set to "automatic discovery". This service michael@0: * acts like a PAC parser to netwerk, but it will actually read the system settings and michael@0: * either return the proper proxy data from the autoconfig URL specified in the system proxy, michael@0: * or generate proxy data based on the system's manual proxy settings. michael@0: */ michael@0: [scriptable, uuid(971591cd-277e-409a-bbf6-0a79879cd307)] michael@0: interface nsISystemProxySettings : nsISupports michael@0: { michael@0: /** michael@0: * Whether or not it is appropriate to execute getProxyForURI off the main thread. michael@0: * If that method can block (e.g. for WPAD as windows does) then it must be michael@0: * not mainThreadOnly to avoid creating main thread jank. The main thread only option is michael@0: * provided for implementations that do not block but use other main thread only michael@0: * functions such as dbus. michael@0: */ michael@0: readonly attribute bool mainThreadOnly; michael@0: michael@0: /** michael@0: * If non-empty, use this PAC file. If empty, call getProxyForURI instead. michael@0: */ michael@0: readonly attribute AUTF8String PACURI; michael@0: michael@0: /** michael@0: * See ProxyAutoConfig::getProxyForURI; this function behaves similarly except michael@0: * a more relaxed return string is allowed that includes full urls instead of just michael@0: * host:port syntax. e.g. "PROXY http://www.foo.com:8080" instead of michael@0: * "PROXY www.foo.com:8080" michael@0: */ michael@0: AUTF8String getProxyForURI(in AUTF8String testSpec, michael@0: in AUTF8String testScheme, michael@0: in AUTF8String testHost, michael@0: in int32_t testPort); michael@0: };