diff options
author | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2016-06-10 18:56:56 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> | 2016-06-16 16:16:50 +0000 |
commit | 05a809736706db8536302e1588f81d7fa2eb93e6 (patch) | |
tree | fe5b7f0ff96f876d01422532e1afa70ffd43a88f /src/bluetooth/qlowenergycontroller_osx.mm | |
parent | c37703dcfcd6c9762be046779f136bc8f1c4acd9 (diff) |
QtBluetooth - add LE device discovery timeout (OS X/iOS)
- Instead of hardcoded 10 second timeout use the latest Qt API enabling
arbitrary or infinite length for LE device discovery.
- Since now scan can take long or unlimited time, the previous approach
with detached CBCentralManager and DDA is not working anymore -
we can not report devices only at the end of scan.
Re-use LENotifier and signals/slots instead.
- Remove DDA timer, timeout logic is completely inside
osxbtledeviceinquiry object now.
Change-Id: I07735581ac175d1d5e5d788aaf697dcb41429e31
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/bluetooth/qlowenergycontroller_osx.mm')
-rw-r--r-- | src/bluetooth/qlowenergycontroller_osx.mm | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/bluetooth/qlowenergycontroller_osx.mm b/src/bluetooth/qlowenergycontroller_osx.mm index 5c4c7c37..6e85e630 100644 --- a/src/bluetooth/qlowenergycontroller_osx.mm +++ b/src/bluetooth/qlowenergycontroller_osx.mm @@ -103,7 +103,6 @@ ServicePrivate qt_createLEService(QLowEnergyControllerPrivateOSX *controller, CB // TODO: isPrimary is ... always 'NO' - to be investigated. /* - using OSXBluetooth::qt_OS_limit; if (!cbService.isPrimary) { // Our guess included/not was probably wrong. newService->type &= ~QLowEnergyService::PrimaryService; @@ -147,12 +146,9 @@ QLowEnergyControllerPrivateOSX::QLowEnergyControllerPrivateOSX(QLowEnergyControl Q_ASSERT_X(q, Q_FUNC_INFO, "invalid q_ptr (null)"); using OSXBluetooth::LECBManagerNotifier; - using OSXBluetooth::qt_OS_limit; role = r; - - QScopedPointer<LECBManagerNotifier> notifier(new LECBManagerNotifier); if (role == QLowEnergyController::PeripheralRole) { #ifndef Q_OS_TVOS |