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