diff options
author | Jan Mulder <jlmulder@xs4all.nl> | 2017-06-02 14:06:11 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-06-02 11:31:00 -0700 |
commit | dbd1d1f41a84f1cdb48367087f1372ca7612e9c9 (patch) | |
tree | 56568f0364f15e65bbfe3b15a7398a562cd8aa11 /mobile-widgets/qmlmanager.h | |
parent | 3b4091a0b9fd8d2e0486390c90971e69e0a4749c (diff) | |
download | subsurface-dbd1d1f41a84f1cdb48367087f1372ca7612e9c9.tar.gz |
Android BT: generalize pairing data
This adds a list of paired BT devices to the QMLManager class. In addition,
a very simple implementation is made of getting the paired BT devices on
Linux, so that we can test further processing of selecting the proper
devices, in a mobile-on-desktop situation.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'mobile-widgets/qmlmanager.h')
-rw-r--r-- | mobile-widgets/qmlmanager.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h index bc2cc1fbf..b10ae9af2 100644 --- a/mobile-widgets/qmlmanager.h +++ b/mobile-widgets/qmlmanager.h @@ -126,9 +126,13 @@ public: Q_INVOKABLE int getProductIndex(); Q_INVOKABLE QString getBtAddress(); #if defined(BT_SUPPORT) + struct btPairedDevice { + QBluetoothAddress address; + QString name; + }; void btDeviceDiscovered(const QBluetoothDeviceInfo &device); + void getBluetoothDevices(); #endif - QStringList getBluetoothDevices(); public slots: void applicationStateChanged(Qt::ApplicationState state); @@ -217,6 +221,7 @@ private: #endif #if defined(BT_SUPPORT) + QList<struct btPairedDevice> btPairedDevices; QBluetoothLocalDevice localBtDevice; QBluetoothDeviceDiscoveryAgent *discoveryAgent; struct btVendorProduct { |