tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

txURIUtils.h (1095B)


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