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 "jobbase.h" 0010 #include "messagecomposer_export.h" 0011 0012 namespace KMime 0013 { 0014 class Message; 0015 } 0016 0017 namespace MessageComposer 0018 { 0019 class SkeletonMessageJobPrivate; 0020 class InfoPart; 0021 class GlobalPart; 0022 0023 /** 0024 A message containing only the headers... 0025 */ 0026 class MESSAGECOMPOSER_EXPORT SkeletonMessageJob : public JobBase 0027 { 0028 Q_OBJECT 0029 0030 public: 0031 explicit SkeletonMessageJob(InfoPart *infoPart = nullptr, GlobalPart *globalPart = nullptr, QObject *parent = nullptr); 0032 ~SkeletonMessageJob() override; 0033 0034 [[nodiscard]] InfoPart *infoPart() const; 0035 void setInfoPart(InfoPart *part); 0036 0037 [[nodiscard]] GlobalPart *globalPart() const; 0038 void setGlobalPart(GlobalPart *part); 0039 0040 [[nodiscard]] KMime::Message *message() const; 0041 0042 void start() override; 0043 0044 private: 0045 Q_DECLARE_PRIVATE(SkeletonMessageJob) 0046 0047 Q_PRIVATE_SLOT(d_func(), void doStart()) 0048 }; 0049 } // namespace MessageComposer