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;
19
20class TagFetchHelper
21{
22public:
23 TagFetchHelper(Connection *connection, const Scope &scope, const Protocol::TagFetchScope &fetchScope);
24 ~TagFetchHelper() = default;
25
26 bool fetchTags();
27
28 static QMap<QByteArray, QByteArray> fetchTagAttributes(qint64 tagId, const Protocol::TagFetchScope &fetchScope);
29
30private:
31 QSqlQuery buildTagQuery();
32 QSqlQuery buildAttributeQuery() const;
33 static QSqlQuery buildAttributeQuery(qint64 id, const Protocol::TagFetchScope &fetchScope);
34
35private:
36 Connection *mConnection = nullptr;
37 Scope mScope;
38 Protocol::TagFetchScope mFetchScope;
39};
40
41} // namespace Server
42} // 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 Tue Mar 26 2024 11:13:38 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.