gecko-dev/netwerk/base/public/nsILoadGroup.idl
1999-07-09 21:18:47 +00:00

100 lines
3.0 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.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsIRequest.idl"
interface nsIChannel;
interface nsISimpleEnumerator;
interface nsIStreamObserver;
/**
* A load group maintains a collection of active URL requests.
*/
[scriptable, uuid(19845248-29ab-11d3-8cce-0060b0fc14a3)]
interface nsILoadGroup : nsIRequest
{
/**
* 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;
/**
* Adds a new channel to the group. This will cause the default load
* attributes to be applied to that channel.
*/
void AddChannel(in nsIChannel channel);
/**
* Removes a channel from the group.
*/
void RemoveChannel(in nsIChannel channel);
/**
* Returns the channels contained directly in this group.
* Enumerator element type: nsIChannel.
*/
readonly attribute nsISimpleEnumerator Channels;
/**
* Adds an observer to the group. The observer's methods will be
* called for each channel in the group.
*/
void AddObserver(in nsIStreamObserver observer);
/**
* Removes an observer from the group.
*/
void RemoveObserver(in nsIStreamObserver observer);
/**
* Returns the observers contained directly in this group.
* Enumerator element type: nsIStreamObserver.
*/
readonly attribute nsISimpleEnumerator Observers;
/**
* 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;
};
%{C++
#define NS_LOADGROUP_CID \
{ /* e1c61582-2a84-11d3-8cce-0060b0fc14a3 */ \
0xe1c61582, \
0x2a84, \
0x11d3, \
{0x8c, 0xce, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \
} \
%}