Akonadi

tagsync.h
1 /*
2  SPDX-FileCopyrightText: 2014 Christian Mollekopf <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 #pragma once
7 
8 #include "akonadicore_export.h"
9 
10 #include "item.h"
11 #include "jobs/job.h"
12 #include "tag.h"
13 
14 namespace Akonadi
15 {
16 class AKONADICORE_EXPORT TagSync : public Akonadi::Job
17 {
18  Q_OBJECT
19 public:
20  explicit TagSync(QObject *parent = nullptr);
21  ~TagSync() override;
22 
23  void setFullTagList(const Akonadi::Tag::List &tags);
24  void setTagMembers(const QHash<QString, Akonadi::Item::List> &ridMemberMap);
25 
26 protected:
27  void doStart() override;
28 
29 private Q_SLOTS:
30  void onLocalTagFetchDone(KJob *job);
31  void onCreateTagDone(KJob *job);
32  void onTagItemsFetchDone(KJob *job);
33  void onJobDone(KJob *job);
34  void slotResult(KJob *job) override;
35 
36 private:
37  void diffTags();
38  void checkDone();
39 
40 private:
41  Akonadi::Tag::List mRemoteTags;
42  Akonadi::Tag::List mLocalTags;
43  bool mDeliveryDone = false;
44  bool mTagMembersDeliveryDone = false;
45  bool mLocalTagsFetched = false;
47 };
48 
49 }
Base class for all actions in the Akonadi storage.
Definition: job.h:80
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Jun 6 2023 03:52:17 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.