File indexing completed on 2024-11-24 04:44:17

0001 /*
0002     SPDX-FileCopyrightText: 2014 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
0003     SPDX-FileContributor: Kevin Krammer <kevin.krammer@kdab.com>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #pragma once
0009 
0010 #include "kolabrelationresourcetask.h"
0011 #include "tagchangehelper.h"
0012 
0013 class KolabChangeTagTask : public KolabRelationResourceTask
0014 {
0015     Q_OBJECT
0016 public:
0017     explicit KolabChangeTagTask(const ResourceStateInterface::Ptr &resource, const QSharedPointer<TagConverter> &tagConverter, QObject *parent = nullptr);
0018 
0019 protected:
0020     void startRelationTask(KIMAP::Session *session) override;
0021 
0022 private:
0023     KIMAP::Session *mSession = nullptr;
0024     const QSharedPointer<TagConverter> mTagConverter;
0025 
0026 private Q_SLOTS:
0027     void onItemsFetchDone(KJob *job);
0028 
0029     void onApplyCollectionChanged(const Akonadi::Collection &collection);
0030     void onCancelTask(const QString &errorText);
0031     void onChangeCommitted();
0032 };