2001-12-08 03:25:28 +03:00
|
|
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2001-12-08 03:25:28 +03:00
|
|
|
#ifndef nsPlatformCharset_h__
|
|
|
|
#define nsPlatformCharset_h__
|
|
|
|
|
|
|
|
#include "nsIPlatformCharset.h"
|
|
|
|
|
2017-03-31 04:40:19 +03:00
|
|
|
class nsPlatformCharset final : public nsIPlatformCharset
|
2001-12-08 03:25:28 +03:00
|
|
|
{
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
nsPlatformCharset();
|
|
|
|
|
|
|
|
NS_IMETHOD Init();
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD GetCharset(nsPlatformCharsetSel selector, nsACString& oResult) override;
|
2001-12-08 03:25:28 +03:00
|
|
|
|
|
|
|
private:
|
2003-06-11 22:16:03 +04:00
|
|
|
nsCString mCharset;
|
2001-12-08 03:25:28 +03:00
|
|
|
nsString mLocale; // remember the locale & charset
|
|
|
|
|
2003-06-11 22:16:03 +04:00
|
|
|
nsresult MapToCharset(nsAString& inANSICodePage, nsACString& outCharset);
|
|
|
|
nsresult InitGetCharset(nsACString& oString);
|
|
|
|
nsresult VerifyCharset(nsCString &aCharset);
|
2014-06-24 02:40:02 +04:00
|
|
|
|
|
|
|
virtual ~nsPlatformCharset();
|
2001-12-08 03:25:28 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsPlatformCharset_h__
|
|
|
|
|
|
|
|
|