Akonadi

tagfetchhelper.h
1/*
2 SPDX-FileCopyrightText: 2014 Daniel Vrátil <dvratil@redhat.com>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <QSqlQuery>
10
11#include "private/protocol_p.h"
12#include "private/scope_p.h"
13
14namespace Akonadi
15{
16namespace Server
17{
18class Connection;
19class QueryBuilder;
20
21class TagFetchHelper
22{
23public:
24 TagFetchHelper(Connection *connection, const Scope &scope, const Protocol::TagFetchScope &fetchScope);
25 ~TagFetchHelper() = default;
26
27 bool fetchTags();
28
29 static QMap<QByteArray, QByteArray> fetchTagAttributes(qint64 tagId, const Protocol::TagFetchScope &fetchScope);
30
31private:
32 QueryBuilder buildTagQuery();
33 QueryBuilder buildAttributeQuery() const;
34 static QueryBuilder buildAttributeQuery(qint64 id, const Protocol::TagFetchScope &fetchScope);
35
36private:
37 Connection *mConnection = nullptr;
38 Scope mScope;
39 Protocol::TagFetchScope mFetchScope;
40};
41
42} // namespace Server
43} // namespace Akonadi
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:31:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.