KMime

kmime_message.h
1 /*
2  kmime_message.h
3 
4  KMime, the KDE Internet mail/usenet news message library.
5  Copyright (c) 2001 the KMime authors.
6  See file AUTHORS for details
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public
10  License as published by the Free Software Foundation; either
11  version 2 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public License for more details.
17 
18  You should have received a copy of the GNU Library General Public License
19  along with this library; see the file COPYING.LIB. If not, write to
20  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  Boston, MA 02110-1301, USA.
22 */
23 #ifndef __KMIME_MESSAGE_H__
24 #define __KMIME_MESSAGE_H__
25 
26 #include "kmime_export.h"
27 #include "kmime_content.h"
28 #include "kmime_headers.h"
29 
30 #include <QMetaType>
31 #include <QSharedPointer>
32 
33 namespace KMime
34 {
35 
36 class MessagePrivate;
37 
80 class KMIME_EXPORT Message : public Content
81 {
82 public:
90  Message();
91 
95  ~Message() override;
96 
101  KMime::Headers::MessageID *messageID(bool create = true);
102 
107  KMime::Headers::Subject *subject(bool create = true);
108 
113  KMime::Headers::Date *date(bool create = true);
114 
119  KMime::Headers::From *from(bool create = true);
120 
125  KMime::Headers::Organization *organization(bool create = true);
126 
131  KMime::Headers::ReplyTo *replyTo(bool create = true);
132 
137  KMime::Headers::To *to(bool create = true);
138 
143  KMime::Headers::Cc *cc(bool create = true);
144 
149  KMime::Headers::Bcc *bcc(bool create = true);
150 
155  KMime::Headers::References *references(bool create = true);
156 
161  KMime::Headers::UserAgent *userAgent(bool create = true);
162 
167  KMime::Headers::InReplyTo *inReplyTo(bool create = true);
168 
173  KMime::Headers::Sender *sender(bool create = true);
174 
184  Content *mainBodyPart(const QByteArray &type = QByteArray());
185 
189  static QString mimeType();
190 
191 protected:
192  QByteArray assembleHeaders() override;
193 
194 private:
195  Q_DECLARE_PRIVATE(Message)
196 
197 }; // class Message
198 
199 } // namespace KMime
200 
201 Q_DECLARE_METATYPE(KMime::Message*)
202 Q_DECLARE_METATYPE(KMime::Message::Ptr)
203 
204 #endif // __KMIME_MESSAGE_H__
Represents a "Message-ID" header.
Represents a "Date" header.
This file is part of the API for handling MIME data and defines the Content class.
Represents a "References" header.
Represents a "Cc" header.
Represents a "To" header.
Represent a "From" header.
This file is part of the API for handling MIME data and defines the various header classes: ...
Represents a "ReplyTo" header.
Represents a (email) message.
Definition: kmime_message.h:80
Represents a "In-Reply-To" header.
QSharedPointer< Message > Ptr
A shared pointer to a message object.
Definition: kmime_message.h:86
Represents a "Subject" header.
Represents a "Organization" header.
A class that encapsulates MIME encoded Content.
Represents a "User-Agent" header.
Represents a "Bcc" header.
Represents a "Sender" header.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jul 5 2020 23:12:25 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.