File indexing completed on 2024-12-22 05:01:12

0001 /*
0002   SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
0003 
0004   SPDX-License-Identifier: LGPL-2.0-or-later
0005 
0006 */
0007 
0008 #pragma once
0009 
0010 #include <QObject>
0011 
0012 #include <Akonadi/Collection>
0013 #include <Akonadi/MarkAsCommand>
0014 
0015 class MarkAllMessagesAsReadInFolderAndSubFolderJob : public QObject
0016 {
0017     Q_OBJECT
0018 public:
0019     explicit MarkAllMessagesAsReadInFolderAndSubFolderJob(QObject *parent = nullptr);
0020     ~MarkAllMessagesAsReadInFolderAndSubFolderJob() override;
0021 
0022     void setTopLevelCollection(const Akonadi::Collection &topLevelCollection);
0023 
0024     void start();
0025 
0026 private:
0027     void slotFetchCollectionFailed();
0028     void slotFetchCollectionDone(const Akonadi::Collection::List &list);
0029     void slotMarkAsResult(Akonadi::MarkAsCommand::Result result);
0030     Akonadi::Collection mTopLevelCollection;
0031 };