Akonadi

core/agentmanager.h
1 /*
2  Copyright (c) 2006-2008 Tobias Koenig <[email protected]>
3 
4  This library is free software; you can redistribute it and/or modify it
5  under the terms of the GNU Library General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or (at your
7  option) any later version.
8 
9  This library is distributed in the hope that it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12  License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to the
16  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301, USA.
18 */
19 
20 #ifndef AKONADI_AGENTMANAGER_H
21 #define AKONADI_AGENTMANAGER_H
22 
23 #include "akonadicore_export.h"
24 
25 #include "agenttype.h"
26 #include "agentinstance.h"
27 
28 #include <QObject>
29 
30 #include <memory>
31 
32 namespace Akonadi
33 {
34 
35 class AgentManagerPrivate;
36 class Collection;
37 
58 class AKONADICORE_EXPORT AgentManager : public QObject
59 {
60  friend class AgentInstance;
61  friend class AgentInstanceCreateJobPrivate;
62  friend class AgentManagerPrivate;
63 
64  Q_OBJECT
65 
66 public:
70  static AgentManager *self();
71 
75  ~AgentManager();
76 
80  Q_REQUIRED_RESULT AgentType::List types() const;
81 
86  Q_REQUIRED_RESULT AgentType type(const QString &identifier) const;
87 
91  Q_REQUIRED_RESULT AgentInstance::List instances() const;
92 
101  Q_REQUIRED_RESULT AgentInstance instance(const QString &identifier) const;
102 
106  void removeInstance(const AgentInstance &instance);
107 
113  void synchronizeCollection(const Collection &collection);
114 
123  void synchronizeCollection(const Collection &collection, bool recursive);
124 
125 Q_SIGNALS:
131  void typeAdded(const Akonadi::AgentType &type);
132 
138  void typeRemoved(const Akonadi::AgentType &type);
139 
145  void instanceAdded(const Akonadi::AgentInstance &instance);
146 
152  void instanceRemoved(const Akonadi::AgentInstance &instance);
153 
160  void instanceStatusChanged(const Akonadi::AgentInstance &instance);
161 
168  void instanceProgressChanged(const Akonadi::AgentInstance &instance);
169 
175  void instanceNameChanged(const Akonadi::AgentInstance &instance);
176 
183  void instanceError(const Akonadi::AgentInstance &instance, const QString &message);
184 
191  void instanceWarning(const Akonadi::AgentInstance &instance, const QString &message);
192 
200  void instanceOnline(const Akonadi::AgentInstance &instance, bool online);
201 
202 private:
203  //@cond PRIVATE
204  explicit AgentManager();
205 
206  std::unique_ptr<AgentManagerPrivate> const d;
207  //@endcond
208 };
209 
210 }
211 
212 #endif
Provides an interface to retrieve agent types and manage agent instances.
Represents a collection of PIM items.
Definition: collection.h:76
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-2020 The KDE developers.
Generated on Fri Jun 5 2020 23:08:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.