File indexing completed on 2024-11-10 04:40:53

0001 /*
0002     SPDX-FileCopyrightText: 2008 Tobias Koenig <tokoe@kde.org>
0003     SPDX-FileCopyrightText: 2010 Volker Krause <vkrause@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #pragma once
0009 
0010 #include <QtGlobal>
0011 
0012 namespace Akonadi
0013 {
0014 namespace Server
0015 {
0016 class Collection;
0017 
0018 /**
0019  * Abstract interface for search engines.
0020  * Executed in the main thread. Must not block.
0021  */
0022 class AbstractSearchEngine
0023 {
0024 public:
0025     virtual ~AbstractSearchEngine() = default;
0026 
0027     /**
0028      * Adds the given @p collection to the search.
0029      */
0030     virtual void addSearch(const Collection &collection) = 0;
0031 
0032     /**
0033      * Removes the collection with the given @p id from the search.
0034      */
0035     virtual void removeSearch(qint64 id) = 0;
0036 
0037 protected:
0038     explicit AbstractSearchEngine() = default;
0039 
0040 private:
0041     Q_DISABLE_COPY_MOVE(AbstractSearchEngine)
0042 };
0043 
0044 } // namespace Server
0045 } // namespace Akonadi