mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
3b4091a0b9
commit
dbd1d1f41a
2 changed files with 38 additions and 22 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue