File indexing completed on 2024-11-17 04:44:57
0001 /* 0002 SPDX-FileCopyrightText: 2015-2020 Krzysztof Nowicki <krissn@op.pl> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <Akonadi/Collection> 0010 0011 #include "ewsfolder.h" 0012 #include "ewsjob.h" 0013 0014 #include <memory> 0015 0016 class EwsClient; 0017 class EwsFetchFoldersIncrJobPrivate; 0018 0019 class EwsFetchFoldersIncrJob : public EwsJob 0020 { 0021 Q_OBJECT 0022 public: 0023 EwsFetchFoldersIncrJob(EwsClient &client, const QString &syncState, const Akonadi::Collection &rootCollection, QObject *parent); 0024 ~EwsFetchFoldersIncrJob() override; 0025 0026 Akonadi::Collection::List changedFolders() const 0027 { 0028 return mChangedFolders; 0029 } 0030 0031 Akonadi::Collection::List deletedFolders() const 0032 { 0033 return mDeletedFolders; 0034 } 0035 0036 const QString &syncState() const 0037 { 0038 return mSyncState; 0039 } 0040 0041 void start() override; 0042 Q_SIGNALS: 0043 void reportStatus(int status, const QString &message = QString()); 0044 void reportPercent(int progress); 0045 0046 private: 0047 Akonadi::Collection::List mChangedFolders; 0048 Akonadi::Collection::List mDeletedFolders; 0049 0050 QString mSyncState; 0051 0052 std::unique_ptr<EwsFetchFoldersIncrJobPrivate> const d_ptr; 0053 Q_DECLARE_PRIVATE(EwsFetchFoldersIncrJob) 0054 };