kioslave/imap4
mailheader.h
00001 /*************************************************************************** 00002 mailheader.h - description 00003 ------------------- 00004 begin : Tue Oct 24 2000 00005 copyright : (C) 2000 by Sven Carstens 00006 email : s.carstens@gmx.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef MAILHEADER_H 00019 #define MAILHEADER_H 00020 00021 #include "mimeheader.h" 00022 #include "mailaddress.h" 00023 #include "mimeio.h" 00024 #include <kimap/rfccodecs.h> 00025 #include <QList> 00026 00027 using namespace KIMAP; 00028 00033 class mailHeader:public mimeHeader 00034 { 00035 public: 00036 mailHeader (); 00037 ~mailHeader (); 00038 00039 virtual void addHdrLine (mimeHdrLine *); 00040 virtual void outputHeader (mimeIO &); 00041 00042 void addTo (const mailAddress & _adr) 00043 { 00044 toAdr.append (new mailAddress (_adr)); 00045 } 00046 void addCC (const mailAddress & _adr) 00047 { 00048 ccAdr.append (new mailAddress (_adr)); 00049 } 00050 void addBCC (const mailAddress & _adr) 00051 { 00052 bccAdr.append (new mailAddress (_adr)); 00053 } 00054 00055 void setFrom (const mailAddress & _adr) 00056 { 00057 fromAdr = _adr; 00058 } 00059 void setSender (const mailAddress & _adr) 00060 { 00061 senderAdr = _adr; 00062 } 00063 void setReturnPath (const mailAddress & _adr) 00064 { 00065 returnpathAdr = _adr; 00066 } 00067 void setReplyTo (const mailAddress & _adr) 00068 { 00069 replytoAdr = _adr; 00070 } 00071 00072 const QByteArray& getMessageId () 00073 { 00074 return messageID; 00075 } 00076 void setMessageId (const QByteArray & _str) 00077 { 00078 messageID = _str; 00079 } 00080 00081 const QByteArray& getInReplyTo () 00082 { 00083 return inReplyTo; 00084 } 00085 void setInReplyTo (const QByteArray & _str) 00086 { 00087 inReplyTo = _str; 00088 } 00089 00090 const QByteArray& getReferences () 00091 { 00092 return references; 00093 } 00094 void setReferences (const QByteArray & _str) 00095 { 00096 references = _str; 00097 } 00098 00102 void setSubject (const QString & _str) 00103 { 00104 _subject = KIMAP::encodeRFC2047String(_str).toLatin1(); 00105 } 00109 void setSubjectEncoded (const QByteArray & _str) 00110 { 00111 _subject = _str.simplified(); 00112 } 00113 00117 const QString getSubject () 00118 { 00119 return KIMAP::decodeRFC2047String(_subject); 00120 } 00124 const QByteArray& getSubjectEncoded () 00125 { 00126 return _subject; 00127 } 00128 00132 void setDate (const QByteArray & _str) 00133 { 00134 mDate = _str; 00135 } 00136 00140 const QByteArray& date () 00141 { 00142 return mDate; 00143 } 00144 00145 static int parseAddressList (const char *, QList < mailAddress *> &); 00146 static QByteArray getAddressStr (QList < mailAddress *> &); 00147 QList < mailAddress *> &to () 00148 { 00149 return toAdr; 00150 } 00151 QList < mailAddress *> &cc () 00152 { 00153 return ccAdr; 00154 } 00155 QList < mailAddress *> &bcc () 00156 { 00157 return bccAdr; 00158 } 00159 #ifdef KMAIL_COMPATIBLE 00160 QString subject () 00161 { 00162 return getSubject (); 00163 } 00164 const mailAddress & from () 00165 { 00166 return fromAdr; 00167 } 00168 const mailAddress & replyTo () 00169 { 00170 return replytoAdr; 00171 } 00172 void readConfig (void) 00173 {; 00174 } 00175 #endif 00176 00177 private: 00178 QList < mailAddress *> toAdr; 00179 QList < mailAddress *> ccAdr; 00180 QList < mailAddress *> bccAdr; 00181 mailAddress fromAdr; 00182 mailAddress senderAdr; 00183 mailAddress returnpathAdr; 00184 mailAddress replytoAdr; 00185 QByteArray _subject; 00186 QByteArray mDate; 00187 int gmt_offset; 00188 QByteArray messageID; 00189 QByteArray inReplyTo; 00190 QByteArray references; 00191 }; 00192 00193 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:48:35 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:48:35 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.