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

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

mercurial