Akonadi::AgentSearchInterface

Search for usage in LXR

Akonadi::AgentSearchInterface Class Referenceabstract

#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 QVector< QByteArray > &result)
 
void searchFinished (const QVector< 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.

Constructor & Destructor Documentation

◆ AgentSearchInterface()

AgentSearchInterface::AgentSearchInterface ( )

Creates a new agent search interface.

Definition at line 83 of file agentsearchinterface.cpp.

◆ ~AgentSearchInterface()

AgentSearchInterface::~AgentSearchInterface ( )
virtualdefault

Destroys the agent search interface.

Member Function Documentation

◆ addSearch()

virtual void Akonadi::AgentSearchInterface::addSearch ( const QString query,
const QString queryLanguage,
const Akonadi::Collection resultCollection 
)
pure virtual

Adds a new search.

Parameters
queryThe query string, using the language specified in queryLanguage
queryLanguageThe query language used for query
resultCollectionThe destination collection for the search results. It's a virtual collection, results can be added/removed using Akonadi::LinkJob and Akonadi::UnlinkJob respectively.

◆ removeSearch()

virtual void Akonadi::AgentSearchInterface::removeSearch ( const Akonadi::Collection resultCollection)
pure virtual

Removes a previously added search.

Parameters
resultCollectionThe 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()

virtual void Akonadi::AgentSearchInterface::search ( const QString query,
const Collection collection 
)
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:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Aug 12 2022 04:00:08 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.