summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmanager.h
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2017-06-02 14:06:11 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-06-02 11:31:00 -0700
commitdbd1d1f41a84f1cdb48367087f1372ca7612e9c9 (patch)
tree56568f0364f15e65bbfe3b15a7398a562cd8aa11 /mobile-widgets/qmlmanager.h
parent3b4091a0b9fd8d2e0486390c90971e69e0a4749c (diff)
downloadsubsurface-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.h7
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 {