nsISHContainer.idl 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2. *
  3. * This Source Code Form is subject to the terms of the Mozilla Public
  4. * License, v. 2.0. If a copy of the MPL was not distributed with this
  5. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  6. #include "nsISupports.idl"
  7. interface nsISHEntry;
  8. /**
  9. * The nsISHEntryContainer. The interface to access child entries
  10. * of an nsISHEntry.
  11. *
  12. */
  13. [scriptable, uuid(67dd0357-8372-4122-bff6-217435e8b7e4)]
  14. interface nsISHContainer : nsISupports
  15. {
  16. /**
  17. * The current number of nsISHEntries which are immediate children of the
  18. * current SHEntry
  19. */
  20. readonly attribute long childCount;
  21. /**
  22. * Add a new child SHEntry. If offset is -1 adds to the end of the list.
  23. */
  24. void AddChild(in nsISHEntry child, in long offset);
  25. /**
  26. * Removes a child SHEntry
  27. */
  28. void RemoveChild(in nsISHEntry child);
  29. /**
  30. * Get child at an index
  31. */
  32. nsISHEntry GetChildAt(in long index);
  33. /**
  34. * Replaces a child which is for the same docshell as aNewChild
  35. * with aNewChild.
  36. * @throw if nothing was replaced.
  37. */
  38. void ReplaceChild(in nsISHEntry aNewChild);
  39. };