mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-30 13:45:27 +00:00
119 lines
3.7 KiB
Plaintext
119 lines
3.7 KiB
Plaintext
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
*
|
|
* The contents of this file are subject to the Netscape Public
|
|
* License Version 1.1 (the "License"); you may not use this file
|
|
* except in compliance with the License. You may obtain a copy of
|
|
* the License at http://www.mozilla.org/NPL/
|
|
*
|
|
* Software distributed under the License is distributed on an "AS
|
|
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
* implied. See the License for the specific language governing
|
|
* rights and limitations under the License.
|
|
*
|
|
* The Original Code is mozilla.org code.
|
|
*
|
|
* The Initial Developer of the Original Code is Netscape
|
|
* Communications Corporation. Portions created by Netscape are
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
|
* Rights Reserved.
|
|
*
|
|
* Contributor(s):
|
|
*/
|
|
|
|
#include "nsIRequest.idl"
|
|
|
|
interface nsIChannel;
|
|
interface nsISimpleEnumerator;
|
|
interface nsIStreamObserver;
|
|
interface nsIStreamListener;
|
|
interface nsIInputStream;
|
|
|
|
|
|
[scriptable, uuid(60fdf550-5392-11d3-9a97-0080c7cb1080)]
|
|
interface nsILoadGroupListenerFactory : nsISupports
|
|
{
|
|
nsIStreamListener createLoadGroupListener(in nsIStreamListener alistener);
|
|
};
|
|
|
|
|
|
/**
|
|
* A load group maintains a collection of active URL requests.
|
|
*/
|
|
[scriptable, uuid(19845248-29ab-11d3-8cce-0060b0fc14a3)]
|
|
interface nsILoadGroup : nsIRequest
|
|
{
|
|
void init(in nsIStreamObserver observer,
|
|
in nsILoadGroup parent);
|
|
|
|
/**
|
|
* Accesses the default load attributes for the group, returned as
|
|
* a flag word. Setting the default load attributes will cause them
|
|
* to be applied to each new channel inserted into the group.
|
|
*/
|
|
attribute unsigned long defaultLoadAttributes;
|
|
|
|
/**
|
|
* Accesses the default load channel for the group. Each time a number
|
|
* of channels are added to a group, the DefaultLoadChannel may be set
|
|
* to indicate that all of the channels are related to a particular URL.
|
|
*/
|
|
attribute nsIChannel defaultLoadChannel;
|
|
|
|
/**
|
|
* Adds a new channel to the group. This will cause the default load
|
|
* attributes to be applied to that channel. If the channel added is
|
|
* the first channel in the group, the group's observer's OnStartRequest
|
|
* method is called.
|
|
*/
|
|
void addChannel(in nsIChannel channel,
|
|
in nsISupports ctxt);
|
|
|
|
/**
|
|
* Removes a channel from the group. If the channel removed is
|
|
* the last channel in the group, the group's observer's OnStopRequest
|
|
* method is called.
|
|
*/
|
|
void removeChannel(in nsIChannel channel,
|
|
in nsISupports ctxt,
|
|
in nsresult status,
|
|
in wstring errorMsg);
|
|
|
|
/**
|
|
* Returns the channels contained directly in this group.
|
|
* Enumerator element type: nsIChannel.
|
|
*/
|
|
readonly attribute nsISimpleEnumerator channels;
|
|
|
|
/**
|
|
* Adds a new sub-group to the group.
|
|
*/
|
|
void addSubGroup(in nsILoadGroup group);
|
|
|
|
/**
|
|
* Removes a sub-group from the group.
|
|
*/
|
|
void removeSubGroup(in nsILoadGroup group);
|
|
|
|
/**
|
|
* Returns the sub-groups of a group.
|
|
* Enumerator element type: nsILoadGroup.
|
|
*/
|
|
readonly attribute nsISimpleEnumerator subGroups;
|
|
|
|
attribute nsIStreamObserver groupObserver;
|
|
|
|
attribute nsILoadGroupListenerFactory groupListenerFactory;
|
|
};
|
|
|
|
%{C++
|
|
|
|
#define NS_LOADGROUP_CID \
|
|
{ /* e1c61582-2a84-11d3-8cce-0060b0fc14a3 */ \
|
|
0xe1c61582, \
|
|
0x2a84, \
|
|
0x11d3, \
|
|
{0x8c, 0xce, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \
|
|
} \
|
|
|
|
%}
|