netwerk/base/public/nsIProxyInfo.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/base/public/nsIProxyInfo.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,88 @@
     1.4 +/* -*- Mode: C++; 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 identifies a proxy server.
    1.13 + */
    1.14 +[scriptable, uuid(63fff172-2564-4138-96c6-3ae7d245fbed)]
    1.15 +interface nsIProxyInfo : nsISupports
    1.16 +{
    1.17 +  /**
    1.18 +   * This attribute specifies the hostname of the proxy server.
    1.19 +   */
    1.20 +  readonly attribute AUTF8String host;
    1.21 +
    1.22 +  /**
    1.23 +   * This attribute specifies the port number of the proxy server.
    1.24 +   */
    1.25 +  readonly attribute long port;
    1.26 +
    1.27 +  /**
    1.28 +   * This attribute specifies the type of the proxy server as an ASCII string.
    1.29 +   *
    1.30 +   * Some special values for this attribute include (but are not limited to)
    1.31 +   * the following:
    1.32 +   *   "http"     HTTP proxy (or SSL CONNECT for HTTPS)
    1.33 +   *   "socks"    SOCKS v5 proxy
    1.34 +   *   "socks4"   SOCKS v4 proxy
    1.35 +   *   "direct"   no proxy
    1.36 +   *   "unknown"  unknown proxy (see nsIProtocolProxyService::resolve)
    1.37 +   *
    1.38 +   * A future version of this interface may define additional types.
    1.39 +   */
    1.40 +  readonly attribute ACString type; 
    1.41 +
    1.42 +  /**
    1.43 +   * This attribute specifies flags that modify the proxy type.  The value of
    1.44 +   * this attribute is the bit-wise combination of the Proxy Flags defined
    1.45 +   * below.  Any undefined bits are reserved for future use.
    1.46 +   */
    1.47 +  readonly attribute unsigned long flags;
    1.48 +
    1.49 +  /**
    1.50 +   * This attribute specifies flags that were used by nsIProxyProtocolService when
    1.51 +   * creating this ProxyInfo element. 
    1.52 +   */
    1.53 +  readonly attribute unsigned long resolveFlags;
    1.54 +
    1.55 +  /**
    1.56 +   * Specifies a SOCKS5 username.
    1.57 +   */
    1.58 +  readonly attribute ACString username;
    1.59 +
    1.60 +  /**
    1.61 +   * Specifies a SOCKS5 password.
    1.62 +   */
    1.63 +  readonly attribute ACString password;
    1.64 +
    1.65 +  /**
    1.66 +   * This attribute specifies the failover timeout in seconds for this proxy.
    1.67 +   * If a nsIProxyInfo is reported as failed via nsIProtocolProxyService::
    1.68 +   * getFailoverForProxy, then the failed proxy will not be used again for this
    1.69 +   * many seconds.
    1.70 +   */
    1.71 +  readonly attribute unsigned long failoverTimeout;
    1.72 +
    1.73 +  /**
    1.74 +   * This attribute specifies the proxy to failover to when this proxy fails.
    1.75 +   */
    1.76 +  attribute nsIProxyInfo failoverProxy;
    1.77 +
    1.78 +
    1.79 +  /****************************************************************************
    1.80 +   * The following "Proxy Flags" may be bit-wise combined to construct the
    1.81 +   * flags attribute defined on this interface.  All unspecified bits are
    1.82 +   * reserved for future use.
    1.83 +   */
    1.84 +
    1.85 +  /**
    1.86 +   * This flag is set if the proxy is to perform name resolution itself.  If
    1.87 +   * this is the case, the hostname is used in some fashion, and we shouldn't
    1.88 +   * do any form of DNS lookup ourselves.
    1.89 +   */
    1.90 +  const unsigned short TRANSPARENT_PROXY_RESOLVES_HOST = 1 << 0;
    1.91 +};

mercurial