Akonadi

core/agentinstance.h
1 /*
2  SPDX-FileCopyrightText: 2008 Tobias Koenig <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef AKONADI_AGENTINSTANCE_H
8 #define AKONADI_AGENTINSTANCE_H
9 
10 #include "akonadicore_export.h"
11 
12 #include <QMetaType>
13 #include <QSharedDataPointer>
14 
15 class QString;
16 class QWidget;
17 
18 namespace Akonadi
19 {
20 
21 class AgentType;
22 
47 class AKONADICORE_EXPORT AgentInstance
48 {
49  friend class AgentManager;
50  friend class AgentManagerPrivate;
51 
52 public:
57 
61  enum Status {
62  Idle = 0,
65  NotConfigured
66  };
67 
71  AgentInstance();
72 
76  AgentInstance(const AgentInstance &other);
77 
81  ~AgentInstance();
82 
86  Q_REQUIRED_RESULT bool isValid() const;
87 
91  Q_REQUIRED_RESULT AgentType type() const;
92 
96  Q_REQUIRED_RESULT QString identifier() const;
97 
101  Q_REQUIRED_RESULT QString name() const;
102 
106  void setName(const QString &name);
107 
111  Q_REQUIRED_RESULT Status status() const;
112 
116  Q_REQUIRED_RESULT QString statusMessage() const;
117 
122  Q_REQUIRED_RESULT int progress() const;
123 
127  Q_REQUIRED_RESULT bool isOnline() const;
128 
132  void setIsOnline(bool online);
133 
143  AKONADICORE_DEPRECATED void configure(QWidget *parent = nullptr);
144 
148  void synchronize();
149 
153  void synchronizeCollectionTree();
154 
158  void synchronizeTags();
159 
163  void synchronizeRelations();
164 
169  AgentInstance &operator=(const AgentInstance &other);
170 
175  Q_REQUIRED_RESULT bool operator==(const AgentInstance &other) const;
176 
181  void abortCurrentTask() const;
182 
186  void reconfigure() const;
187 
191  void restart() const;
192 
193 private:
194  //@cond PRIVATE
195  class Private;
197  //@endcond
198 };
199 
200 }
201 
202 Q_DECLARE_TYPEINFO(Akonadi::AgentInstance, Q_MOVABLE_TYPE);
203 
204 Q_DECLARE_METATYPE(Akonadi::AgentInstance)
205 
206 #endif
Provides an interface to retrieve agent types and manage agent instances.
QVector< AgentInstance > List
Describes a list of agent instances.
The agent instance is working on something.
A representation of an agent type.
Helper integration between Akonadi and Qt.
Status
Describes the status of the agent instance.
A representation of an agent instance.
The agent instance encountered an error state.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Nov 21 2020 23:17:03 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.