intl/uconv/ucvcn/nsHZToUnicode.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/intl/uconv/ucvcn/nsHZToUnicode.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,46 @@
     1.4 +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef nsHZToUnicode_h___
    1.10 +#define nsHZToUnicode_h___
    1.11 +
    1.12 +#include "nsUCSupport.h"
    1.13 +#include "nsGBKConvUtil.h"
    1.14 +
    1.15 +//----------------------------------------------------------------------
    1.16 +// Class nsHZToUnicode [declaration]
    1.17 +
    1.18 +/**
    1.19 + * A character set converter from GBK to Unicode.
    1.20 + * 
    1.21 + *
    1.22 + * @created         08/Sept/1999
    1.23 + * @author  Yueheng Xu, Yueheng.Xu@intel.com
    1.24 + */
    1.25 +class nsHZToUnicode : public nsBufferDecoderSupport
    1.26 +{
    1.27 +public:
    1.28 +		
    1.29 +  /**
    1.30 +   * Class constructor.
    1.31 +   */
    1.32 +  nsHZToUnicode();
    1.33 +
    1.34 +protected:
    1.35 +
    1.36 +  //--------------------------------------------------------------------
    1.37 +  // Subclassing of nsDecoderSupport class [declaration]
    1.38 +  NS_IMETHOD ConvertNoBuff(const char* aSrc, int32_t * aSrcLength, 
    1.39 +                           char16_t *aDest, int32_t * aDestLength); 
    1.40 +  nsGBKConvUtil mUtil;
    1.41 +
    1.42 +private:
    1.43 +  int16_t mHZState;
    1.44 +  uint32_t mRunLength; // length of a run of 8-bit GB-encoded characters
    1.45 +  char mOddByte; // first byte of a multi-byte sequence from a previous buffer
    1.46 +
    1.47 +};
    1.48 +
    1.49 +#endif /* nsHZToUnicode_h___ */

mercurial