2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; 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
|
|
|
|
|
|
|
#ifndef nsUnicodeToISO2022JP_h___
|
|
|
|
#define nsUnicodeToISO2022JP_h___
|
|
|
|
|
|
|
|
#include "nsUCSupport.h"
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// Class nsUnicodeToISO2022JP [declaration]
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A character set converter from Unicode to ISO2022JP.
|
|
|
|
*
|
|
|
|
* @created 17/Feb/1999
|
|
|
|
* @author Catalin Rotaru [CATA]
|
|
|
|
*/
|
|
|
|
class nsUnicodeToISO2022JP : public nsEncoderSupport
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class constructor.
|
|
|
|
*/
|
|
|
|
nsUnicodeToISO2022JP();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class destructor.
|
|
|
|
*/
|
|
|
|
virtual ~nsUnicodeToISO2022JP();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t mCharset; // current character set
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-08-22 08:56:38 -07:00
|
|
|
nsresult ChangeCharset(int32_t aCharset, char * aDest,
|
|
|
|
int32_t * aDestLength);
|
2014-01-04 07:02:17 -08:00
|
|
|
nsresult ConvertHankaku(const char16_t *aSrc, int32_t * aSrcLength,
|
2012-08-22 08:56:38 -07:00
|
|
|
char *aDest, int32_t * aDestLength);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
// Subclassing of nsEncoderSupport class [declaration]
|
|
|
|
|
2014-01-04 07:02:17 -08:00
|
|
|
NS_IMETHOD ConvertNoBuffNoErr(const char16_t * aSrc, int32_t * aSrcLength,
|
2012-08-22 08:56:38 -07:00
|
|
|
char * aDest, int32_t * aDestLength);
|
|
|
|
NS_IMETHOD FinishNoBuff(char * aDest, int32_t * aDestLength);
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_IMETHOD Reset();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsUnicodeToISO2022JP_h___ */
|