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 "resourcetask.h" 0011 0012 class KolabRelationResourceTask : public ResourceTask 0013 { 0014 Q_OBJECT 0015 public: 0016 explicit KolabRelationResourceTask(const ResourceStateInterface::Ptr &resource, QObject *parent = nullptr); 0017 0018 Akonadi::Collection relationCollection() const; 0019 0020 using ResourceTask::mailBoxForCollection; 0021 using ResourceTask::resourceState; 0022 0023 protected: 0024 Akonadi::Collection mRelationCollection; 0025 0026 protected: 0027 void doStart(KIMAP::Session *session) override; 0028 0029 virtual void startRelationTask(KIMAP::Session *session) = 0; 0030 0031 private: 0032 KIMAP::Session *mImapSession = nullptr; 0033 0034 private Q_SLOTS: 0035 void onCollectionFetchResult(KJob *job); 0036 void onCreateDone(KJob *job); 0037 void onSetMetaDataDone(KJob *job); 0038 void onLocalCreateDone(KJob *job); 0039 };