OLD | NEW |
(Empty) | |
| 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 |
| 4 * |
| 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/ |
| 9 * |
| 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. |
| 14 * |
| 15 * The Original Code is mozilla.org code. |
| 16 * |
| 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. |
| 21 * |
| 22 * Contributor(s): |
| 23 * |
| 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. |
| 35 * |
| 36 * ***** END LICENSE BLOCK ***** */ |
| 37 |
| 38 #include "nsIRequest.idl" |
| 39 |
| 40 interface nsISimpleEnumerator; |
| 41 interface nsIRequestObserver; |
| 42 interface nsIInterfaceRequestor; |
| 43 |
| 44 /** |
| 45 * A load group maintains a collection of nsIRequest objects. |
| 46 * |
| 47 * @status FROZEN |
| 48 */ |
| 49 [scriptable, uuid(3de0a31c-feaf-400f-9f1e-4ef71f8b20cc)] |
| 50 interface nsILoadGroup : nsIRequest |
| 51 { |
| 52 /** |
| 53 * The group observer is notified when requests are added to and removed |
| 54 * from this load group. The groupObserver is weak referenced. |
| 55 */ |
| 56 attribute nsIRequestObserver groupObserver; |
| 57 |
| 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. |
| 62 * |
| 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. |
| 66 */ |
| 67 attribute nsIRequest defaultLoadRequest; |
| 68 |
| 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. |
| 73 * |
| 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. |
| 77 */ |
| 78 void addRequest(in nsIRequest aRequest, |
| 79 in nsISupports aContext); |
| 80 |
| 81 /** |
| 82 * Removes a request from the group. If this is a foreground request |
| 83 * then the groupObserver's onStopRequest will be called. |
| 84 */ |
| 85 void removeRequest(in nsIRequest aRequest, |
| 86 in nsISupports aContext, |
| 87 in nsresult aStatus); |
| 88 |
| 89 /** |
| 90 * Returns the requests contained directly in this group. |
| 91 * Enumerator element type: nsIRequest. |
| 92 */ |
| 93 readonly attribute nsISimpleEnumerator requests; |
| 94 |
| 95 /** |
| 96 * Returns the count of "active" requests (ie. requests without the |
| 97 * LOAD_BACKGROUND bit set). |
| 98 */ |
| 99 readonly attribute unsigned long activeCount; |
| 100 |
| 101 /** |
| 102 * Notification callbacks for the load group. |
| 103 */ |
| 104 attribute nsIInterfaceRequestor notificationCallbacks; |
| 105 }; |
OLD | NEW |