libtdepim

qutf7codec.h
00001 /*
00002   qutf7codec.h
00003 
00004   A TQTextCodec 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 TQt 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 TQUTF7CODEC_H
00026 #define TQUTF7CODEC_H
00027 
00028 #include "tqtextcodec.h"
00029 
00030 #include <tdepimmacros.h>
00031 
00032 #ifndef TQT_NO_TEXTCODEC
00033 
00048 class KDE_EXPORT TQUtf7Codec : public TQTextCodec {
00049     bool encOpt, encLwsp;
00050 public:
00051     TQUtf7Codec() : TQTextCodec() {}
00052 
00053     int mibEnum() const;
00054     const char* name() const;
00055     const char* mimeName() const;
00056 
00057     TQTextDecoder* makeDecoder() const;
00058     TQTextEncoder* makeEncoder() const;
00059 
00060     bool canEncode( TQChar ) const;
00061     bool canEncode( const TQString& ) const;
00062 
00063     int heuristicContentMatch( const char* chars, int len ) const;
00064 };
00065 
00084 class KDE_EXPORT TQStrictUtf7Codec : public TQUtf7Codec {
00085 public:
00086   TQStrictUtf7Codec() : TQUtf7Codec() {}
00087 
00088   const char* name() const;
00089   int mibEnum() const;
00090 
00091   TQTextEncoder* makeEncoder() const;
00092 };
00093 
00094 #endif // TQT_NO_TEXTCODEC
00095 
00096 #endif // TQUTF7CODEC_H