Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsUnicodeToISO2022JP_h___
7 #define nsUnicodeToISO2022JP_h___
9 #include "nsUCSupport.h"
11 //----------------------------------------------------------------------
12 // Class nsUnicodeToISO2022JP [declaration]
14 /**
15 * A character set converter from Unicode to ISO2022JP.
16 *
17 * @created 17/Feb/1999
18 * @author Catalin Rotaru [CATA]
19 */
20 class nsUnicodeToISO2022JP : public nsEncoderSupport
21 {
22 public:
24 /**
25 * Class constructor.
26 */
27 nsUnicodeToISO2022JP();
29 /**
30 * Class destructor.
31 */
32 virtual ~nsUnicodeToISO2022JP();
34 protected:
36 int32_t mCharset; // current character set
38 nsresult ChangeCharset(int32_t aCharset, char * aDest,
39 int32_t * aDestLength);
40 nsresult ConvertHankaku(const char16_t *aSrc, int32_t * aSrcLength,
41 char *aDest, int32_t * aDestLength);
43 //--------------------------------------------------------------------
44 // Subclassing of nsEncoderSupport class [declaration]
46 NS_IMETHOD ConvertNoBuffNoErr(const char16_t * aSrc, int32_t * aSrcLength,
47 char * aDest, int32_t * aDestLength);
48 NS_IMETHOD FinishNoBuff(char * aDest, int32_t * aDestLength);
49 NS_IMETHOD Reset();
50 };
52 #endif /* nsUnicodeToISO2022JP_h___ */