2001-09-26 04:40:45 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; 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/. */
|
1999-09-08 00:04:53 +04:00
|
|
|
|
|
|
|
#ifndef nsUnicodeToGB2312V2_h___
|
|
|
|
#define nsUnicodeToGB2312V2_h___
|
|
|
|
|
2002-08-12 23:16:16 +04:00
|
|
|
#include "nsUCSupport.h"
|
2001-05-15 16:52:29 +04:00
|
|
|
#include "gbku.h"
|
1999-09-08 00:04:53 +04:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// Class nsUnicodeToGB2312V2 [declaration]
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A character set converter from Unicode to GB2312.
|
|
|
|
*
|
|
|
|
* @created 06/Apr/1999
|
|
|
|
* @author Catalin Rotaru [CATA]
|
|
|
|
*/
|
1999-09-22 07:35:31 +04:00
|
|
|
class nsUnicodeToGB2312V2 : public nsEncoderSupport
|
1999-09-08 00:04:53 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class constructor.
|
|
|
|
*/
|
1999-10-21 04:17:48 +04:00
|
|
|
nsUnicodeToGB2312V2();
|
1999-09-08 00:04:53 +04:00
|
|
|
|
1999-09-08 00:35:56 +04:00
|
|
|
protected:
|
|
|
|
|
1999-09-08 00:42:49 +04:00
|
|
|
NS_IMETHOD ConvertNoBuff(const PRUnichar * aSrc,
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t * aSrcLength,
|
1999-09-08 00:04:53 +04:00
|
|
|
char * aDest,
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t * aDestLength);
|
1999-09-08 00:04:53 +04:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// Subclassing of nsEncoderSupport class [declaration]
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
NS_IMETHOD ConvertNoBuffNoErr(const PRUnichar * aSrc, int32_t * aSrcLength,
|
|
|
|
char * aDest, int32_t * aDestLength)
|
1999-09-22 07:35:31 +04:00
|
|
|
{
|
|
|
|
return NS_OK;
|
2007-04-23 18:21:53 +04:00
|
|
|
} // just make it not abstract;
|
1999-09-22 07:35:31 +04:00
|
|
|
|
2001-05-15 16:52:29 +04:00
|
|
|
protected:
|
|
|
|
nsGBKConvUtil mUtil;
|
1999-09-08 00:04:53 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsUnicodeToGB2312V2_h___ */
|