File indexing completed on 2024-04-14 03:49:49

0001 /*
0002     This file is part of the KDE Baloo Project
0003     SPDX-FileCopyrightText: 2013-2015 Vishesh Handa <vhanda@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0006 */
0007 
0008 #ifndef BALOO_SEARCHSTORE_H
0009 #define BALOO_SEARCHSTORE_H
0010 
0011 #include <QString>
0012 #include "result_p.h"
0013 
0014 namespace Baloo {
0015 
0016 class Term;
0017 class Database;
0018 class Transaction;
0019 class PostingIterator;
0020 
0021 class SearchStore
0022 {
0023 public:
0024     SearchStore();
0025     ~SearchStore();
0026 
0027     ResultList exec(const Term& term, uint offset, int limit, bool sortResults);
0028 
0029 private:
0030     Database* m_db;
0031 
0032     PostingIterator* constructQuery(Transaction* tr, const Term& term);
0033 };
0034 
0035 }
0036 
0037 #endif // BALOO_SEARCHSTORE_H