2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07: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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* A character set converter from Unicode to GBK.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @created 08/Sept/1999
|
|
|
|
* @author Yueheng Xu, Yueheng.Xu@intel.com
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef nsUnicodeToHZ_h___
|
|
|
|
#define nsUnicodeToHZ_h___
|
|
|
|
|
|
|
|
#include "nsUCSupport.h"
|
|
|
|
#include "gbku.h"
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// Class nsUnicodeToHZ [declaration]
|
|
|
|
|
|
|
|
class nsUnicodeToHZ: public nsEncoderSupport
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class constructor.
|
|
|
|
*/
|
|
|
|
nsUnicodeToHZ();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// Subclassing of nsEncoderSupport class [declaration]
|
|
|
|
NS_IMETHOD ConvertNoBuff(const PRUnichar * aSrc,
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t * aSrcLength,
|
2007-03-22 10:30:00 -07:00
|
|
|
char * aDest,
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t * aDestLength);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
NS_IMETHOD FinishNoBuff(char * aDest, int32_t * aDestLength);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
NS_IMETHOD ConvertNoBuffNoErr(const PRUnichar * aSrc, int32_t * aSrcLength,
|
|
|
|
char * aDest, int32_t * aDestLength)
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
return NS_OK;
|
2007-04-23 07:21:53 -07:00
|
|
|
} // just make it not abstract;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
uint16_t mHZState;
|
2007-03-22 10:30:00 -07:00
|
|
|
protected:
|
|
|
|
nsGBKConvUtil mUtil;
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsUnicodeToHZ_h___ */
|