|
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/. */ |
|
5 |
|
6 #ifndef nsUnicodeToISO2022JP_h___ |
|
7 #define nsUnicodeToISO2022JP_h___ |
|
8 |
|
9 #include "nsUCSupport.h" |
|
10 |
|
11 //---------------------------------------------------------------------- |
|
12 // Class nsUnicodeToISO2022JP [declaration] |
|
13 |
|
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: |
|
23 |
|
24 /** |
|
25 * Class constructor. |
|
26 */ |
|
27 nsUnicodeToISO2022JP(); |
|
28 |
|
29 /** |
|
30 * Class destructor. |
|
31 */ |
|
32 virtual ~nsUnicodeToISO2022JP(); |
|
33 |
|
34 protected: |
|
35 |
|
36 int32_t mCharset; // current character set |
|
37 |
|
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); |
|
42 |
|
43 //-------------------------------------------------------------------- |
|
44 // Subclassing of nsEncoderSupport class [declaration] |
|
45 |
|
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 }; |
|
51 |
|
52 #endif /* nsUnicodeToISO2022JP_h___ */ |