File indexing completed on 2025-01-26 04:45:35
0001 /* 0002 SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "akonadi-mime_export.h" 0010 #include "commandbase.h" 0011 #include <Akonadi/Item> 0012 #include <QObject> 0013 namespace Akonadi 0014 { 0015 class AKONADI_MIME_EXPORT MarkAsCommandHelper : public QObject 0016 { 0017 Q_OBJECT 0018 public: 0019 explicit MarkAsCommandHelper(QObject *parent = nullptr); 0020 ~MarkAsCommandHelper() override; 0021 0022 [[nodiscard]] const Akonadi::Item::List &itemsToModify() const; 0023 void setItemsToModify(const Akonadi::Item::List &newItemsToModify); 0024 0025 void start(); 0026 0027 Q_SIGNALS: 0028 void emitResult(Akonadi::CommandBase::Result result); 0029 0030 private: 0031 void modifyMessages(); 0032 void slotModifyItemDone(KJob *job); 0033 Akonadi::Item::List mItemsToModify; 0034 int mIndex = 0; 0035 }; 0036 }