Akonadi::Server::HandlerHelper

Search for usage in LXR

Akonadi::Server::HandlerHelper Class Reference

#include <handlerhelper.h>

Static Public Member Functions

static QList< Protocol::Ancestor > ancestorsResponse (int ancestorDepth, const QStack< Collection > &ancestors, const QStack< CollectionAttribute::List > &_ancestorsAttributes=QStack< CollectionAttribute::List >())
 
static Protocol::CachePolicy cachePolicyResponse (const Collection &col)
 
static Collection collectionFromIdOrName (const QByteArray &id)
 
static Collection collectionFromScope (const Scope &scope, const CommandContext &context)
 
static Protocol::FetchCollectionsResponse fetchCollectionsResponse (AkonadiServer &akonadi, const Collection &col)
 
static Protocol::FetchCollectionsResponse fetchCollectionsResponse (AkonadiServer &akonadi, const Collection &col, const CollectionAttribute::List &attributeList, bool includeStatistics=false, int ancestorDepth=0, const QStack< Collection > &ancestors=QStack< Collection >(), const QStack< CollectionAttribute::List > &ancestorAttributes=QStack< CollectionAttribute::List >(), const QStringList &mimeTypes=QStringList())
 
static Protocol::FetchTagsResponse fetchTagsResponse (const Tag &tag, const Protocol::TagFetchScope &tagFetchScope, Connection *connection=nullptr)
 
static QString pathForCollection (const Collection &col)
 
static Flag::List resolveFlags (const QSet< QByteArray > &flagNames)
 
static Tag::List resolveTagsByGID (const QStringList &tagsGIDs)
 
static Tag::List resolveTagsByRID (const QStringList &tagsRIDs, const CommandContext &context)
 
static Tag::List resolveTagsByUID (const QList< qint64 > &tags)
 
static Tag::List tagsFromScope (const Scope &scope, const CommandContext &context)
 

Detailed Description

Helper functions for command handlers.

Definition at line 38 of file handlerhelper.h.

Member Function Documentation

◆ ancestorsResponse()

QList< Protocol::Ancestor > HandlerHelper::ancestorsResponse ( int ancestorDepth,
const QStack< Collection > & ancestors,
const QStack< CollectionAttribute::List > & _ancestorsAttributes = QStack<CollectionAttribute::List>() )
static

Returns the protocol representation of a collection ancestor chain.

Definition at line 158 of file handlerhelper.cpp.

◆ cachePolicyResponse()

Protocol::CachePolicy HandlerHelper::cachePolicyResponse ( const Collection & col)
static

Returns the protocol representation of the cache policy of the given Collection object.

Definition at line 69 of file handlerhelper.cpp.

◆ collectionFromIdOrName()

Collection HandlerHelper::collectionFromIdOrName ( const QByteArray & id)
static

Returns the collection identified by the given id or path.

Definition at line 23 of file handlerhelper.cpp.

◆ collectionFromScope()

Collection HandlerHelper::collectionFromScope ( const Scope & scope,
const CommandContext & context )
static

Definition at line 375 of file handlerhelper.cpp.

◆ fetchCollectionsResponse() [1/2]

Protocol::FetchCollectionsResponse HandlerHelper::fetchCollectionsResponse ( AkonadiServer & akonadi,
const Collection & col )
static

Returns the protocol representation of the given collection.

Make sure DataStore::activeCachePolicy() has been called before to include the effective cache policy

Definition at line 82 of file handlerhelper.cpp.

◆ fetchCollectionsResponse() [2/2]

Protocol::FetchCollectionsResponse HandlerHelper::fetchCollectionsResponse ( AkonadiServer & akonadi,
const Collection & col,
const CollectionAttribute::List & attributeList,
bool includeStatistics = false,
int ancestorDepth = 0,
const QStack< Collection > & ancestors = QStack<Collection>(),
const QStack< CollectionAttribute::List > & ancestorAttributes = QStack<CollectionAttribute::List>(),
const QStringList & mimeTypes = QStringList() )
static

Returns the protocol representation of the given collection.

Make sure DataStore::activeCachePolicy() has been called before to include the effective cache policy

Definition at line 94 of file handlerhelper.cpp.

◆ fetchTagsResponse()

Protocol::FetchTagsResponse HandlerHelper::fetchTagsResponse ( const Tag & tag,
const Protocol::TagFetchScope & tagFetchScope,
Connection * connection = nullptr )
static

Definition at line 192 of file handlerhelper.cpp.

◆ pathForCollection()

QString HandlerHelper::pathForCollection ( const Collection & col)
static

Returns the full path for the given collection.

Definition at line 58 of file handlerhelper.cpp.

◆ resolveFlags()

Flag::List HandlerHelper::resolveFlags ( const QSet< QByteArray > & flagNames)
static

Converts a bytearray list of flag names into flag records.

Exceptions
HandlerExceptionon errors during database operations

Definition at line 258 of file handlerhelper.cpp.

◆ resolveTagsByGID()

Tag::List HandlerHelper::resolveTagsByGID ( const QStringList & tagsGIDs)
static

Definition at line 289 of file handlerhelper.cpp.

◆ resolveTagsByRID()

Tag::List HandlerHelper::resolveTagsByRID ( const QStringList & tagsRIDs,
const CommandContext & context )
static

Definition at line 324 of file handlerhelper.cpp.

◆ resolveTagsByUID()

Tag::List HandlerHelper::resolveTagsByUID ( const QList< qint64 > & tags)
static

Converts a imap set of tags into tag records.

Exceptions
HandlerExceptionon errors during database operations

Definition at line 272 of file handlerhelper.cpp.

◆ tagsFromScope()

Tag::List HandlerHelper::tagsFromScope ( const Scope & scope,
const CommandContext & context )
static

Definition at line 397 of file handlerhelper.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 Sat Dec 21 2024 17:01:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.