File indexing completed on 2024-11-17 04:45:06
0001 /* 0002 SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "resourcetask.h" 0010 0011 namespace KIMAP 0012 { 0013 class StoreJob; 0014 } 0015 0016 class ChangeItemsFlagsTask : public ResourceTask 0017 { 0018 Q_OBJECT 0019 0020 public: 0021 explicit ChangeItemsFlagsTask(const ResourceStateInterface::Ptr &resource, QObject *parent = nullptr); 0022 ~ChangeItemsFlagsTask() override; 0023 0024 protected Q_SLOTS: 0025 void onSelectDone(KJob *job); 0026 void onAppendFlagsDone(KJob *job); 0027 void onRemoveFlagsDone(KJob *job); 0028 0029 protected: 0030 KIMAP::StoreJob *prepareJob(KIMAP::Session *session); 0031 0032 void doStart(KIMAP::Session *session) override; 0033 0034 virtual void triggerAppendFlagsJob(KIMAP::Session *session); 0035 virtual void triggerRemoveFlagsJob(KIMAP::Session *session); 0036 0037 protected: 0038 int m_processedItems = 0; 0039 };