Akonadi
handlerhelper.cpp
86 Protocol::FetchCollectionsResponse HandlerHelper::fetchCollectionsResponse(AkonadiServer &akonadi, const Collection &col)
95 return fetchCollectionsResponse(akonadi, col, col.attributes(), false, 0, QStack<Collection>(), QStack<CollectionAttribute::List>(), mimeTypes);
98 Protocol::FetchCollectionsResponse HandlerHelper::fetchCollectionsResponse(AkonadiServer &akonadi,
143 QVector<Protocol::Ancestor> ancestorList = HandlerHelper::ancestorsResponse(ancestorDepth, ancestors, ancestorAttributes);
162 HandlerHelper::ancestorsResponse(int ancestorDepth, const QStack<Collection> &_ancestors, const QStack<CollectionAttribute::List> &_ancestorsAttributes)
196 Protocol::FetchTagsResponse HandlerHelper::fetchTagsResponse(const Tag &tag, const Protocol::TagFetchScope &tagFetchScope, Connection *connection)
219 qb.addValueCondition(TagRemoteIdResourceRelation::resourceIdColumn(), Query::Equals, connection->context().resource().id());
241 std::transform(scope.cbegin(), scope.cend(), std::back_inserter(types), [](const QByteArray &ba) {
253 attributes.insert(Utils::variantToByteArray(query.value(0)), Utils::variantToByteArray(query.value(1)));
262 Protocol::FetchRelationsResponse HandlerHelper::fetchRelationsResponse(const Relation &relation)
339 Tag::List HandlerHelper::resolveTagsByRID(const QStringList &tagsRIDs, const CommandContext &context)
354 cond.addColumnCondition(Tag::idFullColumnName(), Query::Equals, TagRemoteIdResourceRelation::tagIdFullColumnName());
355 cond.addValueCondition(TagRemoteIdResourceRelation::resourceIdFullColumnName(), Query::Equals, context.resource().id());
357 qb.addValueCondition(TagRemoteIdResourceRelation::remoteIdFullColumnName(), Query::Equals, tagRID);
390 Collection HandlerHelper::collectionFromScope(const Scope &scope, const CommandContext &context)
T & first()
bool isEmpty() const const
QString fromUtf8(const char *str, int size)
Item left() const
Returns the identifier of the left side of the relation.
Definition: relation.cpp:65
Attribute::List attributes() const
Returns a list of all attributes of the collection.
Definition: collection.cpp:166
QStringList split(const QString &sep, QString::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
int count(const T &value) const const
void append(const T &value)
void setToQuery(const ImapSet &set, const QString &column, QueryBuilder &qb)
Add conditions to qb for the given uid set set applied to column.
Definition: queryhelper.cpp:16
Definition: collectionfetchhandler.h:12
int size() const const
static Tag::List resolveTagsByUID(const ImapSet &tags)
Converts a imap set of tags into tag records.
Definition: handlerhelper.cpp:287
void addJoin(JoinType joinType, const QString &table, const Query::Condition &condition)
Join a table to the query.
Definition: querybuilder.cpp:133
QStringList types(Mode mode=Writing)
static Protocol::CachePolicy cachePolicyResponse(const Collection &col)
Returns the protocol representation of the cache policy of the given Collection object.
Definition: handlerhelper.cpp:73
void reserve(int alloc)
KSERVICE_EXPORT KService::List query(FilterFunc filterFunc)
QMap::iterator insert(const Key &key, const T &value)
int size() const const
void prepend(const T &value)
static QString pathForCollection(const Collection &col)
Returns the full path for the given collection.
Definition: handlerhelper.cpp:62
SkipEmptyParts
const T & at(int i) const const
QByteArray toUtf8() const const
T pop()
void addValueCondition(const QString &column, CompareOperator op, const QVariant &value)
Add a WHERE condition which compares a column with a given value.
Definition: query.cpp:12
static QVector< Protocol::Ancestor > ancestorsResponse(int ancestorDepth, const QStack< Collection > &ancestors, const QStack< CollectionAttribute::List > &_ancestorsAttributes=QStack< CollectionAttribute::List >())
Returns the protocol representation of a collection ancestor chain.
Definition: handlerhelper.cpp:162
bool isEmpty() const const
void addColumnCondition(const QString &column, CompareOperator op, const QString &column2)
Add a WHERE condition which compares a column with another column.
Definition: query.cpp:22
void addValueCondition(const QString &column, Query::CompareOperator op, const QVariant &value, ConditionType type=WhereCondition)
Add a WHERE or HAVING condition which compares a column with a given value.
Definition: querybuilder.cpp:154
QString join(const QString &separator) const const
void reserve(int size)
void scopeToQuery(const Scope &scope, const CommandContext &context, QueryBuilder &qb)
Add conditions to qb for the given collection operation scope scope.
Definition: collectionqueryhelper.cpp:33
void insert(int i, const T &value)
static Protocol::FetchCollectionsResponse fetchCollectionsResponse(AkonadiServer &akonadi, const Collection &col)
Returns the protocol representation of the given collection.
Definition: handlerhelper.cpp:86
Helper class for creating and executing database SELECT queries.
Definition: selectquerybuilder.h:19
static Collection collectionFromIdOrName(const QByteArray &id)
Returns the collection identified by the given id or path.
Definition: handlerhelper.cpp:27
static Flag::List resolveFlags(const QSet< QByteArray > &flagNames)
Converts a bytearray list of flag names into flag records.
Definition: handlerhelper.cpp:273
int count(const T &value) const const
An Connection represents one connection of a client to the server.
Definition: connection.h:46
Item right() const
Returns the identifier of the right side of the relation.
Definition: relation.cpp:75
T value(int i) const const
Helper class to construct arbitrary SQL queries.
Definition: querybuilder.h:31
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jun 30 2022 03:51:46 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jun 30 2022 03:51:46 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.