intl/uconv/ucvcn/nsHZToUnicode.h

branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
equal deleted inserted replaced
-1:000000000000 0:ef07733fbef0
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 #ifndef nsHZToUnicode_h___
7 #define nsHZToUnicode_h___
8
9 #include "nsUCSupport.h"
10 #include "nsGBKConvUtil.h"
11
12 //----------------------------------------------------------------------
13 // Class nsHZToUnicode [declaration]
14
15 /**
16 * A character set converter from GBK to Unicode.
17 *
18 *
19 * @created 08/Sept/1999
20 * @author Yueheng Xu, Yueheng.Xu@intel.com
21 */
22 class nsHZToUnicode : public nsBufferDecoderSupport
23 {
24 public:
25
26 /**
27 * Class constructor.
28 */
29 nsHZToUnicode();
30
31 protected:
32
33 //--------------------------------------------------------------------
34 // Subclassing of nsDecoderSupport class [declaration]
35 NS_IMETHOD ConvertNoBuff(const char* aSrc, int32_t * aSrcLength,
36 char16_t *aDest, int32_t * aDestLength);
37 nsGBKConvUtil mUtil;
38
39 private:
40 int16_t mHZState;
41 uint32_t mRunLength; // length of a run of 8-bit GB-encoded characters
42 char mOddByte; // first byte of a multi-byte sequence from a previous buffer
43
44 };
45
46 #endif /* nsHZToUnicode_h___ */

mercurial