Akonadi::Server::HandlerHelper

Akonadi::Server::HandlerHelper Class Reference

#include <handlerhelper.h>

Static Public Member Functions

static QVector< 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::FetchRelationsResponse fetchRelationsResponse (const Relation &relation)
 
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 ImapSet &tags)
 
static Tag::List tagsFromScope (const Scope &scope, const CommandContext &context)
 

Detailed Description

Helper functions for command handlers.

Definition at line 44 of file handlerhelper.h.

Member Function Documentation

QVector< 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 168 of file handlerhelper.cpp.

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

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

Definition at line 77 of file handlerhelper.cpp.

Collection HandlerHelper::collectionFromIdOrName ( const QByteArray id)
static

Returns the collection identified by the given id or path.

Definition at line 27 of file handlerhelper.cpp.

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 90 of file handlerhelper.cpp.

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 103 of file handlerhelper.cpp.

QString HandlerHelper::pathForCollection ( const Collection col)
static

Returns the full path for the given collection.

Definition at line 66 of file handlerhelper.cpp.

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 288 of file handlerhelper.cpp.

Tag::List HandlerHelper::resolveTagsByUID ( const ImapSet &  tags)
static

Converts a imap set of tags into tag records.

Exceptions
HandlerExceptionon errors during database operations

Definition at line 302 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-2020 The KDE developers.
Generated on Wed Jul 8 2020 23:15:07 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.