1
/****************************************************************************
3
** Copyright (C) 1992-2005 Trolltech AS. All rights reserved.
5
** This file is part of the internationalization module of the Qt Toolkit.
7
** This file may be distributed under the terms of the Q Public License
8
** as defined by Trolltech AS of Norway and appearing in the file
9
** LICENSE.QPL included in the packaging of this file.
11
** This file may be distributed and/or modified under the terms of the
12
** GNU General Public License version 2 as published by the Free Software
13
** Foundation and appearing in the file LICENSE.GPL included in the
14
** packaging of this file.
16
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
17
** information about Qt Commercial License Agreements.
18
** See http://www.trolltech.com/qpl/ for QPL licensing information.
19
** See http://www.trolltech.com/gpl/ for GPL licensing information.
21
** Contact info@trolltech.com if any conditions of this licensing are
24
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
25
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27
****************************************************************************/
29
// Contributed by James Su <suzhe@gnuchina.org>
31
#ifndef QGB18030CODEC_H
32
#define QGB18030CODEC_H
34
#include "qtextcodec.h"
37
class QGb18030Codec : public QTextCodec {
41
static QByteArray _name() { return "GB18030"; }
42
static QList<QByteArray> _aliases() { return QList<QByteArray>(); }
43
static int _mibEnum() { return 114; }
45
QByteArray name() const { return _name(); }
46
QList<QByteArray> aliases() const { return _aliases(); }
47
int mibEnum() const { return _mibEnum(); }
49
QString convertToUnicode(const char *, int, ConverterState *) const;
50
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;
53
class QGbkCodec : public QGb18030Codec {
57
static QByteArray _name();
58
static QList<QByteArray> _aliases();
59
static int _mibEnum();
61
QByteArray name() const { return _name(); }
62
QList<QByteArray> aliases() const { return _aliases(); }
63
int mibEnum() const { return _mibEnum(); }
65
QString convertToUnicode(const char *, int, ConverterState *) const;
66
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;
69
class QGb2312Codec : public QGb18030Codec {
73
static QByteArray _name();
74
static QList<QByteArray> _aliases() { return QList<QByteArray>(); }
75
static int _mibEnum();
77
QByteArray name() const { return _name(); }
78
int mibEnum() const { return _mibEnum(); }
80
QString convertToUnicode(const char *, int, ConverterState *) const;
81
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;
86
class QFontGb2312Codec : public QTextCodec
91
static QByteArray _name();
92
static QList<QByteArray> _aliases() { return QList<QByteArray>(); }
93
static int _mibEnum();
95
QByteArray name() const { return _name(); }
96
int mibEnum() const { return _mibEnum(); }
98
QString convertToUnicode(const char *, int, ConverterState *) const;
99
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;
103
class QFontGbkCodec : public QTextCodec
108
static QByteArray _name();
109
static QList<QByteArray> _aliases() { return QList<QByteArray>(); }
110
static int _mibEnum();
112
QByteArray name() const { return _name(); }
113
QList<QByteArray> aliases() const { return _aliases(); }
114
int mibEnum() const { return _mibEnum(); }
116
QString convertToUnicode(const char *, int, ConverterState *) const;
117
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;
120
class QFontGb18030_0Codec : public QTextCodec
123
QFontGb18030_0Codec();
125
static QByteArray _name();
126
static QList<QByteArray> _aliases() { return QList<QByteArray>(); }
127
static int _mibEnum();
129
QByteArray name() const { return _name(); }
130
QList<QByteArray> aliases() const { return _aliases(); }
131
int mibEnum() const { return _mibEnum(); }
133
QString convertToUnicode(const char *, int, ConverterState *) const;
134
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;
139
#endif // QGB18030CODEC_H