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 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.


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

AgentSearchInterface::~AgentSearchInterface ( )

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.

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.

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.


◆ 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:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 24 2024 11:58:18 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.