|
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 #ifndef nsTextToSubURI_h__ |
|
6 #define nsTextToSubURI_h__ |
|
7 |
|
8 #include "nsITextToSubURI.h" |
|
9 |
|
10 //============================================================== |
|
11 class nsTextToSubURI: public nsITextToSubURI { |
|
12 NS_DECL_ISUPPORTS |
|
13 NS_DECL_NSITEXTTOSUBURI |
|
14 |
|
15 public: |
|
16 nsTextToSubURI(); |
|
17 virtual ~nsTextToSubURI(); |
|
18 |
|
19 private: |
|
20 // IRI is "Internationalized Resource Identifiers" |
|
21 // http://www.ietf.org/internet-drafts/draft-duerst-iri-01.txt |
|
22 // |
|
23 // if the IRI option is true then we assume that the URI is encoded as UTF-8 |
|
24 // note: there is no definite way to distinguish between IRI and a URI encoded |
|
25 // with a non-UTF-8 charset |
|
26 // Use this option carefully -- it may cause dataloss |
|
27 // (recommended to set to true for UI purpose only) |
|
28 // |
|
29 nsresult convertURItoUnicode(const nsAFlatCString &aCharset, |
|
30 const nsAFlatCString &aURI, |
|
31 bool aIRI, |
|
32 nsAString &_retval); |
|
33 }; |
|
34 |
|
35 #endif // nsTextToSubURI_h__ |
|
36 |