Akonadi::AgentSearchInterface
#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 ImapSet &result, ResultScope scope) |
void | searchFinished (const QList< QByteArray > &result) |
void | searchFinished (const QList< qint64 > &result, ResultScope scope) |
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 30 of file agentsearchinterface.h.
Member Enumeration Documentation
◆ ResultScope
enum Akonadi::AgentSearchInterface::ResultScope |
Definition at line 33 of file agentsearchinterface.h.
Constructor & Destructor Documentation
◆ AgentSearchInterface()
AgentSearchInterface::AgentSearchInterface | ( | ) |
Creates a new agent search interface.
Definition at line 83 of file agentsearchinterface.cpp.
◆ ~AgentSearchInterface()
|
virtualdefault |
Destroys the agent search interface.
Member Function Documentation
◆ addSearch()
|
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.
◆ removeSearch()
|
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.
◆ search()
|
pure virtual |
Perform a search on remote storage and return results using SearchResultJob.
- Since
- 4.13
◆ searchFinished() [1/3]
void AgentSearchInterface::searchFinished | ( | const ImapSet & | result, |
ResultScope | scope ) |
Definition at line 107 of file agentsearchinterface.cpp.
◆ searchFinished() [2/3]
void AgentSearchInterface::searchFinished | ( | const QList< QByteArray > & | result | ) |
Definition at line 138 of file agentsearchinterface.cpp.
◆ searchFinished() [3/3]
void AgentSearchInterface::searchFinished | ( | const QList< qint64 > & | result, |
ResultScope | scope ) |
Definition at line 90 of file agentsearchinterface.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.