File indexing completed on 2024-10-27 04:51:03
0001 /* 0002 SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 #pragma once 0007 0008 #include <Akonadi/Item> 0009 #include <QObject> 0010 class KJob; 0011 class FolderArchiveAccountInfo; 0012 class FolderArchiveManager; 0013 class KMMoveCommand; 0014 class FolderArchiveAgentJob : public QObject 0015 { 0016 Q_OBJECT 0017 public: 0018 explicit FolderArchiveAgentJob(FolderArchiveManager *manager, 0019 FolderArchiveAccountInfo *info, 0020 const Akonadi::Item::List &lstItem, 0021 QObject *parent = nullptr); 0022 ~FolderArchiveAgentJob() override; 0023 0024 void start(); 0025 0026 private: 0027 void slotFetchCollection(KJob *job); 0028 void sloMoveMailsToCollection(const Akonadi::Collection &col); 0029 void slotCheckFailed(const QString &message); 0030 void slotCollectionIdFound(const Akonadi::Collection &col); 0031 void slotMoveMessages(KMMoveCommand *); 0032 0033 void sendError(const QString &error); 0034 const Akonadi::Item::List mListItem; 0035 FolderArchiveManager *const mManager; 0036 FolderArchiveAccountInfo *const mInfo; 0037 };