| 1 |
/* |
| 2 |
* SPDX-FileCopyrightText: 2014-2015 David Rosca <[email protected]> |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 5 |
*/ |
| 6 |
|
| 7 |
#ifndef AGENTMANAGER_H |
| 8 |
#define AGENTMANAGER_H |
| 9 |
|
| 10 |
#include "object.h" |
| 11 |
|
| 12 |
#include <QDBusAbstractAdaptor> |
| 13 |
|
| 14 |
class QDBusMessage; |
| 15 |
|
| 16 |
class AgentManager : public QDBusAbstractAdaptor, public Object |
| 17 |
{ |
| 18 |
Q_OBJECT |
| 19 |
Q_CLASSINFO("D-Bus Interface", "org.bluez.AgentManager1") |
| 20 |
|
| 21 |
public: |
| 22 |
explicit AgentManager(QObject *parent = nullptr); |
| 23 |
|
| 24 |
void runAction(const QString &actionName, const QVariantMap &properties); |
| 25 |
|
| 26 |
public Q_SLOTS: |
| 27 |
void RegisterAgent(const QDBusObjectPath &path, const QString &capability, const QDBusMessage &msg); |
| 28 |
void UnregisterAgent(const QDBusObjectPath &path, const QDBusMessage &msg); |
| 29 |
void RequestDefaultAgent(const QDBusObjectPath &path); |
| 30 |
|
| 31 |
private: |
| 32 |
void runRequestPinCodeAction(const QVariantMap &properties); |
| 33 |
void runDisplayPinCodeAction(const QVariantMap &properties); |
| 34 |
void runRequestPasskeyAction(const QVariantMap &properties); |
| 35 |
void runDisplayPasskeyAction(const QVariantMap &properties); |
| 36 |
void runRequestConfirmationAction(const QVariantMap &properties); |
| 37 |
void runRequestAuthorizationAction(const QVariantMap &properties); |
| 38 |
void runAuthorizeServiceAction(const QVariantMap &properties); |
| 39 |
void runCancelAction(); |
| 40 |
void runReleaseAction(); |
| 41 |
|
| 42 |
QDBusObjectPath m_agent; |
| 43 |
QString m_service; |
| 44 |
QString m_capability; |
| 45 |
}; |
| 46 |
|
| 47 |
#endif // AGENTMANAGER_H |