File indexing completed on 2024-11-10 04:40:19
0001 /* 0002 SPDX-FileCopyrightText: 2019 David Faure <faure@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "intervalcheck.h" 0010 0011 #include <QSemaphore> 0012 0013 namespace Akonadi 0014 { 0015 namespace Server 0016 { 0017 class ItemRetrievalManager; 0018 0019 class FakeIntervalCheck : public IntervalCheck 0020 { 0021 Q_OBJECT 0022 protected: 0023 friend class AkThread; 0024 explicit FakeIntervalCheck(ItemRetrievalManager &retrievalManager); 0025 0026 public: 0027 void waitForInit(); 0028 0029 protected: 0030 void init() override; 0031 0032 bool shouldScheduleCollection(const Collection &) override; 0033 bool hasChanged(const Collection &collection, const Collection &changed) override; 0034 int collectionScheduleInterval(const Collection &collection) override; 0035 void collectionExpired(const Collection &collection) override; 0036 0037 private: 0038 QSemaphore m_initCalled; 0039 }; 0040 0041 } // namespace Server 0042 } // namespace Akonadi