1 | /****************************************************************************
|
---|
2 | ** $Id: qeuckrcodec.h 2 2005-11-16 15:49:26Z dmik $
|
---|
3 | **
|
---|
4 | ** Definition of QEucKrCodec class
|
---|
5 | **
|
---|
6 | ** Created : 990303
|
---|
7 | **
|
---|
8 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
|
---|
9 | **
|
---|
10 | ** This file is part of the tools module of the Qt GUI Toolkit.
|
---|
11 | **
|
---|
12 | ** This file may be distributed under the terms of the Q Public License
|
---|
13 | ** as defined by Trolltech AS of Norway and appearing in the file
|
---|
14 | ** LICENSE.QPL included in the packaging of this file.
|
---|
15 | **
|
---|
16 | ** This file may be distributed and/or modified under the terms of the
|
---|
17 | ** GNU General Public License version 2 as published by the Free Software
|
---|
18 | ** Foundation and appearing in the file LICENSE.GPL included in the
|
---|
19 | ** packaging of this file.
|
---|
20 | **
|
---|
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
|
---|
22 | ** licenses may use this file in accordance with the Qt Commercial License
|
---|
23 | ** Agreement provided with the Software.
|
---|
24 | **
|
---|
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
---|
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
---|
27 | **
|
---|
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
|
---|
29 | ** information about Qt Commercial License Agreements.
|
---|
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information.
|
---|
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information.
|
---|
32 | **
|
---|
33 | ** Contact info@trolltech.com if any conditions of this licensing are
|
---|
34 | ** not clear to you.
|
---|
35 | **
|
---|
36 | **********************************************************************/
|
---|
37 |
|
---|
38 | /*
|
---|
39 | * Copyright (C) 1999-2000 Mizi Research Inc. All rights reserved.
|
---|
40 | *
|
---|
41 | * Redistribution and use in source and binary forms, with or without
|
---|
42 | * modification, are permitted provided that the following conditions
|
---|
43 | * are met:
|
---|
44 | * 1. Redistributions of source code must retain the above copyright
|
---|
45 | * notice, this list of conditions and the following disclaimer.
|
---|
46 | * 2. Redistributions in binary form must reproduce the above copyright
|
---|
47 | * notice, this list of conditions and the following disclaimer in the
|
---|
48 | * documentation and/or other materials provided with the distribution.
|
---|
49 | *
|
---|
50 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
---|
51 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
---|
52 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
---|
53 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
---|
54 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
---|
55 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
---|
56 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
---|
57 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
---|
58 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
---|
59 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
---|
60 | * SUCH DAMAGE.
|
---|
61 | */
|
---|
62 |
|
---|
63 | #ifndef QEUCKRCODEC_H
|
---|
64 | #define QEUCKRCODEC_H
|
---|
65 |
|
---|
66 | #ifndef QT_H
|
---|
67 | #include "qtextcodec.h"
|
---|
68 | #endif // QT_H
|
---|
69 |
|
---|
70 | #ifndef QT_NO_BIG_CODECS
|
---|
71 |
|
---|
72 | #if defined(QT_PLUGIN)
|
---|
73 | #define Q_EXPORT_CODECS_KR
|
---|
74 | #else
|
---|
75 | #define Q_EXPORT_CODECS_KR Q_EXPORT
|
---|
76 | #endif
|
---|
77 |
|
---|
78 | class Q_EXPORT_CODECS_KR QEucKrCodec : public QTextCodec {
|
---|
79 | public:
|
---|
80 | virtual int mibEnum() const;
|
---|
81 | const char* name() const;
|
---|
82 | const char* mimeName() const;
|
---|
83 |
|
---|
84 | QTextDecoder* makeDecoder() const;
|
---|
85 |
|
---|
86 | #if !defined(Q_NO_USING_KEYWORD)
|
---|
87 | using QTextCodec::fromUnicode;
|
---|
88 | #endif
|
---|
89 | QCString fromUnicode(const QString& uc, int& lenInOut) const;
|
---|
90 | QString toUnicode(const char* chars, int len) const;
|
---|
91 |
|
---|
92 | int heuristicContentMatch(const char* chars, int len) const;
|
---|
93 | int heuristicNameMatch(const char* hint) const;
|
---|
94 | };
|
---|
95 |
|
---|
96 | #endif
|
---|
97 | #endif
|
---|