Akonadi

resourcesynchronizationjob.h
1 /*
2  * Copyright (c) 2009 Volker Krause <[email protected]>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef AKONADI_RESOURCESYNCHRONIZATIONJOB_H
19 #define AKONADI_RESOURCESYNCHRONIZATIONJOB_H
20 
21 #include "akonadicore_export.h"
22 
23 #include <KJob>
24 
25 namespace Akonadi
26 {
27 
28 class AgentInstance;
29 class ResourceSynchronizationJobPrivate;
30 
60 class AKONADICORE_EXPORT ResourceSynchronizationJob : public KJob
61 {
62  Q_OBJECT
63 
64 public:
70  explicit ResourceSynchronizationJob(const AgentInstance &instance, QObject *parent = nullptr);
71 
75  ~ResourceSynchronizationJob() override;
76 
83  Q_REQUIRED_RESULT bool collectionTreeOnly() const;
84 
91  void setCollectionTreeOnly(bool collectionTreeOnly);
92 
96  Q_REQUIRED_RESULT AgentInstance resource() const;
97 
98  /* reimpl */
99  void start() override;
100 
101  /*
102  * @since 5.1
103  */
104  void setTimeoutCountLimit(int count);
105  Q_REQUIRED_RESULT int timeoutCountLimit() const;
106 
107 private:
108  //@cond PRIVATE
109  ResourceSynchronizationJobPrivate *const d;
110  friend class ResourceSynchronizationJobPrivate;
111 
112  Q_PRIVATE_SLOT(d, void slotSynchronized())
113  Q_PRIVATE_SLOT(d, void slotTimeout())
114  //@endcond
115 };
116 
117 }
118 
119 #endif
Job that synchronizes a resource.
Represents one agent instance and takes care of communication with it.
Helper integration between Akonadi and Qt.
A representation of an agent instance.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed May 27 2020 22:43:40 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.