File indexing completed on 2024-05-26 05:13:31
0001 /* 0002 * This file is part of the KDE Akonadi Search Project 0003 * SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org> 0004 * 0005 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0006 * 0007 */ 0008 #pragma once 0009 0010 #include "search_pim_export.h" 0011 #include <Akonadi/Item> 0012 #include <QObject> 0013 0014 #include <memory> 0015 0016 namespace Akonadi 0017 { 0018 namespace Search 0019 { 0020 namespace PIM 0021 { 0022 class IndexedItemsPrivate; 0023 0024 /** Indexed items. */ 0025 class AKONADI_SEARCH_PIM_EXPORT IndexedItems : public QObject 0026 { 0027 Q_OBJECT 0028 public: 0029 explicit IndexedItems(QObject *parent = nullptr); 0030 ~IndexedItems() override; 0031 0032 void setOverrideDbPrefixPath(const QString &path); 0033 0034 [[nodiscard]] qlonglong indexedItems(const qlonglong id); 0035 0036 void findIndexedInDatabase(QSet<Akonadi::Item::Id> &indexed, Akonadi::Collection::Id collectionId, const QString &dbPath); 0037 void findIndexed(QSet<Akonadi::Item::Id> &indexed, Akonadi::Collection::Id collectionId); 0038 0039 [[nodiscard]] QString emailIndexingPath() const; 0040 [[nodiscard]] QString collectionIndexingPath() const; 0041 [[nodiscard]] QString calendarIndexingPath() const; 0042 [[nodiscard]] QString akonotesIndexingPath() const; 0043 [[nodiscard]] QString emailContactsIndexingPath() const; 0044 [[nodiscard]] QString contactIndexingPath() const; 0045 0046 private: 0047 std::unique_ptr<IndexedItemsPrivate> const d; 0048 }; 0049 } 0050 } 0051 }