kioslaves/imap4

rfcdecoder.h
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 <tqstring.h>
00027 
00028 class TQTextCodec;
00029 
00036 class rfcDecoder
00037 {
00038 
00039 public:
00040 
00043   static TQString fromIMAP (const TQString & src);
00046   static TQString toIMAP (const TQString & inSrc);
00048   static TQString quoteIMAP (const TQString & src);
00049 
00053   static TQString decodeQuoting(const TQString &aStr);
00054 
00059   static TQTextCodec *codecForName (const TQString &);
00060 
00061   // decoder for RFC2047 and RFC1522
00063   static const TQString decodeRFC2047String (const TQString & _str,
00064                                             TQString & charset,
00065                                             TQString & language);
00067   static const TQString decodeRFC2047String (const TQString & _str,
00068                                             TQString & charset);
00070   static const TQString decodeRFC2047String (const TQString & _str);
00071 
00072   // encoder for RFC2047 and RFC1522
00074   static const TQString encodeRFC2047String (const TQString & _str,
00075                                             TQString & charset,
00076                                             TQString & language);
00078   static const TQString encodeRFC2047String (const TQString & _str,
00079                                             TQString & charset);
00081   static const TQString encodeRFC2047String (const TQString & _str);
00082 
00084   static const TQString encodeRFC2231String (const TQString & _str);
00086   static const TQString decodeRFC2231String (const TQString & _str);
00087 };
00088 
00089 #endif