kioslaves

rfcdecoder.h

Go to the documentation of this file.
00001 #ifndef RFCDECODER_H
00002 #define RFCDECODER_H
00003 /**********************************************************************
00004  *
00005  *   rfcdecoder.h  - handler for various rfc/mime encodings
00006  *   Copyright (C) 2000 s.carstens@gmx.de
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 as published by
00010  *   the Free Software Foundation; either version 2 of the License, or
00011  *   (at your option) any later version.
00012  *
00013  *   This program is distributed in the hope that it will be useful,
00014  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  *   GNU General Public License for more details.
00017  *
00018  *   You should have received a copy of the GNU General Public License
00019  *   along with this program; if not, write to the Free Software
00020  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00021  *
00022  *   Send comments and bug fixes to s.carstens@gmx.de
00023  *
00024  *********************************************************************/
00025 
00026 #include <qstring.h>
00027 
00028 class QTextCodec;
00029 
00036 class rfcDecoder
00037 {
00038 
00039 public:
00040 
00043   static QString fromIMAP (const QString & src);
00046   static QString toIMAP (const QString & inSrc);
00048   static QString quoteIMAP (const QString & src);
00049 
00053   static QString decodeQuoting(const QString &aStr);
00054 
00059   static QTextCodec *codecForName (const QString &);
00060 
00061   // decoder for RFC2047 and RFC1522
00063   static const QString decodeRFC2047String (const QString & _str,
00064                                             QString & charset,
00065                                             QString & language);
00067   static const QString decodeRFC2047String (const QString & _str,
00068                                             QString & charset);
00070   static const QString decodeRFC2047String (const QString & _str);
00071 
00072   // encoder for RFC2047 and RFC1522
00074   static const QString encodeRFC2047String (const QString & _str,
00075                                             QString & charset,
00076                                             QString & language);
00078   static const QString encodeRFC2047String (const QString & _str,
00079                                             QString & charset);
00081   static const QString encodeRFC2047String (const QString & _str);
00082 
00084   static const QString encodeRFC2231String (const QString & _str);
00086   static const QString decodeRFC2231String (const QString & _str);
00087 };
00088 
00089 #endif