1/*
2 This file is part of KDE.
3
4 SPDX-FileCopyrightText: 2008 Cornelius Schumacher <schumacher@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#ifndef ATTICA_MESSAGE_H
10#define ATTICA_MESSAGE_H
11
12#include <QDateTime>
13#include <QList>
14#include <QSharedDataPointer>
15
16#include "attica_export.h"
17
18namespace Attica
19{
20
21/*!
22 * \class Attica::Message
23 * \inheaderfile Attica/Message
24 * \inmodule Attica
25 *
26 * \brief Represents a message.
27 */
28class ATTICA_EXPORT Message
29{
30public:
31 /*!
32 *
33 */
34 typedef QList<Message> List;
35 class Parser;
36
37 /*!
38 * \value Unread
39 * \value Read
40 * \value Answered
41 */
42 enum Status {
43 Unread = 0,
44 Read = 1,
45 Answered = 2,
46 };
47
48 /*!
49 *
50 */
51 Message();
52 Message(const Message &other);
53 Message &operator=(const Message &other);
54 ~Message();
55
56 /*!
57 *
58 */
59 void setId(const QString &);
60
61 /*!
62 *
63 */
64 QString id() const;
65
66 /*!
67 *
68 */
69 void setFrom(const QString &);
70
71 /*!
72 *
73 */
74 QString from() const;
75
76 /*!
77 *
78 */
79 void setTo(const QString &);
80
81 /*!
82 *
83 */
84 QString to() const;
85
86 /*!
87 *
88 */
89 void setSent(const QDateTime &);
90
91 /*!
92 *
93 */
94 QDateTime sent() const;
95
96 /*!
97 *
98 */
99 void setStatus(Status);
100
101 /*!
102 *
103 */
104 Status status() const;
105
106 /*!
107 *
108 */
109 void setSubject(const QString &);
110
111 /*!
112 *
113 */
114 QString subject() const;
115
116 /*!
117 *
118 */
119 void setBody(const QString &);
120
121 /*!
122 *
123 */
124 QString body() const;
125
126 /*!
127 *
128 */
129 bool isValid() const;
130
131private:
132 class Private;
133 QSharedDataPointer<Private> d;
134};
135
136}
137
138#endif
139

source code of attica/src/message.h