Bug 1867190 - Add prefs for PHC probablities r=glandium
[gecko.git] / intl / uconv / nsTextToSubURI.h
blob1eaeb554dc89b90137d09148f8e02cb19318b1f4
1 // -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vim: set ts=2 et sw=2 tw=80:
3 // This Source Code is subject to the terms of the Mozilla Public License
4 // version 2.0 (the "License"). You can obtain a copy of the License at
5 // http://mozilla.org/MPL/2.0/.
6 #ifndef nsTextToSubURI_h__
7 #define nsTextToSubURI_h__
9 #include "nsITextToSubURI.h"
10 #include "nsString.h"
11 #include "nsTArray.h"
12 #include "mozilla/net/IDNBlocklistUtils.h"
14 class nsTextToSubURI : public nsITextToSubURI {
15 NS_DECL_ISUPPORTS
16 NS_DECL_NSITEXTTOSUBURI
18 // Thread-safe function for C++ callers
19 static nsresult UnEscapeNonAsciiURI(const nsACString& aCharset,
20 const nsACString& aURIFragment,
21 nsAString& _retval);
23 private:
24 virtual ~nsTextToSubURI();
26 // We assume that the URI is encoded as UTF-8.
27 static nsresult convertURItoUnicode(const nsCString& aCharset,
28 const nsCString& aURI,
29 nsAString& _retval);
31 // Characters defined in netwerk/dns/IDNCharacterBlocklist.inc or via the
32 // network.IDN.extra_allowed_chars and network.IDN.extra_blocked_chars prefs.
33 nsTArray<mozilla::net::BlocklistRange> mIDNBlocklist;
36 #endif // nsTextToSubURI_h__