File indexing completed on 2025-01-05 04:47:01

0001 /*
0002     SPDX-FileCopyrightText: 2015 Daniel Vrátil <dvratil@redhat.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "entities.h"
0010 
0011 namespace Akonadi
0012 {
0013 class Scope;
0014 
0015 namespace Server
0016 {
0017 class CommandContext;
0018 class QueryBuilder;
0019 
0020 /**
0021   Helper methods to generate WHERE clauses for item queries based on the item set
0022   used in the protocol.
0023 */
0024 namespace TagQueryHelper
0025 {
0026 /**
0027   Add conditions to @p qb for the given remote identifier @p rid.
0028   The rid context is taken from @p context.
0029 */
0030 void remoteIdToQuery(const QStringList &rids, const CommandContext &context, QueryBuilder &qb);
0031 void gidToQuery(const QStringList &gids, const CommandContext &context, QueryBuilder &qb);
0032 
0033 /**
0034   Add conditions to @p qb for the given item operation scope @p scope.
0035   The rid context is taken from @p context, if none is specified an exception is thrown.
0036 */
0037 void scopeToQuery(const Scope &scope, const CommandContext &context, QueryBuilder &qb);
0038 }
0039 
0040 } // namespace Server
0041 } // namespace Akonadi