Akonadi

agentserver.h
1 /*
2  SPDX-FileCopyrightText: 2010 Volker Krause <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef AKONADI_AGENTSERVER_H
8 #define AKONADI_AGENTSERVER_H
9 
10 #include "agentpluginloader.h"
11 
12 #include <QHash>
13 #include <QObject>
14 #include <QQueue>
15 
16 namespace Akonadi
17 {
18 
19 class AgentThread;
20 
21 class AgentServer : public QObject
22 {
23  Q_OBJECT
24  Q_CLASSINFO("D-Bus Interface", "org.freedesktop.Akonadi.AgentServer")
25 
26  typedef QPair<QString, qlonglong> ConfigureInfo;
27 
28 public:
29  explicit AgentServer(QObject *parent = nullptr);
30  ~AgentServer();
31 
32 public Q_SLOTS:
33  Q_SCRIPTABLE void agentInstanceConfigure(const QString &identifier, qlonglong windowId);
34  Q_SCRIPTABLE bool started(const QString &identifier) const;
35  Q_SCRIPTABLE void startAgent(const QString &identifier, const QString &typeIdentifier, const QString &fileName);
36  Q_SCRIPTABLE void stopAgent(const QString &identifier);
37  Q_SCRIPTABLE void quit();
38 
39 private Q_SLOTS:
40  void processConfigureRequest();
41 
42 private:
43  QHash<QString, AgentThread *> m_agents;
44  QQueue<ConfigureInfo> m_configureQueue;
45  AgentPluginLoader m_agentLoader;
46  bool m_processingConfigureRequests;
47  bool m_quiting;
48 };
49 
50 }
51 
52 #endif
Q_CLASSINFO(Name, Value)
Q_OBJECTQ_OBJECT
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Jul 8 2020 23:15:01 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.