Akonadi

relationsync.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 "jobs/job.h"
11 #include "relation.h"
12 
13 namespace Akonadi
14 {
15 class AKONADICORE_EXPORT RelationSync : public Akonadi::Job
16 {
17  Q_OBJECT
18 public:
19  explicit RelationSync(QObject *parent = nullptr);
20  ~RelationSync() override;
21 
22  void setRemoteRelations(const Akonadi::Relation::List &relations);
23 
24 protected:
25  void doStart() override;
26 
27 private Q_SLOTS:
28  void onLocalFetchDone(KJob *job);
29  void slotResult(KJob *job) override;
30 
31 private:
32  void diffRelations();
33  void checkDone();
34 
35 private:
36  Akonadi::Relation::List mRemoteRelations;
37  Akonadi::Relation::List mLocalRelations;
38  bool mRemoteRelationsSet = false;
39  bool mLocalRelationsFetched = false;
40 };
41 
42 }
43 
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-2022 The KDE developers.
Generated on Sat Jul 2 2022 06:41:49 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.