You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.


TOC PREV NEXT INDEX

Embedding Gecko API


nsILoadGroup


This interface manages a load group, which is a collection of nsIRequest objects. It is scriptable.

Methods
addRequest

Adds a new request to the group. This will cause the default load flags to be applied to the request. If this is a foreground request then the groupObserver's onStartRequest will be called. If the request is the default load request or if the default load request is null, then the load group will inherit its load flags from the request.

Syntax:

void nsILoadGroup::addRequest(in nsIRequest aRequest,
	in nsISupports aContext) 

Parameters:

aRequest: The nsIRequest to be added.
aContext: A user defined context.

nsresult:

NS_OK if successful.
removeRequest

Removes a request from the group. If this is a foreground request then the groupObserver's onStopRequest will be called.

Syntax:

void nsILoadGroup::removeRequest(in nsIRequest aRequest,
	in nsISupports aContext,in nsresult aStatus) 

Parameters:

aRequest: The nsIRequest to be removed.
aContext: A user defined context.
aStatus: An error code with the reason for stopping, e.g. NS_BINDING_ABORTED if the request was canceled.

nsresult:

NS_OK if successful.
Attributes
attribute nsIRequestObserver nsILoadGroup::groupObserver

Gets and sets the groupObserver. The groupObserver is notified when requests are added to and removed from this load group. It is weak referenced.

attribute nsIRequest nsILoadGroup::defaultLoadRequest

Gets and sets the default load request for the group. Each time a number of requests are added to a group, the defaultLoadRequest may be set to indicate that all of the requests are related to a base request. The load group inherits its load flags from the default load request. If the default load request is null, then the group's load flags are not changed.

readonly attribute nsISimpleEnumerator nsILoadGroup::requests

Gets the requests contained directly in this group. The elements of the enumerator are of the type nsIRequest.

readonly attribute unsigned long nsILoadGroup::activeCount

Gets the count of "active" requests (ie. requests without the LOAD_BACKGROUND bit set).

attribute nsIInterfaceRequestor nsILoadGroup::notificationCallbacks

Gets and sets the notification callbacks for the loadgroup.


Written by:Ellen Evans | Comments, questions, complaints? Bug 143387
TOC PREV NEXT INDEX