summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothservicediscoveryagent_p.h
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2023-06-09 17:08:44 +0300
committerTarja Sundqvist <tarja.sundqvist@qt.io>2023-06-09 17:08:44 +0300
commitf0c98c39447894bba493aa91c65053d7f18d68cb (patch)
treeb895c2a764b5c77edd75ae7af5d4336191a8301c /src/bluetooth/qbluetoothservicediscoveryagent_p.h
parente2dd32305ec52c96518a4357423d546c7c66f9a6 (diff)
parent807c62ddee0749b68458654f7d37b28aceca6359 (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.11' into tqtc/lts-5.15-opensourcev5.15.11-lts-lgpl
Diffstat (limited to 'src/bluetooth/qbluetoothservicediscoveryagent_p.h')
-rw-r--r--src/bluetooth/qbluetoothservicediscoveryagent_p.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_p.h b/src/bluetooth/qbluetoothservicediscoveryagent_p.h
index 0527cdde..40321c55 100644
--- a/src/bluetooth/qbluetoothservicediscoveryagent_p.h
+++ b/src/bluetooth/qbluetoothservicediscoveryagent_p.h
@@ -223,6 +223,12 @@ private:
LocalDeviceBroadcastReceiver *localDeviceReceiver = nullptr;
QAndroidJniObject btAdapter;
+ // The sdpCache caches service discovery results while it is running, and is
+ // cleared once finished. The cache is used as we may (or may not) get more accurate
+ // results after the first result. This temporary caching allows to send the
+ // serviceDiscovered() signal once per service and with the most accurate information.
+ // Partial cache clearing may occur already during the scan if the second (more accurate)
+ // scan result is received.
QMap<QBluetoothAddress,QPair<QBluetoothDeviceInfo,QList<QBluetoothUuid> > > sdpCache;
#endif