1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim:expandtab:shiftwidth=2:tabstop=2:
4
/* ***** BEGIN LICENSE BLOCK *****
5
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
7
* The contents of this file are subject to the Netscape Public License
8
* Version 1.1 (the "License"); you may not use this file except in
9
* compliance with the License. You may obtain a copy of the License at
10
* http://www.mozilla.org/NPL/
12
* Software distributed under the License is distributed on an "AS IS" basis,
13
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14
* for the specific language governing rights and limitations under the
17
* The Original Code is Mozilla Communicator client code.
19
* The Initial Developer of the Original Code is
20
* Netscape Communications Corporation.
21
* Portions created by the Initial Developer are Copyright (C) 1998
22
* the Initial Developer. All Rights Reserved.
24
* Contributor(s): Jungshik Shin <jshin@mailaps.org>
27
* Alternatively, the contents of this file may be used under the terms of
28
* either the GNU General Public License Version 2 or later (the "GPL"), or
29
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30
* in which case the provisions of the GPL or the LGPL are applicable instead
31
* of those above. If you wish to allow use of your version of this file only
32
* under the terms of either the GPL or the LGPL, and not to allow others to
33
* use your version of this file under the terms of the NPL, indicate your
34
* decision by deleting the provisions above and replace them with the notice
35
* and other provisions required by the GPL or the LGPL. If you do not delete
36
* the provisions above, a recipient may use your version of this file under
37
* the terms of any one of the NPL, the GPL or the LGPL.
39
* ***** END LICENSE BLOCK ***** */
41
#ifndef nsUTF32ToUnicode_h___
42
#define nsUTF32ToUnicode_h___
44
//----------------------------------------------------------------------
45
// Class nsUTF32ToUnicode [declaration]
48
* A character set converter from UTF32 to Unicode.
49
* The base class for UTF32BE/UTF32LE to Unicode converters.
50
* @created 08/Dec/2002
51
* @author Jungshik Shin
54
class nsUTF32ToUnicode : public nsBasicDecoderSupport
66
// the number of additional bytes to read to complete an incomplete UTF-32 4byte seq.
68
// buffer for an incomplete UTF-32 sequence.
69
PRUint8 mBufferInc[4];
71
//--------------------------------------------------------------------
72
// Subclassing of nsBasicDecoderSupport class [declaration]
74
NS_IMETHOD GetMaxLength(const char * aSrc, PRInt32 aSrcLength,
75
PRInt32 * aDestLength);
81
//----------------------------------------------------------------------
82
// Class nsUTF32BEToUnicode [declaration]
85
* A character set converter from UTF32BE to Unicode.
86
* A subclass of UTF32ToUnicode.
87
* @created 08/Dec/2002
88
* @author Jungshik Shin
91
class nsUTF32BEToUnicode : public nsUTF32ToUnicode
96
//--------------------------------------------------------------------
97
// Subclassing of nsBasicDecoderSupport class [declaration]
99
NS_IMETHOD Convert(const char * aSrc, PRInt32 * aSrcLength,
100
PRUnichar * aDest, PRInt32 * aDestLength);
105
//----------------------------------------------------------------------
106
// Class nsUTF32LEToUnicode [declaration]
109
* A character set converter from UTF32LE to Unicode.
110
* A subclass of UTF32ToUnicode.
111
* @created 08/Dec/2002
112
* @author Jungshik Shin
115
class nsUTF32LEToUnicode : public nsUTF32ToUnicode
120
//--------------------------------------------------------------------
121
// Subclassing of nsBasicDecoderSupport class [declaration]
123
NS_IMETHOD Convert(const char * aSrc, PRInt32 * aSrcLength,
124
PRUnichar * aDest, PRInt32 * aDestLength);
128
#endif /* nsUTF32ToUnicode_h___ */