txURIUtils.h 1021 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* -*- Mode: C++; tab-width: 4; 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. #ifndef TRANSFRMX_URIUTILS_H
  6. #define TRANSFRMX_URIUTILS_H
  7. #include "txCore.h"
  8. class nsIDocument;
  9. class nsINode;
  10. /**
  11. * A utility class for URI handling
  12. * Not yet finished, only handles file URI at this point
  13. **/
  14. class URIUtils {
  15. public:
  16. /**
  17. * Reset the given document with the document of the source node
  18. */
  19. static void ResetWithSource(nsIDocument *aNewDoc, nsINode *aSourceNode);
  20. /**
  21. * Resolves the given href argument, using the given documentBase
  22. * if necessary.
  23. * The new resolved href will be appended to the given dest String
  24. **/
  25. static void resolveHref(const nsAString& href, const nsAString& base,
  26. nsAString& dest);
  27. }; //-- URIUtils
  28. /* */
  29. #endif