nsILoadGroup.h 9.7 KB

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