Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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 nsPlatformCharset_h__
6 #define nsPlatformCharset_h__
8 #include "nsIPlatformCharset.h"
10 class nsPlatformCharset : public nsIPlatformCharset
11 {
12 NS_DECL_ISUPPORTS
14 public:
16 nsPlatformCharset();
17 virtual ~nsPlatformCharset();
19 NS_IMETHOD Init();
20 NS_IMETHOD GetCharset(nsPlatformCharsetSel selector, nsACString& oResult);
21 NS_IMETHOD GetDefaultCharsetForLocale(const nsAString& localeName, nsACString& oResult);
23 private:
24 nsCString mCharset;
25 nsString mLocale; // remember the locale & charset
27 nsresult MapToCharset(nsAString& inANSICodePage, nsACString& outCharset);
28 nsresult InitGetCharset(nsACString& oString);
29 nsresult VerifyCharset(nsCString &aCharset);
30 };
32 #endif // nsPlatformCharset_h__