diff options
author | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2019-03-25 13:40:37 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@automotivelinux.org> | 2019-03-25 13:40:37 +0000 |
commit | f4aad7aee0d23560a9b562057b866ea6762ca3cf (patch) | |
tree | 3b55504844060b4c4e69e21b6fbc22cb9f701e91 /bluetooth/bluetooth.h | |
parent | 6e0dbd4ae1da3225f62caf17326f08b1a2cb3773 (diff) | |
parent | 6a80077e386e8a74940e81268055ff5ea0d97771 (diff) |
Merge "libqtappfw: bluetooth: add BluetoothModel support"
Diffstat (limited to 'bluetooth/bluetooth.h')
-rw-r--r-- | bluetooth/bluetooth.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bluetooth/bluetooth.h b/bluetooth/bluetooth.h index 0f38381..6cef0ce 100644 --- a/bluetooth/bluetooth.h +++ b/bluetooth/bluetooth.h @@ -22,6 +22,7 @@ #include <QJsonArray> #include "messageengine.h" +#include "bluetoothmodel.h" class Bluetooth : public QObject { @@ -30,7 +31,7 @@ class Bluetooth : public QObject Q_PROPERTY(bool discoverable READ discoverable WRITE setDiscoverable NOTIFY discoverableChanged) public: - explicit Bluetooth(QUrl &url, QObject * parent = Q_NULLPTR); + explicit Bluetooth(QUrl &url, QQmlContext *context, QObject * parent = Q_NULLPTR); virtual ~Bluetooth(); void setPower(bool); @@ -60,16 +61,15 @@ class Bluetooth : public QObject void connectionEvent(QJsonObject data); void requestConfirmationEvent(QJsonObject data); - void deviceAddedEvent(QJsonObject data); - void deviceRemovedEvent(QJsonObject data); - void deviceUpdatedEvent(QJsonObject data); - void deviceListEvent(QJsonObject data); private: MessageEngine *m_mloop; + QQmlContext *m_context; + BluetoothModel *m_bluetooth; void send_command(QString, QJsonObject); void set_discovery_filter(); void discovery_command(bool); + void populateDeviceList(QJsonObject data); void processDeviceChangesEvent(QJsonObject data); // slots |