netwerk/base/public/nsISystemProxySettings.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/base/public/nsISystemProxySettings.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,42 @@
     1.4 +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +/** 
    1.12 + * This interface allows the proxy code to use platform-specific proxy
    1.13 + * settings when the proxy preference is set to "automatic discovery". This service
    1.14 + * acts like a PAC parser to netwerk, but it will actually read the system settings and
    1.15 + * either return the proper proxy data from the autoconfig URL specified in the system proxy,
    1.16 + * or generate proxy data based on the system's manual proxy settings.
    1.17 + */
    1.18 +[scriptable, uuid(971591cd-277e-409a-bbf6-0a79879cd307)]
    1.19 +interface nsISystemProxySettings : nsISupports
    1.20 +{
    1.21 +    /**
    1.22 +     * Whether or not it is appropriate to execute getProxyForURI off the main thread.
    1.23 +     * If that method can block (e.g. for WPAD as windows does) then it must be
    1.24 +     * not mainThreadOnly to avoid creating main thread jank. The main thread only option is
    1.25 +     * provided for implementations that do not block but use other main thread only
    1.26 +     * functions such as dbus.
    1.27 +     */
    1.28 +    readonly attribute bool mainThreadOnly;
    1.29 +
    1.30 +    /**
    1.31 +     * If non-empty, use this PAC file. If empty, call getProxyForURI instead.
    1.32 +     */
    1.33 +    readonly attribute AUTF8String PACURI;
    1.34 +    
    1.35 +    /**
    1.36 +     * See ProxyAutoConfig::getProxyForURI; this function behaves similarly except
    1.37 +     * a more relaxed return string is allowed that includes full urls instead of just
    1.38 +     * host:port syntax. e.g. "PROXY http://www.foo.com:8080" instead of
    1.39 +     * "PROXY www.foo.com:8080"
    1.40 +     */
    1.41 +    AUTF8String getProxyForURI(in AUTF8String testSpec,
    1.42 +                               in AUTF8String testScheme,
    1.43 +                               in AUTF8String testHost,
    1.44 +                               in int32_t     testPort);
    1.45 +};

mercurial