Akonadi

core/agentmanager.h
1 /*
2  SPDX-FileCopyrightText: 2006-2008 Tobias Koenig <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef AKONADI_AGENTMANAGER_H
8 #define AKONADI_AGENTMANAGER_H
9 
10 #include "akonadicore_export.h"
11 
12 #include "agenttype.h"
13 #include "agentinstance.h"
14 
15 #include <QObject>
16 
17 #include <memory>
18 
19 namespace Akonadi
20 {
21 
22 class AgentManagerPrivate;
23 class Collection;
24 
45 class AKONADICORE_EXPORT AgentManager : public QObject
46 {
47  friend class AgentInstance;
48  friend class AgentInstanceCreateJobPrivate;
49  friend class AgentManagerPrivate;
50 
51  Q_OBJECT
52 
53 public:
57  static AgentManager *self();
58 
62  ~AgentManager();
63 
67  Q_REQUIRED_RESULT AgentType::List types() const;
68 
73  Q_REQUIRED_RESULT AgentType type(const QString &identifier) const;
74 
78  Q_REQUIRED_RESULT AgentInstance::List instances() const;
79 
88  Q_REQUIRED_RESULT AgentInstance instance(const QString &identifier) const;
89 
93  void removeInstance(const AgentInstance &instance);
94 
100  void synchronizeCollection(const Collection &collection);
101 
110  void synchronizeCollection(const Collection &collection, bool recursive);
111 
112 Q_SIGNALS:
118  void typeAdded(const Akonadi::AgentType &type);
119 
125  void typeRemoved(const Akonadi::AgentType &type);
126 
132  void instanceAdded(const Akonadi::AgentInstance &instance);
133 
139  void instanceRemoved(const Akonadi::AgentInstance &instance);
140 
147  void instanceStatusChanged(const Akonadi::AgentInstance &instance);
148 
155  void instanceProgressChanged(const Akonadi::AgentInstance &instance);
156 
162  void instanceNameChanged(const Akonadi::AgentInstance &instance);
163 
170  void instanceError(const Akonadi::AgentInstance &instance, const QString &message);
171 
178  void instanceWarning(const Akonadi::AgentInstance &instance, const QString &message);
179 
187  void instanceOnline(const Akonadi::AgentInstance &instance, bool online);
188 
189 private:
190  //@cond PRIVATE
191  explicit AgentManager();
192 
193  std::unique_ptr<AgentManagerPrivate> const d;
194  //@endcond
195 };
196 
197 }
198 
199 #endif
Provides an interface to retrieve agent types and manage agent instances.
Represents a collection of PIM items.
Definition: collection.h:63
A representation of an agent type.
Helper integration between Akonadi and Qt.
A representation of an agent instance.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 16 2021 23:19:44 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.