intl/uconv/src/nsTextToSubURI.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/intl/uconv/src/nsTextToSubURI.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,36 @@
     1.4 +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +#ifndef nsTextToSubURI_h__
     1.9 +#define nsTextToSubURI_h__
    1.10 +
    1.11 +#include "nsITextToSubURI.h"
    1.12 +
    1.13 +//==============================================================
    1.14 +class nsTextToSubURI: public nsITextToSubURI {
    1.15 +  NS_DECL_ISUPPORTS
    1.16 +  NS_DECL_NSITEXTTOSUBURI
    1.17 +
    1.18 +public:
    1.19 +  nsTextToSubURI();
    1.20 +  virtual ~nsTextToSubURI();
    1.21 +
    1.22 +private:
    1.23 +  // IRI is "Internationalized Resource Identifiers"
    1.24 +  // http://www.ietf.org/internet-drafts/draft-duerst-iri-01.txt
    1.25 +  // 
    1.26 +  // if the IRI option is true then we assume that the URI is encoded as UTF-8
    1.27 +  // note: there is no definite way to distinguish between IRI and a URI encoded 
    1.28 +  // with a non-UTF-8 charset
    1.29 +  // Use this option carefully -- it may cause dataloss
    1.30 +  // (recommended to set to true for UI purpose only)
    1.31 +  //
    1.32 +  nsresult convertURItoUnicode(const nsAFlatCString &aCharset,
    1.33 +                               const nsAFlatCString &aURI, 
    1.34 +                               bool aIRI, 
    1.35 +                               nsAString &_retval);
    1.36 +};
    1.37 +
    1.38 +#endif // nsTextToSubURI_h__
    1.39 +

mercurial