2006-04-05 01:26:17 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* vim:expandtab:shiftwidth=4:tabstop=4:
|
|
|
|
*/
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2006-04-05 01:26:17 +04:00
|
|
|
|
|
|
|
#include "nsIIOService.idl"
|
|
|
|
|
2014-10-23 04:20:12 +04:00
|
|
|
interface nsIDOMNode;
|
|
|
|
interface nsIPrincipal;
|
|
|
|
|
2006-04-05 01:26:17 +04:00
|
|
|
/**
|
2011-05-13 21:53:27 +04:00
|
|
|
* nsIIOService2 extends nsIIOService
|
2006-04-05 01:26:17 +04:00
|
|
|
*/
|
2014-10-23 04:20:12 +04:00
|
|
|
[scriptable, uuid(52c5804b-0d3c-4d4f-8654-1c36fd310e69)]
|
2006-04-05 01:26:17 +04:00
|
|
|
interface nsIIOService2 : nsIIOService
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* While this is set, IOService will monitor an nsINetworkLinkService
|
|
|
|
* (if available) and set its offline status to "true" whenever
|
|
|
|
* isLinkUp is false.
|
|
|
|
*
|
|
|
|
* Applications that want to control changes to the IOService's offline
|
|
|
|
* status should set this to false, watch for network:link-status-changed
|
|
|
|
* broadcasts, and change nsIIOService::offline as they see fit. Note
|
|
|
|
* that this means during application startup, IOService may be offline
|
|
|
|
* if there is no link, until application code runs and can turn off
|
|
|
|
* this management.
|
|
|
|
*/
|
|
|
|
attribute boolean manageOfflineStatus;
|
2011-05-13 21:53:27 +04:00
|
|
|
|
2014-10-23 04:20:12 +04:00
|
|
|
/**
|
|
|
|
* Creates a channel for a given URI.
|
|
|
|
*
|
2014-12-12 20:05:21 +03:00
|
|
|
* @param aURI
|
|
|
|
* nsIURI from which to make a channel
|
|
|
|
* @param aProxyURI
|
|
|
|
* nsIURI to use for proxy resolution. Can be null in which
|
2014-10-23 04:20:12 +04:00
|
|
|
* case aURI is used
|
|
|
|
* @param aProxyFlags flags from nsIProtocolProxyService to use
|
|
|
|
* when resolving proxies for this new channel
|
2014-12-12 20:05:21 +03:00
|
|
|
* @param aLoadingNode
|
|
|
|
* @param aLoadingPrincipal
|
|
|
|
* @param aTriggeringPrincipal
|
|
|
|
* @param aSecurityFlags
|
|
|
|
* @param aContentPolicyType
|
2016-09-20 09:34:40 +03:00
|
|
|
* These will be used as values for the nsILoadInfo object on the
|
|
|
|
* created channel. For details, see nsILoadInfo in nsILoadInfo.idl
|
2014-10-23 04:20:12 +04:00
|
|
|
* @return reference to the new nsIChannel object
|
2014-12-12 20:05:21 +03:00
|
|
|
*
|
2014-12-13 00:45:51 +03:00
|
|
|
* Please note, if you provide both a loadingNode and a loadingPrincipal,
|
|
|
|
* then loadingPrincipal must be equal to loadingNode->NodePrincipal().
|
|
|
|
* But less error prone is to just supply a loadingNode.
|
2014-10-23 04:20:12 +04:00
|
|
|
*/
|
|
|
|
nsIChannel newChannelFromURIWithProxyFlags2(in nsIURI aURI,
|
|
|
|
in nsIURI aProxyURI,
|
|
|
|
in unsigned long aProxyFlags,
|
|
|
|
in nsIDOMNode aLoadingNode,
|
|
|
|
in nsIPrincipal aLoadingPrincipal,
|
|
|
|
in nsIPrincipal aTriggeringPrincipal,
|
|
|
|
in unsigned long aSecurityFlags,
|
|
|
|
in unsigned long aContentPolicyType);
|
|
|
|
|
2016-03-19 03:11:42 +03:00
|
|
|
/**
|
|
|
|
* ***** DEPRECATED *****
|
|
|
|
* Please use newChannelFromURIWithProxyFlags2()
|
|
|
|
*
|
|
|
|
* Creates a channel for a given URI.
|
|
|
|
*
|
|
|
|
* @param aURI nsIURI from which to make a channel
|
|
|
|
* @param aProxyURI nsIURI to use for proxy resolution. Can be null in which
|
|
|
|
* case aURI is used
|
|
|
|
* @param aProxyFlags flags from nsIProtocolProxyService to use
|
|
|
|
* when resolving proxies for this new channel
|
|
|
|
* @return reference to the new nsIChannel object
|
|
|
|
*/
|
|
|
|
nsIChannel newChannelFromURIWithProxyFlags(in nsIURI aURI,
|
|
|
|
in nsIURI aProxyURI,
|
|
|
|
in unsigned long aProxyFlags);
|
|
|
|
|
2006-04-05 01:26:17 +04:00
|
|
|
};
|