michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim:set ts=2 sw=2 sts=2 et cindent: */ 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: interface nsIChannel; michael@0: interface nsIProtocolProxyService; michael@0: interface nsIProxyInfo; michael@0: interface nsIURI; michael@0: michael@0: /** michael@0: * This interface is used to apply filters to the proxies selected for a given michael@0: * URI. Use nsIProtocolProxyService::registerFilter to hook up instances of michael@0: * this interface. See also nsIProtocolProxyChannelFilter. michael@0: */ michael@0: [scriptable, uuid(f424abd3-32b4-456c-9f45-b7e3376cb0d1)] michael@0: interface nsIProtocolProxyFilter : nsISupports michael@0: { michael@0: /** michael@0: * This method is called to apply proxy filter rules for the given URI michael@0: * and proxy object (or list of proxy objects). michael@0: * michael@0: * @param aProxyService michael@0: * A reference to the Protocol Proxy Service. This is passed so that michael@0: * implementations may easily access methods such as newProxyInfo. michael@0: * @param aURI michael@0: * The URI for which these proxy settings apply. michael@0: * @param aProxy michael@0: * The proxy (or list of proxies) that would be used by default for michael@0: * the given URI. This may be null. michael@0: * michael@0: * @return The proxy (or list of proxies) that should be used in place of michael@0: * aProxy. This can be just be aProxy if the filter chooses not to michael@0: * modify the proxy. It can also be null to indicate that a direct michael@0: * connection should be used. Use aProxyService.newProxyInfo to michael@0: * construct nsIProxyInfo objects. michael@0: */ michael@0: nsIProxyInfo applyFilter(in nsIProtocolProxyService aProxyService, michael@0: in nsIURI aURI, in nsIProxyInfo aProxy); michael@0: }; michael@0: michael@0: /** michael@0: * This interface is used to apply filters to the proxies selected for a given michael@0: * channel. Use nsIProtocolProxyService::registerChannelFilter to hook up instances of michael@0: * this interface. See also nsIProtocolProxyFilter. michael@0: */ michael@0: [scriptable, uuid(245b0880-82c5-4e6e-be6d-bc586aa55a90)] michael@0: interface nsIProtocolProxyChannelFilter : nsISupports michael@0: { michael@0: /** michael@0: * This method is called to apply proxy filter rules for the given channel michael@0: * and proxy object (or list of proxy objects). michael@0: * michael@0: * @param aProxyService michael@0: * A reference to the Protocol Proxy Service. This is passed so that michael@0: * implementations may easily access methods such as newProxyInfo. michael@0: * @param aChannel michael@0: * The channel for which these proxy settings apply. michael@0: * @param aProxy michael@0: * The proxy (or list of proxies) that would be used by default for michael@0: * the given channel. This may be null. michael@0: * michael@0: * @return The proxy (or list of proxies) that should be used in place of michael@0: * aProxy. This can be just be aProxy if the filter chooses not to michael@0: * modify the proxy. It can also be null to indicate that a direct michael@0: * connection should be used. Use aProxyService.newProxyInfo to michael@0: * construct nsIProxyInfo objects. michael@0: */ michael@0: nsIProxyInfo applyFilter(in nsIProtocolProxyService aProxyService, michael@0: in nsIChannel aChannel, in nsIProxyInfo aProxy); michael@0: };