File indexing completed on 2024-06-23 05:18:33
0001 /* 0002 SPDX-FileCopyrightText: 2009 Constantin Berzan <exit3219@gmail.com> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "contentjobbase.h" 0010 #include "messagecomposer_export.h" 0011 0012 namespace KMime 0013 { 0014 namespace Headers 0015 { 0016 class ContentDescription; 0017 class ContentDisposition; 0018 class ContentID; 0019 class ContentTransferEncoding; 0020 class ContentType; 0021 } 0022 } 0023 0024 namespace MessageComposer 0025 { 0026 class SinglepartJobPrivate; 0027 0028 /** 0029 * @brief The SinglepartJob class 0030 */ 0031 class MESSAGECOMPOSER_EXPORT SinglepartJob : public ContentJobBase 0032 { 0033 Q_OBJECT 0034 0035 public: 0036 explicit SinglepartJob(QObject *parent = nullptr); 0037 ~SinglepartJob() override; 0038 0039 [[nodiscard]] QByteArray data() const; 0040 void setData(const QByteArray &data); 0041 0042 /// created on first call. delete them if you don't use the content 0043 [[nodiscard]] KMime::Headers::ContentDescription *contentDescription(); 0044 [[nodiscard]] KMime::Headers::ContentDisposition *contentDisposition(); 0045 [[nodiscard]] KMime::Headers::ContentID *contentID(); 0046 [[nodiscard]] KMime::Headers::ContentTransferEncoding *contentTransferEncoding(); 0047 [[nodiscard]] KMime::Headers::ContentType *contentType(); 0048 0049 protected Q_SLOTS: 0050 void process() override; 0051 0052 private: 0053 Q_DECLARE_PRIVATE(SinglepartJob) 0054 }; 0055 }