File indexing completed on 2024-09-15 04:39:20
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 EwsFetchFoldersJobPrivate; 0018 0019 class EwsFetchFoldersJob : public EwsJob 0020 { 0021 Q_OBJECT 0022 public: 0023 EwsFetchFoldersJob(EwsClient &client, const Akonadi::Collection &rootCollection, QObject *parent); 0024 ~EwsFetchFoldersJob() override; 0025 0026 Akonadi::Collection::List folders() const 0027 { 0028 return mFolders; 0029 } 0030 0031 const QString &syncState() const 0032 { 0033 return mSyncState; 0034 } 0035 0036 void start() override; 0037 Q_SIGNALS: 0038 void reportStatus(int status, const QString &message = QString()); 0039 void reportPercent(int progress); 0040 0041 private: 0042 Akonadi::Collection::List mFolders; 0043 0044 QString mSyncState; 0045 0046 std::unique_ptr<EwsFetchFoldersJobPrivate> const d_ptr; 0047 Q_DECLARE_PRIVATE(EwsFetchFoldersJob) 0048 };