Akonadi

abstractsearchplugin.h
1/*
2 SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <QObject>
10#include <QSet>
11#include <QStringList>
12
13namespace Akonadi
14{
15/**
16 * @class AbstractSearchPlugin
17 *
18 * 3rd party applications can install a search plugin for Akonadi server to
19 * provide access to their search capability.
20 *
21 * When the server performs a search, it will send the query to all available
22 * search plugins and merge the results.
23 *
24 * @since 1.12
25 */
27{
28public:
29 /**
30 * Destructor.
31 */
32 virtual ~AbstractSearchPlugin() = default;
33
34 /**
35 * Reimplement this method to provide the actual search capability.
36 *
37 * The implementation can block.
38 *
39 * @param query Search query to execute.
40 * @return List of Akonadi Item IDs referring to items that are matching
41 * the query.
42 */
43 virtual QSet<qint64> search(const QString &query, const QList<qint64> &collections, const QStringList &mimeTypes) = 0;
44
45protected:
46 explicit AbstractSearchPlugin() = default;
47
48private:
49 Q_DISABLE_COPY_MOVE(AbstractSearchPlugin)
50};
51
52}
53
54Q_DECLARE_INTERFACE(Akonadi::AbstractSearchPlugin, "org.freedesktop.Akonadi.AbstractSearchPlugin")
3rd party applications can install a search plugin for Akonadi server to provide access to their sear...
virtual ~AbstractSearchPlugin()=default
Destructor.
virtual QSet< qint64 > search(const QString &query, const QList< qint64 > &collections, const QStringList &mimeTypes)=0
Reimplement this method to provide the actual search capability.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:54:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.