Akonadi

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

KDE's Doxygen guidelines are available online.