File indexing completed on 2024-10-06 03:36:45

0001 /*
0002  * SPDX-FileCopyrightText: 2014-2015 David Rosca <nowrep@gmail.com>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005  */
0006 
0007 #ifndef OBEXAGENTMANAGER_H
0008 #define OBEXAGENTMANAGER_H
0009 
0010 #include "object.h"
0011 
0012 #include <QDBusAbstractAdaptor>
0013 
0014 class QDBusMessage;
0015 
0016 class ObexAgentManager : public QDBusAbstractAdaptor, public Object
0017 {
0018     Q_OBJECT
0019     Q_CLASSINFO("D-Bus Interface", "org.bluez.obex.AgentManager1")
0020 
0021 public:
0022     explicit ObexAgentManager(QObject *parent = nullptr);
0023 
0024     void runAction(const QString &actionName, const QVariantMap &properties);
0025 
0026 public Q_SLOTS:
0027     void RegisterAgent(const QDBusObjectPath &path, const QDBusMessage &msg);
0028     void UnregisterAgent(const QDBusObjectPath &path, const QDBusMessage &msg);
0029 
0030 private:
0031     void runAuthorizePushAction(const QVariantMap &properties);
0032     void runCancelAction();
0033     void runReleaseAction();
0034 
0035     QDBusObjectPath m_agent;
0036     QString m_service;
0037 };
0038 
0039 #endif // OBEXAGENTMANAGER_H