/gecko_api/include/nsILoadGroup.h
C++ Header | 238 lines | 123 code | 41 blank | 74 comment | 0 complexity | d09bc4f4d35e5a58a3e6cd76a2dd4bd1 MD5 | raw file
1/* 2 * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/netwerk/base/public/nsILoadGroup.idl 3 */ 4 5#ifndef __gen_nsILoadGroup_h__ 6#define __gen_nsILoadGroup_h__ 7 8 9#ifndef __gen_nsIRequest_h__ 10#include "nsIRequest.h" 11#endif 12 13/* For IDL files that don't want to include root IDL files. */ 14#ifndef NS_NO_VTABLE 15#define NS_NO_VTABLE 16#endif 17class nsISimpleEnumerator; /* forward declaration */ 18 19class nsIRequestObserver; /* forward declaration */ 20 21class nsIInterfaceRequestor; /* forward declaration */ 22 23 24/* starting interface: nsILoadGroup */ 25#define NS_ILOADGROUP_IID_STR "3de0a31c-feaf-400f-9f1e-4ef71f8b20cc" 26 27#define NS_ILOADGROUP_IID \ 28 {0x3de0a31c, 0xfeaf, 0x400f, \ 29 { 0x9f, 0x1e, 0x4e, 0xf7, 0x1f, 0x8b, 0x20, 0xcc }} 30 31class NS_NO_VTABLE NS_SCRIPTABLE nsILoadGroup : public nsIRequest { 32 public: 33 34 NS_DECLARE_STATIC_IID_ACCESSOR(NS_ILOADGROUP_IID) 35 36 /** 37 * A load group maintains a collection of nsIRequest objects. 38 * 39 * @status FROZEN 40 */ 41/** 42 * The group observer is notified when requests are added to and removed 43 * from this load group. The groupObserver is weak referenced. 44 */ 45 /* attribute nsIRequestObserver groupObserver; */ 46 NS_SCRIPTABLE NS_IMETHOD GetGroupObserver(nsIRequestObserver * *aGroupObserver) = 0; 47 NS_SCRIPTABLE NS_IMETHOD SetGroupObserver(nsIRequestObserver * aGroupObserver) = 0; 48 49 /** 50 * Accesses the default load request for the group. Each time a number 51 * of requests are added to a group, the defaultLoadRequest may be set 52 * to indicate that all of the requests are related to a base request. 53 * 54 * The load group inherits its load flags from the default load request. 55 * If the default load request is NULL, then the group's load flags are 56 * not changed. 57 */ 58 /* attribute nsIRequest defaultLoadRequest; */ 59 NS_SCRIPTABLE NS_IMETHOD GetDefaultLoadRequest(nsIRequest * *aDefaultLoadRequest) = 0; 60 NS_SCRIPTABLE NS_IMETHOD SetDefaultLoadRequest(nsIRequest * aDefaultLoadRequest) = 0; 61 62 /** 63 * Adds a new request to the group. This will cause the default load 64 * flags to be applied to the request. If this is a foreground 65 * request then the groupObserver's onStartRequest will be called. 66 * 67 * If the request is the default load request or if the default load 68 * request is null, then the load group will inherit its load flags from 69 * the request. 70 */ 71 /* void addRequest (in nsIRequest aRequest, in nsISupports aContext); */ 72 NS_SCRIPTABLE NS_IMETHOD AddRequest(nsIRequest *aRequest, nsISupports *aContext) = 0; 73 74 /** 75 * Removes a request from the group. If this is a foreground request 76 * then the groupObserver's onStopRequest will be called. 77 * 78 * By the time this call ends, aRequest will have been removed from the 79 * loadgroup, even if this function throws an exception. 80 */ 81 /* void removeRequest (in nsIRequest aRequest, in nsISupports aContext, in nsresult aStatus); */ 82 NS_SCRIPTABLE NS_IMETHOD RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus) = 0; 83 84 /** 85 * Returns the requests contained directly in this group. 86 * Enumerator element type: nsIRequest. 87 */ 88 /* readonly attribute nsISimpleEnumerator requests; */ 89 NS_SCRIPTABLE NS_IMETHOD GetRequests(nsISimpleEnumerator * *aRequests) = 0; 90 91 /** 92 * Returns the count of "active" requests (ie. requests without the 93 * LOAD_BACKGROUND bit set). 94 */ 95 /* readonly attribute unsigned long activeCount; */ 96 NS_SCRIPTABLE NS_IMETHOD GetActiveCount(PRUint32 *aActiveCount) = 0; 97 98 /** 99 * Notification callbacks for the load group. 100 */ 101 /* attribute nsIInterfaceRequestor notificationCallbacks; */ 102 NS_SCRIPTABLE NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) = 0; 103 NS_SCRIPTABLE NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) = 0; 104 105}; 106 107 NS_DEFINE_STATIC_IID_ACCESSOR(nsILoadGroup, NS_ILOADGROUP_IID) 108 109/* Use this macro when declaring classes that implement this interface. */ 110#define NS_DECL_NSILOADGROUP \ 111 NS_SCRIPTABLE NS_IMETHOD GetGroupObserver(nsIRequestObserver * *aGroupObserver); \ 112 NS_SCRIPTABLE NS_IMETHOD SetGroupObserver(nsIRequestObserver * aGroupObserver); \ 113 NS_SCRIPTABLE NS_IMETHOD GetDefaultLoadRequest(nsIRequest * *aDefaultLoadRequest); \ 114 NS_SCRIPTABLE NS_IMETHOD SetDefaultLoadRequest(nsIRequest * aDefaultLoadRequest); \ 115 NS_SCRIPTABLE NS_IMETHOD AddRequest(nsIRequest *aRequest, nsISupports *aContext); \ 116 NS_SCRIPTABLE NS_IMETHOD RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus); \ 117 NS_SCRIPTABLE NS_IMETHOD GetRequests(nsISimpleEnumerator * *aRequests); \ 118 NS_SCRIPTABLE NS_IMETHOD GetActiveCount(PRUint32 *aActiveCount); \ 119 NS_SCRIPTABLE NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks); \ 120 NS_SCRIPTABLE NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks); 121 122/* Use this macro to declare functions that forward the behavior of this interface to another object. */ 123#define NS_FORWARD_NSILOADGROUP(_to) \ 124 NS_SCRIPTABLE NS_IMETHOD GetGroupObserver(nsIRequestObserver * *aGroupObserver) { return _to GetGroupObserver(aGroupObserver); } \ 125 NS_SCRIPTABLE NS_IMETHOD SetGroupObserver(nsIRequestObserver * aGroupObserver) { return _to SetGroupObserver(aGroupObserver); } \ 126 NS_SCRIPTABLE NS_IMETHOD GetDefaultLoadRequest(nsIRequest * *aDefaultLoadRequest) { return _to GetDefaultLoadRequest(aDefaultLoadRequest); } \ 127 NS_SCRIPTABLE NS_IMETHOD SetDefaultLoadRequest(nsIRequest * aDefaultLoadRequest) { return _to SetDefaultLoadRequest(aDefaultLoadRequest); } \ 128 NS_SCRIPTABLE NS_IMETHOD AddRequest(nsIRequest *aRequest, nsISupports *aContext) { return _to AddRequest(aRequest, aContext); } \ 129 NS_SCRIPTABLE NS_IMETHOD RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus) { return _to RemoveRequest(aRequest, aContext, aStatus); } \ 130 NS_SCRIPTABLE NS_IMETHOD GetRequests(nsISimpleEnumerator * *aRequests) { return _to GetRequests(aRequests); } \ 131 NS_SCRIPTABLE NS_IMETHOD GetActiveCount(PRUint32 *aActiveCount) { return _to GetActiveCount(aActiveCount); } \ 132 NS_SCRIPTABLE NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) { return _to GetNotificationCallbacks(aNotificationCallbacks); } \ 133 NS_SCRIPTABLE NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) { return _to SetNotificationCallbacks(aNotificationCallbacks); } 134 135/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ 136#define NS_FORWARD_SAFE_NSILOADGROUP(_to) \ 137 NS_SCRIPTABLE NS_IMETHOD GetGroupObserver(nsIRequestObserver * *aGroupObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetGroupObserver(aGroupObserver); } \ 138 NS_SCRIPTABLE NS_IMETHOD SetGroupObserver(nsIRequestObserver * aGroupObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetGroupObserver(aGroupObserver); } \ 139 NS_SCRIPTABLE NS_IMETHOD GetDefaultLoadRequest(nsIRequest * *aDefaultLoadRequest) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultLoadRequest(aDefaultLoadRequest); } \ 140 NS_SCRIPTABLE NS_IMETHOD SetDefaultLoadRequest(nsIRequest * aDefaultLoadRequest) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefaultLoadRequest(aDefaultLoadRequest); } \ 141 NS_SCRIPTABLE NS_IMETHOD AddRequest(nsIRequest *aRequest, nsISupports *aContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddRequest(aRequest, aContext); } \ 142 NS_SCRIPTABLE NS_IMETHOD RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveRequest(aRequest, aContext, aStatus); } \ 143 NS_SCRIPTABLE NS_IMETHOD GetRequests(nsISimpleEnumerator * *aRequests) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequests(aRequests); } \ 144 NS_SCRIPTABLE NS_IMETHOD GetActiveCount(PRUint32 *aActiveCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetActiveCount(aActiveCount); } \ 145 NS_SCRIPTABLE NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNotificationCallbacks(aNotificationCallbacks); } \ 146 NS_SCRIPTABLE NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNotificationCallbacks(aNotificationCallbacks); } 147 148#if 0 149/* Use the code below as a template for the implementation class for this interface. */ 150 151/* Header file */ 152class nsLoadGroup : public nsILoadGroup 153{ 154public: 155 NS_DECL_ISUPPORTS 156 NS_DECL_NSILOADGROUP 157 158 nsLoadGroup(); 159 160private: 161 ~nsLoadGroup(); 162 163protected: 164 /* additional members */ 165}; 166 167/* Implementation file */ 168NS_IMPL_ISUPPORTS1(nsLoadGroup, nsILoadGroup) 169 170nsLoadGroup::nsLoadGroup() 171{ 172 /* member initializers and constructor code */ 173} 174 175nsLoadGroup::~nsLoadGroup() 176{ 177 /* destructor code */ 178} 179 180/* attribute nsIRequestObserver groupObserver; */ 181NS_IMETHODIMP nsLoadGroup::GetGroupObserver(nsIRequestObserver * *aGroupObserver) 182{ 183 return NS_ERROR_NOT_IMPLEMENTED; 184} 185NS_IMETHODIMP nsLoadGroup::SetGroupObserver(nsIRequestObserver * aGroupObserver) 186{ 187 return NS_ERROR_NOT_IMPLEMENTED; 188} 189 190/* attribute nsIRequest defaultLoadRequest; */ 191NS_IMETHODIMP nsLoadGroup::GetDefaultLoadRequest(nsIRequest * *aDefaultLoadRequest) 192{ 193 return NS_ERROR_NOT_IMPLEMENTED; 194} 195NS_IMETHODIMP nsLoadGroup::SetDefaultLoadRequest(nsIRequest * aDefaultLoadRequest) 196{ 197 return NS_ERROR_NOT_IMPLEMENTED; 198} 199 200/* void addRequest (in nsIRequest aRequest, in nsISupports aContext); */ 201NS_IMETHODIMP nsLoadGroup::AddRequest(nsIRequest *aRequest, nsISupports *aContext) 202{ 203 return NS_ERROR_NOT_IMPLEMENTED; 204} 205 206/* void removeRequest (in nsIRequest aRequest, in nsISupports aContext, in nsresult aStatus); */ 207NS_IMETHODIMP nsLoadGroup::RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus) 208{ 209 return NS_ERROR_NOT_IMPLEMENTED; 210} 211 212/* readonly attribute nsISimpleEnumerator requests; */ 213NS_IMETHODIMP nsLoadGroup::GetRequests(nsISimpleEnumerator * *aRequests) 214{ 215 return NS_ERROR_NOT_IMPLEMENTED; 216} 217 218/* readonly attribute unsigned long activeCount; */ 219NS_IMETHODIMP nsLoadGroup::GetActiveCount(PRUint32 *aActiveCount) 220{ 221 return NS_ERROR_NOT_IMPLEMENTED; 222} 223 224/* attribute nsIInterfaceRequestor notificationCallbacks; */ 225NS_IMETHODIMP nsLoadGroup::GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) 226{ 227 return NS_ERROR_NOT_IMPLEMENTED; 228} 229NS_IMETHODIMP nsLoadGroup::SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) 230{ 231 return NS_ERROR_NOT_IMPLEMENTED; 232} 233 234/* End of implementation class template. */ 235#endif 236 237 238#endif /* __gen_nsILoadGroup_h__ */