Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / netwerk / base / public / nsILoadGroup.idl
blob4a6bcfd4ce4d31df2018fcf8ec8e302ade05f384
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 #include "nsIRequest.idl"
40 interface nsISimpleEnumerator;
41 interface nsIRequestObserver;
42 interface nsIInterfaceRequestor;
44 /**
45 * A load group maintains a collection of nsIRequest objects.
47 * @status FROZEN
49 [scriptable, uuid(3de0a31c-feaf-400f-9f1e-4ef71f8b20cc)]
50 interface nsILoadGroup : nsIRequest
52 /**
53 * The group observer is notified when requests are added to and removed
54 * from this load group. The groupObserver is weak referenced.
56 attribute nsIRequestObserver groupObserver;
58 /**
59 * Accesses the default load request for the group. Each time a number
60 * of requests are added to a group, the defaultLoadRequest may be set
61 * to indicate that all of the requests are related to a base request.
63 * The load group inherits its load flags from the default load request.
64 * If the default load request is NULL, then the group's load flags are
65 * not changed.
67 attribute nsIRequest defaultLoadRequest;
69 /**
70 * Adds a new request to the group. This will cause the default load
71 * flags to be applied to the request. If this is a foreground
72 * request then the groupObserver's onStartRequest will be called.
74 * If the request is the default load request or if the default load
75 * request is null, then the load group will inherit its load flags from
76 * the request.
78 void addRequest(in nsIRequest aRequest,
79 in nsISupports aContext);
81 /**
82 * Removes a request from the group. If this is a foreground request
83 * then the groupObserver's onStopRequest will be called.
85 * By the time this call ends, aRequest will have been removed from the
86 * loadgroup, even if this function throws an exception.
88 void removeRequest(in nsIRequest aRequest,
89 in nsISupports aContext,
90 in nsresult aStatus);
92 /**
93 * Returns the requests contained directly in this group.
94 * Enumerator element type: nsIRequest.
96 readonly attribute nsISimpleEnumerator requests;
98 /**
99 * Returns the count of "active" requests (ie. requests without the
100 * LOAD_BACKGROUND bit set).
102 readonly attribute unsigned long activeCount;
105 * Notification callbacks for the load group.
107 attribute nsIInterfaceRequestor notificationCallbacks;