michael@0: /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: #ifndef nsPlatformCharset_h__ michael@0: #define nsPlatformCharset_h__ michael@0: michael@0: #include "nsIPlatformCharset.h" michael@0: michael@0: class nsPlatformCharset : public nsIPlatformCharset michael@0: { michael@0: NS_DECL_ISUPPORTS michael@0: michael@0: public: michael@0: michael@0: nsPlatformCharset(); michael@0: virtual ~nsPlatformCharset(); michael@0: michael@0: NS_IMETHOD Init(); michael@0: NS_IMETHOD GetCharset(nsPlatformCharsetSel selector, nsACString& oResult); michael@0: NS_IMETHOD GetDefaultCharsetForLocale(const nsAString& localeName, nsACString& oResult); michael@0: michael@0: private: michael@0: nsCString mCharset; michael@0: nsString mLocale; // remember the locale & charset michael@0: michael@0: nsresult MapToCharset(nsAString& inANSICodePage, nsACString& outCharset); michael@0: nsresult InitGetCharset(nsACString& oString); michael@0: nsresult VerifyCharset(nsCString &aCharset); michael@0: }; michael@0: michael@0: #endif // nsPlatformCharset_h__ michael@0: michael@0: