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>
This commit is contained in:
Jan Mulder 2017-06-02 14:06:11 +02:00 committed by Dirk Hohndel
parent 3b4091a0b9
commit dbd1d1f41a
2 changed files with 38 additions and 22 deletions

View file

@ -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 {