Akonadi

tagfetchhelper.h
1 /*
2  SPDX-FileCopyrightText: 2014 Daniel Vr├ítil <[email protected]>
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 
14 namespace Akonadi
15 {
16 namespace Server
17 {
18 class Connection;
19 
20 class TagFetchHelper
21 {
22 public:
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 
30 private:
31  QSqlQuery buildTagQuery();
32  QSqlQuery buildAttributeQuery() const;
33  static QSqlQuery buildAttributeQuery(qint64 id, const Protocol::TagFetchScope &fetchScope);
34 
35 private:
36  Connection *mConnection = nullptr;
37  Scope mScope;
38  Protocol::TagFetchScope mFetchScope;
39 };
40 
41 } // namespace Server
42 } // namespace Akonadi
43 
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jun 25 2022 06:00:33 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.