PageRenderTime 35ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/gecko_api/include/nsILoadGroup.h

http://firefox-mac-pdf.googlecode.com/
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. #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 NS_SCRIPTABLE nsILoadGroup : public nsIRequest {
  22. public:
  23. NS_DECLARE_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_SCRIPTABLE NS_IMETHOD GetGroupObserver(nsIRequestObserver * *aGroupObserver) = 0;
  35. NS_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD GetDefaultLoadRequest(nsIRequest * *aDefaultLoadRequest) = 0;
  47. NS_SCRIPTABLE 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_SCRIPTABLE 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. * By the time this call ends, aRequest will have been removed from the
  64. * loadgroup, even if this function throws an exception.
  65. */
  66. /* void removeRequest (in nsIRequest aRequest, in nsISupports aContext, in nsresult aStatus); */
  67. NS_SCRIPTABLE NS_IMETHOD RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus) = 0;
  68. /**
  69. * Returns the requests contained directly in this group.
  70. * Enumerator element type: nsIRequest.
  71. */
  72. /* readonly attribute nsISimpleEnumerator requests; */
  73. NS_SCRIPTABLE NS_IMETHOD GetRequests(nsISimpleEnumerator * *aRequests) = 0;
  74. /**
  75. * Returns the count of "active" requests (ie. requests without the
  76. * LOAD_BACKGROUND bit set).
  77. */
  78. /* readonly attribute unsigned long activeCount; */
  79. NS_SCRIPTABLE NS_IMETHOD GetActiveCount(PRUint32 *aActiveCount) = 0;
  80. /**
  81. * Notification callbacks for the load group.
  82. */
  83. /* attribute nsIInterfaceRequestor notificationCallbacks; */
  84. NS_SCRIPTABLE NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) = 0;
  85. NS_SCRIPTABLE NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) = 0;
  86. };
  87. NS_DEFINE_STATIC_IID_ACCESSOR(nsILoadGroup, NS_ILOADGROUP_IID)
  88. /* Use this macro when declaring classes that implement this interface. */
  89. #define NS_DECL_NSILOADGROUP \
  90. NS_SCRIPTABLE NS_IMETHOD GetGroupObserver(nsIRequestObserver * *aGroupObserver); \
  91. NS_SCRIPTABLE NS_IMETHOD SetGroupObserver(nsIRequestObserver * aGroupObserver); \
  92. NS_SCRIPTABLE NS_IMETHOD GetDefaultLoadRequest(nsIRequest * *aDefaultLoadRequest); \
  93. NS_SCRIPTABLE NS_IMETHOD SetDefaultLoadRequest(nsIRequest * aDefaultLoadRequest); \
  94. NS_SCRIPTABLE NS_IMETHOD AddRequest(nsIRequest *aRequest, nsISupports *aContext); \
  95. NS_SCRIPTABLE NS_IMETHOD RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus); \
  96. NS_SCRIPTABLE NS_IMETHOD GetRequests(nsISimpleEnumerator * *aRequests); \
  97. NS_SCRIPTABLE NS_IMETHOD GetActiveCount(PRUint32 *aActiveCount); \
  98. NS_SCRIPTABLE NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks); \
  99. NS_SCRIPTABLE NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks);
  100. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  101. #define NS_FORWARD_NSILOADGROUP(_to) \
  102. NS_SCRIPTABLE NS_IMETHOD GetGroupObserver(nsIRequestObserver * *aGroupObserver) { return _to GetGroupObserver(aGroupObserver); } \
  103. NS_SCRIPTABLE NS_IMETHOD SetGroupObserver(nsIRequestObserver * aGroupObserver) { return _to SetGroupObserver(aGroupObserver); } \
  104. NS_SCRIPTABLE NS_IMETHOD GetDefaultLoadRequest(nsIRequest * *aDefaultLoadRequest) { return _to GetDefaultLoadRequest(aDefaultLoadRequest); } \
  105. NS_SCRIPTABLE NS_IMETHOD SetDefaultLoadRequest(nsIRequest * aDefaultLoadRequest) { return _to SetDefaultLoadRequest(aDefaultLoadRequest); } \
  106. NS_SCRIPTABLE NS_IMETHOD AddRequest(nsIRequest *aRequest, nsISupports *aContext) { return _to AddRequest(aRequest, aContext); } \
  107. NS_SCRIPTABLE NS_IMETHOD RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus) { return _to RemoveRequest(aRequest, aContext, aStatus); } \
  108. NS_SCRIPTABLE NS_IMETHOD GetRequests(nsISimpleEnumerator * *aRequests) { return _to GetRequests(aRequests); } \
  109. NS_SCRIPTABLE NS_IMETHOD GetActiveCount(PRUint32 *aActiveCount) { return _to GetActiveCount(aActiveCount); } \
  110. NS_SCRIPTABLE NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) { return _to GetNotificationCallbacks(aNotificationCallbacks); } \
  111. NS_SCRIPTABLE NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) { return _to SetNotificationCallbacks(aNotificationCallbacks); }
  112. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  113. #define NS_FORWARD_SAFE_NSILOADGROUP(_to) \
  114. NS_SCRIPTABLE NS_IMETHOD GetGroupObserver(nsIRequestObserver * *aGroupObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetGroupObserver(aGroupObserver); } \
  115. NS_SCRIPTABLE NS_IMETHOD SetGroupObserver(nsIRequestObserver * aGroupObserver) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetGroupObserver(aGroupObserver); } \
  116. NS_SCRIPTABLE NS_IMETHOD GetDefaultLoadRequest(nsIRequest * *aDefaultLoadRequest) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultLoadRequest(aDefaultLoadRequest); } \
  117. NS_SCRIPTABLE NS_IMETHOD SetDefaultLoadRequest(nsIRequest * aDefaultLoadRequest) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefaultLoadRequest(aDefaultLoadRequest); } \
  118. NS_SCRIPTABLE NS_IMETHOD AddRequest(nsIRequest *aRequest, nsISupports *aContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddRequest(aRequest, aContext); } \
  119. NS_SCRIPTABLE NS_IMETHOD RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveRequest(aRequest, aContext, aStatus); } \
  120. NS_SCRIPTABLE NS_IMETHOD GetRequests(nsISimpleEnumerator * *aRequests) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequests(aRequests); } \
  121. NS_SCRIPTABLE NS_IMETHOD GetActiveCount(PRUint32 *aActiveCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetActiveCount(aActiveCount); } \
  122. NS_SCRIPTABLE NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNotificationCallbacks(aNotificationCallbacks); } \
  123. NS_SCRIPTABLE NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNotificationCallbacks(aNotificationCallbacks); }
  124. #if 0
  125. /* Use the code below as a template for the implementation class for this interface. */
  126. /* Header file */
  127. class nsLoadGroup : public nsILoadGroup
  128. {
  129. public:
  130. NS_DECL_ISUPPORTS
  131. NS_DECL_NSILOADGROUP
  132. nsLoadGroup();
  133. private:
  134. ~nsLoadGroup();
  135. protected:
  136. /* additional members */
  137. };
  138. /* Implementation file */
  139. NS_IMPL_ISUPPORTS1(nsLoadGroup, nsILoadGroup)
  140. nsLoadGroup::nsLoadGroup()
  141. {
  142. /* member initializers and constructor code */
  143. }
  144. nsLoadGroup::~nsLoadGroup()
  145. {
  146. /* destructor code */
  147. }
  148. /* attribute nsIRequestObserver groupObserver; */
  149. NS_IMETHODIMP nsLoadGroup::GetGroupObserver(nsIRequestObserver * *aGroupObserver)
  150. {
  151. return NS_ERROR_NOT_IMPLEMENTED;
  152. }
  153. NS_IMETHODIMP nsLoadGroup::SetGroupObserver(nsIRequestObserver * aGroupObserver)
  154. {
  155. return NS_ERROR_NOT_IMPLEMENTED;
  156. }
  157. /* attribute nsIRequest defaultLoadRequest; */
  158. NS_IMETHODIMP nsLoadGroup::GetDefaultLoadRequest(nsIRequest * *aDefaultLoadRequest)
  159. {
  160. return NS_ERROR_NOT_IMPLEMENTED;
  161. }
  162. NS_IMETHODIMP nsLoadGroup::SetDefaultLoadRequest(nsIRequest * aDefaultLoadRequest)
  163. {
  164. return NS_ERROR_NOT_IMPLEMENTED;
  165. }
  166. /* void addRequest (in nsIRequest aRequest, in nsISupports aContext); */
  167. NS_IMETHODIMP nsLoadGroup::AddRequest(nsIRequest *aRequest, nsISupports *aContext)
  168. {
  169. return NS_ERROR_NOT_IMPLEMENTED;
  170. }
  171. /* void removeRequest (in nsIRequest aRequest, in nsISupports aContext, in nsresult aStatus); */
  172. NS_IMETHODIMP nsLoadGroup::RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus)
  173. {
  174. return NS_ERROR_NOT_IMPLEMENTED;
  175. }
  176. /* readonly attribute nsISimpleEnumerator requests; */
  177. NS_IMETHODIMP nsLoadGroup::GetRequests(nsISimpleEnumerator * *aRequests)
  178. {
  179. return NS_ERROR_NOT_IMPLEMENTED;
  180. }
  181. /* readonly attribute unsigned long activeCount; */
  182. NS_IMETHODIMP nsLoadGroup::GetActiveCount(PRUint32 *aActiveCount)
  183. {
  184. return NS_ERROR_NOT_IMPLEMENTED;
  185. }
  186. /* attribute nsIInterfaceRequestor notificationCallbacks; */
  187. NS_IMETHODIMP nsLoadGroup::GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks)
  188. {
  189. return NS_ERROR_NOT_IMPLEMENTED;
  190. }
  191. NS_IMETHODIMP nsLoadGroup::SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks)
  192. {
  193. return NS_ERROR_NOT_IMPLEMENTED;
  194. }
  195. /* End of implementation class template. */
  196. #endif
  197. #endif /* __gen_nsILoadGroup_h__ */