Warning, file /pim/akonadi-search/lib/collectionquery.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 * This file is part of the KDE Akonadi Search Project 0003 * SPDX-FileCopyrightText: 2014 Christian Mollekopf <mollekopf@kolabsys.com> 0004 * 0005 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0006 * 0007 */ 0008 0009 #pragma once 0010 0011 #include "query.h" 0012 #include "resultiterator.h" 0013 #include "search_pim_export.h" 0014 0015 #include <Akonadi/Collection> 0016 #include <QStringList> 0017 0018 #include <memory> 0019 0020 namespace Akonadi 0021 { 0022 namespace Search 0023 { 0024 /** PIM specific search API. */ 0025 namespace PIM 0026 { 0027 class CollectionQueryPrivate; 0028 0029 /** Collection query. */ 0030 class AKONADI_SEARCH_PIM_EXPORT CollectionQuery : public Query 0031 { 0032 public: 0033 CollectionQuery(); 0034 ~CollectionQuery() override; 0035 0036 void setNamespace(const QStringList &ns); 0037 void setMimetype(const QStringList &mt); 0038 0039 /** 0040 * Matches the string \p match in the name. 0041 */ 0042 void nameMatches(const QString &match); 0043 void identifierMatches(const QString &match); 0044 void pathMatches(const QString &match); 0045 0046 void setLimit(int limit); 0047 [[nodiscard]] int limit() const; 0048 0049 /** 0050 * Execute the query and return an iterator to fetch 0051 * the results 0052 */ 0053 [[nodiscard]] ResultIterator exec() override; 0054 0055 /** 0056 * For testing 0057 */ 0058 void setDatabaseDir(const QString &dir); 0059 0060 private: 0061 //@cond PRIVATE 0062 std::unique_ptr<CollectionQueryPrivate> const d; 0063 //@endcond 0064 }; 0065 } 0066 } 0067 }