File indexing completed on 2024-11-24 04:44:35
0001 /* This file is part of the KDE project 0002 SPDX-FileCopyrightText: 2009, 2010 Kevin Krammer <kevin.krammer@gmx.at> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "job.h" 0010 0011 #include <Akonadi/Collection> 0012 #include <Akonadi/Item> 0013 0014 #include <memory> 0015 0016 namespace Akonadi 0017 { 0018 namespace FileStore 0019 { 0020 class StoreCompactJobPrivate; 0021 0022 /** 0023 */ 0024 class AKONADI_FILESTORE_EXPORT StoreCompactJob : public Job 0025 { 0026 friend class AbstractJobSession; 0027 0028 Q_OBJECT 0029 0030 public: 0031 explicit StoreCompactJob(AbstractJobSession *session = nullptr); 0032 0033 ~StoreCompactJob() override; 0034 0035 bool accept(Visitor *visitor) override; 0036 0037 [[nodiscard]] Item::List changedItems() const; 0038 0039 [[nodiscard]] Collection::List changedCollections() const; 0040 0041 Q_SIGNALS: 0042 void collectionsChanged(const Akonadi::Collection::List &collections); 0043 void itemsChanged(const Akonadi::Item::List &items); 0044 0045 private: 0046 void handleCollectionsChanged(const Collection::List &collections); 0047 void handleItemsChanged(const Item::List &items); 0048 0049 private: 0050 std::unique_ptr<StoreCompactJobPrivate> const d; 0051 }; 0052 } 0053 }