• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

kioslave/imap4

  • sources
  • kde-4.14
  • kdepimlibs
  • kioslave
  • imap4
mailheader.h
1 /***************************************************************************
2  mailheader.h - description
3  -------------------
4  begin : Tue Oct 24 2000
5  copyright : (C) 2000 by Sven Carstens
6  email : s.carstens@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef MAILHEADER_H
19 #define MAILHEADER_H
20 
21 #include "mimeheader.h"
22 #include "mailaddress.h"
23 #include "mimeio.h"
24 #include <kimap/rfccodecs.h>
25 #include <QList>
26 
27 using namespace KIMAP;
28 
33 class mailHeader:public mimeHeader
34 {
35 public:
36  mailHeader ();
37  ~mailHeader ();
38 
39  virtual void addHdrLine (mimeHdrLine *);
40  virtual void outputHeader (mimeIO &);
41 
42  void addTo (const mailAddress & _adr)
43  {
44  toAdr.append( new mailAddress( _adr ) );
45  }
46  void addCC (const mailAddress & _adr)
47  {
48  ccAdr.append( new mailAddress( _adr ) );
49  }
50  void addBCC (const mailAddress & _adr)
51  {
52  bccAdr.append( new mailAddress( _adr ) );
53  }
54 
55  void setFrom (const mailAddress & _adr)
56  {
57  fromAdr = _adr;
58  }
59  void setSender (const mailAddress & _adr)
60  {
61  senderAdr = _adr;
62  }
63  void setReturnPath (const mailAddress & _adr)
64  {
65  returnpathAdr = _adr;
66  }
67  void setReplyTo (const mailAddress & _adr)
68  {
69  replytoAdr = _adr;
70  }
71 
72  const QByteArray& getMessageId ()
73  {
74  return messageID;
75  }
76  void setMessageId (const QByteArray & _str)
77  {
78  messageID = _str;
79  }
80 
81  const QByteArray& getInReplyTo ()
82  {
83  return inReplyTo;
84  }
85  void setInReplyTo (const QByteArray & _str)
86  {
87  inReplyTo = _str;
88  }
89 
90  const QByteArray& getReferences ()
91  {
92  return references;
93  }
94  void setReferences (const QByteArray & _str)
95  {
96  references = _str;
97  }
98 
102  void setSubject (const QString & _str)
103  {
104  _subject = KIMAP::encodeRFC2047String( _str ).toLatin1();
105  }
109  void setSubjectEncoded (const QByteArray & _str)
110  {
111  _subject = _str.simplified();
112  }
113 
117  const QString getSubject ()
118  {
119  return KIMAP::decodeRFC2047String( _subject );
120  }
124  const QByteArray& getSubjectEncoded ()
125  {
126  return _subject;
127  }
128 
132  void setDate (const QByteArray & _str)
133  {
134  mDate = _str;
135  }
136 
140  const QByteArray& date ()
141  {
142  return mDate;
143  }
144 
145  static int parseAddressList (const char *, QList < mailAddress *> &);
146  static QByteArray getAddressStr (QList < mailAddress *> &);
147  QList < mailAddress *> &to ()
148  {
149  return toAdr;
150  }
151  QList < mailAddress *> &cc ()
152  {
153  return ccAdr;
154  }
155  QList < mailAddress *> &bcc ()
156  {
157  return bccAdr;
158  }
159 #ifdef KMAIL_COMPATIBLE
160  QString subject ()
161  {
162  return getSubject ();
163  }
164  const mailAddress & from ()
165  {
166  return fromAdr;
167  }
168  const mailAddress & replyTo ()
169  {
170  return replytoAdr;
171  }
172  void readConfig (void)
173  {;
174  }
175 #endif
176 
177 private:
178  QList < mailAddress *> toAdr;
179  QList < mailAddress *> ccAdr;
180  QList < mailAddress *> bccAdr;
181  mailAddress fromAdr;
182  mailAddress senderAdr;
183  mailAddress returnpathAdr;
184  mailAddress replytoAdr;
185  QByteArray _subject;
186  QByteArray mDate;
187  int gmt_offset;
188  QByteArray messageID;
189  QByteArray inReplyTo;
190  QByteArray references;
191 };
192 
193 #endif
QByteArray
mailHeader::setSubject
void setSubject(const QString &_str)
set a unicode subject
Definition: mailheader.h:102
mimeIO
Definition: mimeio.h:28
mimeHeader
Definition: mimeheader.h:35
mailHeader
Definition: mailheader.h:33
mailHeader::date
const QByteArray & date()
get the date
Definition: mailheader.h:140
mailHeader::getSubjectEncoded
const QByteArray & getSubjectEncoded()
get the encoded subject
Definition: mailheader.h:124
mailHeader::getSubject
const QString getSubject()
get the unicode subject
Definition: mailheader.h:117
mailHeader::setSubjectEncoded
void setSubjectEncoded(const QByteArray &_str)
set a encoded subject
Definition: mailheader.h:109
QString
QList< mailAddress * >
mimeHdrLine
Definition: mimehdrline.h:28
QByteArray::simplified
QByteArray simplified() const
mailHeader::setDate
void setDate(const QByteArray &_str)
set the date
Definition: mailheader.h:132
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kioslave/imap4

Skip menu "kioslave/imap4"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal