nsIURIRefObject.idl 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  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. #include "domstubs.idl"
  7. interface nsIDOMNode;
  8. /** A class which can represent any node which points to an
  9. * external URI, e.g. <a>, <img>, <script> etc,
  10. * and has the capability to rewrite URLs to be
  11. * relative or absolute.
  12. * Used by the editor but not dependant on it.
  13. */
  14. [scriptable, uuid(2226927e-1dd2-11b2-b57f-faab47288563)]
  15. interface nsIURIRefObject : nsISupports
  16. {
  17. attribute nsIDOMNode node;
  18. /**
  19. * Go back to the beginning of the attribute list.
  20. */
  21. void Reset();
  22. /**
  23. * Return the next rewritable URI.
  24. */
  25. DOMString GetNextURI();
  26. /**
  27. * Go back to the beginning of the attribute list
  28. *
  29. * @param aOldPat Old pattern to be replaced, e.g. file:///a/b/
  30. * @param aNewPat New pattern to be replaced, e.g. http://mypage.aol.com/
  31. * @param aMakeRel Rewrite links as relative vs. absolute
  32. */
  33. void RewriteAllURIs(in DOMString aOldPat, in DOMString aNewPat,
  34. in boolean aMakeRel);
  35. };