File indexing completed on 2024-12-08 03:37:12
0001 /* 0002 This file is part of KDE. 0003 0004 SPDX-FileCopyrightText: 2008 Cornelius Schumacher <schumacher@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef ATTICA_MESSAGE_H 0010 #define ATTICA_MESSAGE_H 0011 0012 #include <QDateTime> 0013 #include <QList> 0014 #include <QSharedDataPointer> 0015 0016 #include "attica_export.h" 0017 0018 namespace Attica 0019 { 0020 0021 /** 0022 * @class Message message.h <Attica/Message> 0023 * 0024 * Represents a message. 0025 */ 0026 class ATTICA_EXPORT Message 0027 { 0028 public: 0029 typedef QList<Message> List; 0030 class Parser; 0031 0032 enum Status { 0033 Unread = 0, 0034 Read = 1, 0035 Answered = 2, 0036 }; 0037 0038 Message(); 0039 Message(const Message &other); 0040 Message &operator=(const Message &other); 0041 ~Message(); 0042 0043 void setId(const QString &); 0044 QString id() const; 0045 0046 void setFrom(const QString &); 0047 QString from() const; 0048 0049 void setTo(const QString &); 0050 QString to() const; 0051 0052 void setSent(const QDateTime &); 0053 QDateTime sent() const; 0054 0055 void setStatus(Status); 0056 Status status() const; 0057 0058 void setSubject(const QString &); 0059 QString subject() const; 0060 0061 void setBody(const QString &); 0062 QString body() const; 0063 0064 bool isValid() const; 0065 0066 private: 0067 class Private; 0068 QSharedDataPointer<Private> d; 0069 }; 0070 0071 } 0072 0073 #endif