File indexing completed on 2024-11-10 07:31:37
0001 /** 0002 * SPDX-FileCopyrightText: 2020 Aniket Kumar <anikketkumar786@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #ifndef ATTACHMENTINFO_H 0008 #define ATTACHMENTINFO_H 0009 0010 #include "conversationmessage.h" 0011 0012 /** 0013 * This class is a compressed version of Attachment class 0014 * as it will be exposed to the QML in a list object 0015 */ 0016 class AttachmentInfo 0017 { 0018 Q_GADGET 0019 Q_PROPERTY(qint64 partID READ partID) 0020 Q_PROPERTY(QString mimeType READ mimeType) 0021 Q_PROPERTY(QString uniqueIdentifier READ uniqueIdentifier) 0022 0023 public: 0024 AttachmentInfo(); 0025 AttachmentInfo(const Attachment &attachment); 0026 0027 qint64 partID() const 0028 { 0029 return m_partID; 0030 } 0031 QString mimeType() const 0032 { 0033 return m_mimeType; 0034 } 0035 QString uniqueIdentifier() const 0036 { 0037 return m_uniqueIdentifier; 0038 } 0039 0040 private: 0041 qint64 m_partID; 0042 QString m_mimeType; 0043 QString m_uniqueIdentifier; 0044 }; 0045 0046 #endif // ATTACHMENTINFO_H