diff options
Diffstat (limited to 'core/btdiscovery.cpp')
-rw-r--r-- | core/btdiscovery.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp index 90eb2e844..729ee9851 100644 --- a/core/btdiscovery.cpp +++ b/core/btdiscovery.cpp @@ -307,4 +307,18 @@ bool BTDiscovery::checkException(const char* method, const QAndroidJniObject *ob } #endif // Q_OS_ANDROID +QHash<QString, QBluetoothDeviceInfo> btDeviceInfo; + +void saveBtDeviceInfo(const char* devaddr, QBluetoothDeviceInfo deviceInfo) +{ + btDeviceInfo[devaddr] = deviceInfo; +} + +QBluetoothDeviceInfo getBtDeviceInfo(const char* devaddr) +{ + if (btDeviceInfo.contains(devaddr)) + return btDeviceInfo[devaddr]; + qDebug() << "need to scan for" << devaddr; + return QBluetoothDeviceInfo(); +} #endif // BT_SUPPORT |