netwerk/base/public/nsIProtocolProxyFilter.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
     3 /* This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #include "nsISupports.idl"
     9 interface nsIChannel;
    10 interface nsIProtocolProxyService;
    11 interface nsIProxyInfo;
    12 interface nsIURI;
    14 /**
    15  * This interface is used to apply filters to the proxies selected for a given
    16  * URI.  Use nsIProtocolProxyService::registerFilter to hook up instances of
    17  * this interface. See also nsIProtocolProxyChannelFilter.
    18  */
    19 [scriptable, uuid(f424abd3-32b4-456c-9f45-b7e3376cb0d1)]
    20 interface nsIProtocolProxyFilter : nsISupports
    21 {
    22   /**
    23    * This method is called to apply proxy filter rules for the given URI
    24    * and proxy object (or list of proxy objects).
    25    *
    26    * @param aProxyService
    27    *        A reference to the Protocol Proxy Service.  This is passed so that
    28    *        implementations may easily access methods such as newProxyInfo.
    29    * @param aURI
    30    *        The URI for which these proxy settings apply.
    31    * @param aProxy
    32    *        The proxy (or list of proxies) that would be used by default for
    33    *        the given URI.  This may be null.
    34    *
    35    * @return The proxy (or list of proxies) that should be used in place of
    36    *         aProxy.  This can be just be aProxy if the filter chooses not to
    37    *         modify the proxy.  It can also be null to indicate that a direct
    38    *         connection should be used.  Use aProxyService.newProxyInfo to
    39    *         construct nsIProxyInfo objects.
    40    */
    41   nsIProxyInfo applyFilter(in nsIProtocolProxyService aProxyService,
    42                            in nsIURI aURI, in nsIProxyInfo aProxy);
    43 };
    45 /**
    46  * This interface is used to apply filters to the proxies selected for a given
    47  * channel.  Use nsIProtocolProxyService::registerChannelFilter to hook up instances of
    48  * this interface. See also nsIProtocolProxyFilter.
    49  */
    50 [scriptable, uuid(245b0880-82c5-4e6e-be6d-bc586aa55a90)]
    51 interface nsIProtocolProxyChannelFilter : nsISupports
    52 {
    53   /**
    54    * This method is called to apply proxy filter rules for the given channel
    55    * and proxy object (or list of proxy objects).
    56    *
    57    * @param aProxyService
    58    *        A reference to the Protocol Proxy Service.  This is passed so that
    59    *        implementations may easily access methods such as newProxyInfo.
    60    * @param aChannel
    61    *        The channel for which these proxy settings apply.
    62    * @param aProxy
    63    *        The proxy (or list of proxies) that would be used by default for
    64    *        the given channel. This may be null.
    65    *
    66    * @return The proxy (or list of proxies) that should be used in place of
    67    *         aProxy. This can be just be aProxy if the filter chooses not to
    68    *         modify the proxy. It can also be null to indicate that a direct
    69    *         connection should be used.  Use aProxyService.newProxyInfo to
    70    *         construct nsIProxyInfo objects.
    71    */
    72   nsIProxyInfo applyFilter(in nsIProtocolProxyService aProxyService,
    73                            in nsIChannel aChannel, in nsIProxyInfo aProxy);
    74 };

mercurial