|
1 /* -*- Mode: C; tab-width: 4; 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 /** |
|
7 * A character set converter from Unicode to GBK. |
|
8 * |
|
9 * |
|
10 * @created 08/Sept/1999 |
|
11 * @author Yueheng Xu, Yueheng.Xu@intel.com |
|
12 */ |
|
13 |
|
14 #ifndef nsUnicodeToHZ_h___ |
|
15 #define nsUnicodeToHZ_h___ |
|
16 |
|
17 #include "nsUCSupport.h" |
|
18 #include "nsGBKConvUtil.h" |
|
19 //---------------------------------------------------------------------- |
|
20 // Class nsUnicodeToHZ [declaration] |
|
21 |
|
22 class nsUnicodeToHZ: public nsEncoderSupport |
|
23 { |
|
24 public: |
|
25 |
|
26 /** |
|
27 * Class constructor. |
|
28 */ |
|
29 nsUnicodeToHZ(); |
|
30 |
|
31 protected: |
|
32 |
|
33 //-------------------------------------------------------------------- |
|
34 // Subclassing of nsEncoderSupport class [declaration] |
|
35 NS_IMETHOD ConvertNoBuff(const char16_t * aSrc, |
|
36 int32_t * aSrcLength, |
|
37 char * aDest, |
|
38 int32_t * aDestLength); |
|
39 |
|
40 NS_IMETHOD FinishNoBuff(char * aDest, int32_t * aDestLength); |
|
41 |
|
42 NS_IMETHOD ConvertNoBuffNoErr(const char16_t * aSrc, int32_t * aSrcLength, |
|
43 char * aDest, int32_t * aDestLength) |
|
44 { |
|
45 return NS_OK; |
|
46 } // just make it not abstract; |
|
47 |
|
48 uint16_t mHZState; |
|
49 protected: |
|
50 nsGBKConvUtil mUtil; |
|
51 |
|
52 |
|
53 }; |
|
54 |
|
55 #endif /* nsUnicodeToHZ_h___ */ |