| 1 |
/* |
| 2 |
* BluezQt - Asynchronous Bluez wrapper library |
| 3 |
* |
| 4 |
* SPDX-FileCopyrightText: 2014-2015 David Rosca <[email protected]> |
| 5 |
* |
| 6 |
* SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 7 |
*/ |
| 8 |
|
| 9 |
#ifndef BLUEZQT_OBEXAGENTADAPTOR_H |
| 10 |
#define BLUEZQT_OBEXAGENTADAPTOR_H |
| 11 |
|
| 12 |
#include <QDBusAbstractAdaptor> |
| 13 |
|
| 14 |
#include "request.h" |
| 15 |
#include "types.h" |
| 16 |
|
| 17 |
class QDBusObjectPath; |
| 18 |
class QDBusPendingCallWatcher; |
| 19 |
|
| 20 |
namespace BluezQt |
| 21 |
{ |
| 22 |
class ObexAgent; |
| 23 |
class ObexManager; |
| 24 |
|
| 25 |
class ObexAgentAdaptor : public QDBusAbstractAdaptor |
| 26 |
{ |
| 27 |
Q_OBJECT |
| 28 |
Q_CLASSINFO("D-Bus Interface", "org.bluez.obex.Agent1") |
| 29 |
|
| 30 |
public: |
| 31 |
explicit ObexAgentAdaptor(ObexAgent *parent, ObexManager *manager); |
| 32 |
|
| 33 |
public Q_SLOTS: |
| 34 |
QString AuthorizePush(const QDBusObjectPath &transfer, const QDBusMessage &msg); |
| 35 |
|
| 36 |
Q_NOREPLY void Cancel(); |
| 37 |
Q_NOREPLY void Release(); |
| 38 |
|
| 39 |
private Q_SLOTS: |
| 40 |
void getPropertiesFinished(QDBusPendingCallWatcher *watcher); |
| 41 |
|
| 42 |
private: |
| 43 |
ObexAgent *m_agent; |
| 44 |
ObexManager *m_manager; |
| 45 |
QString m_transferPath; |
| 46 |
Request<QString> m_transferRequest; |
| 47 |
}; |
| 48 |
|
| 49 |
} // namespace BluezQt |
| 50 |
|
| 51 |
#endif // BLUEZQT_OBEXAGENTADAPTOR_H |