nsINestedURI.idl 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #include "nsISupports.idl"
  6. interface nsIURI;
  7. /**
  8. * nsINestedURI is an interface that must be implemented by any nsIURI
  9. * implementation which has an "inner" URI that it actually gets data
  10. * from.
  11. *
  12. * For example, if URIs for the scheme "sanitize" have the structure:
  13. *
  14. * sanitize:http://example.com
  15. *
  16. * and opening a channel on such a sanitize: URI gets the data from
  17. * http://example.com, sanitizes it, and returns it, then the sanitize: URI
  18. * should implement nsINestedURI and return the http://example.com URI as its
  19. * inner URI.
  20. */
  21. [scriptable, uuid(6de2c874-796c-46bf-b57f-0d7bd7d6cab0)]
  22. interface nsINestedURI : nsISupports
  23. {
  24. /**
  25. * The inner URI for this nested URI. This must not return null if the
  26. * getter succeeds; URIs that have no inner must not QI to this interface.
  27. * Dynamically changing whether there is an inner URI is not allowed.
  28. *
  29. * Modifying the returned URI must not in any way modify the nested URI; this
  30. * means the returned URI must be either immutable or a clone.
  31. */
  32. readonly attribute nsIURI innerURI;
  33. /**
  34. * The innermost URI for this nested URI. This must not return null if the
  35. * getter succeeds. This is equivalent to repeatedly calling innerURI while
  36. * the returned URI QIs to nsINestedURI.
  37. *
  38. * Modifying the returned URI must not in any way modify the nested URI; this
  39. * means the returned URI must be either immutable or a clone.
  40. */
  41. readonly attribute nsIURI innermostURI;
  42. };