libkdepim

qutf7codec.h

00001 /*
00002   qutf7codec.h
00003 
00004   A QTextCodec for UTF-7 (rfc2152).
00005   Copyright (c) 2001 Marc Mutz <mutz@kde.org>
00006   See file COPYING for details
00007 
00008   This program is free software; you can redistribute it and/or modify
00009   it under the terms of the GNU General Public License, version 2.0,
00010   as published by the Free Software Foundation.
00011 
00012   You should have received a copy of the GNU General Public License
00013   along with this program; if not, write to the Free Software
00014   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00015   02110-1301, US
00016 
00017   As a special exception, permission is granted to use this plugin
00018   with any version of Qt by TrollTech AS, Norway. In this case, the
00019   use of this plugin doesn't cause the resulting executable to be
00020   covered by the GNU General Public License.
00021   This exception does not however invalidate any other reasons why the
00022   executable file might be covered by the GNU General Public License.
00023 */
00024 
00025 #ifndef QUTF7CODEC_H
00026 #define QUTF7CODEC_H
00027 
00028 #ifndef QT_H
00029 #include "qtextcodec.h"
00030 #endif
00031 
00032 #include <kdepimmacros.h>
00033 
00034 #ifndef QT_NO_TEXTCODEC
00035 
00050 class KDE_EXPORT QUtf7Codec : public QTextCodec {
00051     bool encOpt, encLwsp;
00052 public:
00053     QUtf7Codec() : QTextCodec() {}
00054 
00055     int mibEnum() const;
00056     const char* name() const;
00057     const char* mimeName() const;
00058 
00059     QTextDecoder* makeDecoder() const;
00060     QTextEncoder* makeEncoder() const;
00061 
00062     bool canEncode( QChar ) const;
00063     bool canEncode( const QString& ) const;
00064 
00065     int heuristicContentMatch( const char* chars, int len ) const;
00066 };
00067 
00086 class KDE_EXPORT QStrictUtf7Codec : public QUtf7Codec {
00087 public:
00088   QStrictUtf7Codec() : QUtf7Codec() {}
00089 
00090   const char* name() const;
00091   int mibEnum() const;
00092 
00093   QTextEncoder* makeEncoder() const;
00094 };
00095 
00096 #endif // QT_NO_TEXTCODEC
00097 
00098 #endif // QUTF7CODEC_H
KDE Home | KDE Accessibility Home | Description of Access Keys