/gecko_sdk/idl/nsILoadGroup.idl

http://firefox-mac-pdf.googlecode.com/ · IDL · 108 lines · 18 code · 9 blank · 81 comment · 0 complexity · d1e33178af7353f8109881ff1a23367d MD5 · raw file

  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. #include "nsIRequest.idl"
  38. interface nsISimpleEnumerator;
  39. interface nsIRequestObserver;
  40. interface nsIInterfaceRequestor;
  41. /**
  42. * A load group maintains a collection of nsIRequest objects.
  43. *
  44. * @status FROZEN
  45. */
  46. [scriptable, uuid(3de0a31c-feaf-400f-9f1e-4ef71f8b20cc)]
  47. interface nsILoadGroup : nsIRequest
  48. {
  49. /**
  50. * The group observer is notified when requests are added to and removed
  51. * from this load group. The groupObserver is weak referenced.
  52. */
  53. attribute nsIRequestObserver groupObserver;
  54. /**
  55. * Accesses the default load request for the group. Each time a number
  56. * of requests are added to a group, the defaultLoadRequest may be set
  57. * to indicate that all of the requests are related to a base request.
  58. *
  59. * The load group inherits its load flags from the default load request.
  60. * If the default load request is NULL, then the group's load flags are
  61. * not changed.
  62. */
  63. attribute nsIRequest defaultLoadRequest;
  64. /**
  65. * Adds a new request to the group. This will cause the default load
  66. * flags to be applied to the request. If this is a foreground
  67. * request then the groupObserver's onStartRequest will be called.
  68. *
  69. * If the request is the default load request or if the default load
  70. * request is null, then the load group will inherit its load flags from
  71. * the request.
  72. */
  73. void addRequest(in nsIRequest aRequest,
  74. in nsISupports aContext);
  75. /**
  76. * Removes a request from the group. If this is a foreground request
  77. * then the groupObserver's onStopRequest will be called.
  78. *
  79. * By the time this call ends, aRequest will have been removed from the
  80. * loadgroup, even if this function throws an exception.
  81. */
  82. void removeRequest(in nsIRequest aRequest,
  83. in nsISupports aContext,
  84. in nsresult aStatus);
  85. /**
  86. * Returns the requests contained directly in this group.
  87. * Enumerator element type: nsIRequest.
  88. */
  89. readonly attribute nsISimpleEnumerator requests;
  90. /**
  91. * Returns the count of "active" requests (ie. requests without the
  92. * LOAD_BACKGROUND bit set).
  93. */
  94. readonly attribute unsigned long activeCount;
  95. /**
  96. * Notification callbacks for the load group.
  97. */
  98. attribute nsIInterfaceRequestor notificationCallbacks;
  99. };