akonadi
#include <agentsearchinterface.h>
Public Types | |
enum | ResultScope { Uid, Rid } |
Public Member Functions | |
AgentSearchInterface () | |
virtual | ~AgentSearchInterface () |
virtual void | addSearch (const QString &query, const QString &queryLanguage, const Akonadi::Collection &resultCollection)=0 |
virtual void | removeSearch (const Akonadi::Collection &resultCollection)=0 |
virtual void | search (const QString &query, const Collection &collection)=0 |
void | searchFinished (const QVector< qint64 > result, ResultScope scope) |
void | searchFinished (const ImapSet &result, ResultScope scope) |
void | searchFinished (const QVector< QByteArray > &result) |
Detailed Description
An interface for agents (or resources) that support searching in their backend.
Inherit from this additionally to Akonadi::AgentBase (or Akonadi::ResourceBase) and implement its two pure virtual methods.
Make sure to add the Search
capability to the agent desktop file.
- Since
- 4.5
Definition at line 42 of file agentsearchinterface.h.
Constructor & Destructor Documentation
AgentSearchInterface::AgentSearchInterface | ( | ) |
Creates a new agent search interface.
Definition at line 96 of file agentsearchinterface.cpp.
|
virtual |
Destroys the agent search interface.
Definition at line 101 of file agentsearchinterface.cpp.
Member Function Documentation
|
pure virtual |
Adds a new search.
- Parameters
-
query The query string, using the language specified in queryLanguage
queryLanguage The query language used for query
resultCollection The destination collection for the search results. It's a virtual collection, results can be added/removed using Akonadi::LinkJob and Akonadi::UnlinkJob respectively.
|
pure virtual |
Removes a previously added search.
- Parameters
-
resultCollection The result collection given in an previous addSearch() call. You do not need to take care of deleting results in there, the collection is just provided as a way to identify the search.
|
pure virtual |
Perform a search on remote storage and return results using SearchResultJob.
- Since
- 4.13
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:04 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.