File indexing completed on 2024-12-22 05:01:11
0001 /* 0002 SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "kmail_private_export.h" 0010 #include <Akonadi/Item> 0011 #include <KMime/Message> 0012 #include <MessageComposer/MessageFactoryNG> 0013 #include <QObject> 0014 #include <QUrl> 0015 0016 struct KMAILTESTS_TESTS_EXPORT CreateForwardMessageJobSettings { 0017 QUrl url; 0018 Akonadi::Item item; 0019 KMime::Message::Ptr msg = nullptr; 0020 QString templateStr; 0021 QString selection; 0022 uint identity = 0; 0023 }; 0024 0025 class KMAILTESTS_TESTS_EXPORT CreateForwardMessageJob : public QObject 0026 { 0027 Q_OBJECT 0028 public: 0029 explicit CreateForwardMessageJob(QObject *parent = nullptr); 0030 ~CreateForwardMessageJob() override; 0031 void start(); 0032 0033 void setSettings(const CreateForwardMessageJobSettings &value); 0034 0035 private: 0036 MessageComposer::MessageFactoryNG *mMessageFactory = nullptr; 0037 void slotCreateForwardDone(const KMime::Message::Ptr &msg); 0038 CreateForwardMessageJobSettings mSettings; 0039 };