summaryrefslogtreecommitdiffstats
path: root/bluetooth/bluetooth.h
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2018-11-15 11:30:48 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2018-11-15 11:30:48 +0000
commit2a37b2bd4aa01ae5567921bd894aae68287a0e99 (patch)
tree07ea86769e6af95b2c5a6c0ca8065eb7723e3ab0 /bluetooth/bluetooth.h
parentfcf72b38a4430c56b977ad14aea474de7e6af599 (diff)
parent0e1dae0af026f6a30e82f7129596da83bc4d8426 (diff)
Merge changes I0170eafa,I705df82d,I688cc19c,Iac48c5a1guppy_6.99.1guppy/6.99.16.99.1
* changes: libqtappfw: bluetooth: send out power event libqtappfw: bluetooth: update to rewrite of bluetooth binding libqtappfw: bluetooth: remove avrcp_controls Revert "libqtappfw: bluetooth: add binding version 2.0 verbs"
Diffstat (limited to 'bluetooth/bluetooth.h')
-rw-r--r--bluetooth/bluetooth.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/bluetooth/bluetooth.h b/bluetooth/bluetooth.h
index 24605cf..0f38381 100644
--- a/bluetooth/bluetooth.h
+++ b/bluetooth/bluetooth.h
@@ -19,6 +19,7 @@
#include <QDebug>
#include <QObject>
+#include <QJsonArray>
#include "messageengine.h"
@@ -38,18 +39,17 @@ class Bluetooth : public QObject
Q_INVOKABLE void start_discovery(void);
Q_INVOKABLE void stop_discovery(void);
- Q_INVOKABLE void remove_device(QString address);
- Q_INVOKABLE void pair(QString address);
- Q_INVOKABLE void cancel_pair(QString address);
+ Q_INVOKABLE void remove_device(QString device);
+ Q_INVOKABLE void pair(QString device);
+ Q_INVOKABLE void cancel_pair(QString device);
- Q_INVOKABLE void connect(QString address, QString uuid);
- Q_INVOKABLE void connect(QString address);
+ Q_INVOKABLE void connect(QString device, QString uuid);
+ Q_INVOKABLE void connect(QString device);
- Q_INVOKABLE void disconnect(QString address, QString uuid);
- Q_INVOKABLE void disconnect(QString address);
+ Q_INVOKABLE void disconnect(QString device, QString uuid);
+ Q_INVOKABLE void disconnect(QString device);
- Q_INVOKABLE void send_confirmation(void);
- Q_INVOKABLE void set_avrcp_controls(QString address, QString cmd);
+ Q_INVOKABLE void send_confirmation(int pincode);
bool power() const { return m_power; };
bool discoverable() const { return m_discoverable; };
@@ -67,7 +67,10 @@ class Bluetooth : public QObject
private:
MessageEngine *m_mloop;
- void generic_command(QString, QString);
+ void send_command(QString, QJsonObject);
+ void set_discovery_filter();
+ void discovery_command(bool);
+ void processDeviceChangesEvent(QJsonObject data);
// slots
void onConnected();
@@ -83,11 +86,8 @@ class Bluetooth : public QObject
QMap<QString, QString> uuids;
const QStringList events {
- "connection",
- "request_confirmation",
- "device_added",
- "device_removed",
- "device_updated",
+ "device_changes",
+ "agent",
};
};