summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothdevicediscoveryagent_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'gerrit/dev' into winAlex Blasche2018-02-201-0/+3
|\ | | | | | | Change-Id: I4e86dcfe5088b0bd5087de309c435250c76d4718
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-301-0/+5
| |\ | | | | | | | | | Change-Id: Iaa053dcb125490ee1e83d7e27cb75d4171297b9f
| | * winrt: Fix build using -no-pchOliver Wolff2017-10-251-0/+5
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-63210 Change-Id: I98637337d8a77c8847bd0f2c567fec5e6a4ace31 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Merge remote-tracking branch 'gerrit/dev' into winAlex Blasche2017-10-171-4/+3
|\| | | | | | | | | | | Change-Id: I28ee9f95cc0fb85a36b5bd7b2ad87e0179446995
| * | Merge remote-tracking branch 'gerrit/5.9' into devAlex Blasche2017-07-261-2/+2
| |\| | | | | | | | | | Change-Id: Ida3681a873698f22c28bc60230ca0c49d2a9d25f
| | * Windows: Fix namespaced buildOliver Wolff2017-07-261-2/+2
| | | | | | | | | | | | | | | Change-Id: I9f6a7c3884c2d7c9b0856a0e9a689ad88cca59fe Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * | Use Bluez's SetDiscoveryFilter to control the device discovery methodAlex Blasche2017-07-241-1/+1
| |/ | | | | | | | | | | | | Task-number: QTBUG-57575 Change-Id: Ia289bcb1e0172e74bbda7f4b2dbc904ca1f5a856 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * winrt: Do not emit canceled in timeout case in device discoveryOliver Wolff2017-07-041-1/+0
| | | | | | | | | | | | | | | | | | canceled should only be emitted if stop was used to abort a running device discovery. A timeout happening has to cause a normal finished. Change-Id: I1072c14a44b84da0cb93420cf7344b8bc56b523e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Fix classic and LE devices discoveryDenis Shienkov2017-06-191-6/+12
| | | | | | | | | | | | | | | | | | | | | | Devices discovery was broken due to merging from 5.9 branch. Where were introduced new QBluetoothDeviceDiscoveryAgent::DiscoveryMethods feature. But now, this code is refactored and adjusted in completelly asynchronous manner. Change-Id: I9b7c4cbe27066ed05d1ed4546f71ea559544f6f5 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'gerrit/5.9' into wip/winAlex Blasche2017-05-121-19/+43
|\| | | | | | | Change-Id: Ia247c260a9fa27df79d18e5397eba5918d626684
| * Replace custom QT_BLUEZ_BLUETOOTH against the related feature defineAlex Blasche2017-04-061-3/+3
| | | | | | | | | | Change-Id: I4fbb948841a610640acaf87364e2157e31782836 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * winrt: Enable BTLE support for Windows 10 (Mobile)Oliver Wolff2016-10-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As Windows 10 (Mobile) asks for permission before the user is able to use a Bluetooth (LE) device, the synchronous approach does not work any more. While implementing that new asynchronous way the sources were also cleaned up to be more readable (separate declaration and definition of QWinRTBluetoothDeviceDiscoveryWorker). As device discovery and Bluetooth LE work as expected on Windows 10 (Mobile) it is enabled by default now. Task-number: QTBUG-55862 Change-Id: I9e4a8d21d013b9eaf603380a784afdda3e1ab9ec Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * winrt: Filter devices found by the LE device watcherOliver Wolff2016-08-091-0/+1
| | | | | | | | | | | | | | | | | | It is possible that devices are found by the initial scan and by the device watcher. In this cases the "device found" signal should not be emitted. Change-Id: Ic8aa5a088092adfa8a5b2ea5a3c91350a7897e6a Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * winrt: Implement LE device discovery timeoutOliver Wolff2016-08-041-0/+3
| | | | | | | | | | Change-Id: If6ec32dc3105b3498eef8a20e8f464a85f1ee891 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Merge remote-tracking branch 'gerrit/dev' into btleAlex Blasche2016-07-131-1/+3
| |\ | | | | | | | | | | | | | | | | | | Adds the minimum compile requirements for the new QBluetoothDeviceDiscoveryAgent API. Change-Id: Idfe07bee63de9d2849ab68eb455d0be470591795
| | * Permit selection of discovery mode (btle vs classic)Alex Blasche2016-07-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces the new API but does not yet implement the specific selection. In any case BlueZ does not need any specific implementation as classic and BTLE devices are found using the same method. iOS does not need any specific implementation as it only supports BTLE discovery. Task-number: QTBUG-46253 Change-Id: Ie6365966091effe5f3a68f8a283657c7cb43b692 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| | * Add BTLE device discovery timeout APIAlex Blasche2016-06-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This timeout adjusts the BTLE device discovery. Some BTLE devices require some time to show up in such a search. In general the platforms use open ended search methodologies as their own usage pattern for BTLE device discovery too. So far Qt Bluetooth limited the time through a hardcoded value which the API user could not adjust. Task-number: QTBUG-53012 Change-Id: Ia37cebd4015b438db998c6b4a265f563c1a2f89f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * | Merge branch 'dev' into btleAlex Blasche2016-05-131-14/+20
| |\| | | | | | | | | | Change-Id: I073f6c45696fe28b83335fb65cca6270c458851d
| | * Updated license headersAntti Kokko2016-01-201-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I856c13e2a6d4d12c46e1286b0ca1c092ee4608f8 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * | winphone: Added bluetooth device discoveryOliver Wolff2015-09-221-1/+14
| |/ | | | | | | | | | | Change-Id: I1086ffb05b7a632a9329822c150169a3482c6655 Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Windows: Use Qt::HANDLE instead of typedef void*Denis Shienkov2015-11-171-2/+1
| | | | | | | | | | | | Change-Id: I4f2194501f652c38cff43ac1716a5853cd1e1b13 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | Windows: Use QT_WIN_BLUETOOTH macro where it is possibleDenis Shienkov2015-11-171-3/+3
| | | | | | | | | | | | Change-Id: I77811a65b530c8994b622d4d18718c50ec629684 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | Windows: Rename variables which is the system handlesDenis Shienkov2015-10-231-1/+1
| | | | | | | | | | | | | | | | | | Now the system handles have the 'h' prefix (e.g. hService), not to confuse with the others variables which contains the 'Handle' suffix (e.g. with the serviceHandle and so on). Change-Id: I3b79c5323bce043c93326edf6d660ea4bde8522a Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Windows: Refactor code related to discovering of a remote devicesDenis Shienkov2015-10-141-37/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | * There is no need to do parallel scan for LE and Classic devices. It is enough to do it one after another by using one QFutureWatcher instead of two QFutureWatchers. * Now the qwinclassicbluetooth(h).cpp files are deleted from the 'windows' directory, and its related code is moved into QBluetoothDeviceDiscoveryAgentPrivate. Change-Id: I2acf102c3a8d313d078b351e9a2ce54ebca79dee Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | Merge branch 'dev' into winAlex Blasche2015-09-241-28/+1
|\| | | | | | | | | | | | | | | | | Conflicts: src/bluetooth/qbluetooth.cpp src/bluetooth/qbluetoothdevicediscoveryagent_p.h src/bluetooth/qbluetoothlocaldevice_p.h Change-Id: I20fa8968db6c6461014899698c17aa86cd969189
| * Remove QNX/BlackBerry implementation for QtBluetoothAlex Blasche2015-06-171-28/+1
| | | | | | | | | | | | | | | | | | [ChangeLog][QtBluetooth][Platform Specific Changes] Removed support for Blackberry 10. Change-Id: I431c4f34bb10aa3668542df7a8b3403b61bf4705 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge branch 'dev' into wip/winAlex Blasche2015-02-261-7/+7
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/bluetooth/qbluetooth.cpp src/bluetooth/qbluetoothdevicediscoveryagent.h src/bluetooth/qbluetoothdevicediscoveryagent_p.h src/bluetooth/qbluetoothlocaldevice_p.h Change-Id: I29d64bd02580a8d0e547b0d7e7b7cf14832c5034
| * Update copyright headersJani Heikkinen2015-02-161-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I3822a6484e8f7a420330de1cb1aeb0c3d1cf41b7 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* | Add discovering for BLE devices on WindowsDenis Shienkov2014-12-041-0/+23
| | | | | | | | | | | | | | | | | | | | | | BLE devices are supported in Windows 8 and above. Windows has not public API to discovering/pairing of BLE devices. A user shall do it by means of standard "bluetooth" application which are inbox into Windows. Only after that there is an opportunity to display the discovered devices. Change-Id: Idd3d2949456a32c8c333744205755853aef80422 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Refactor of code for "classic" part on WindowsDenis Shienkov2014-12-011-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous code is based on the assumption where we can use each of local radio separatelly to discovery of remote devices. Windows API allows to use a handle of separately local bluetooth adapter to operate with its power, to start/stop detection of remote devices through it and so on. But in this API there is no opportunity to enumerate services and attributes of the given remote device via the concrete local adapter. Therefore now to discovery of remote devices are used all local bluetooth adapters in system. Also, the power and the host modes management now are belongs to all local adapters at once. Tested on Windows 8 with the USB CSR8510 A10 adapter Change-Id: I949b112158a575f5b563a78163c1e3990c952ada Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge branch 'dev' into wip/winAlex Blasche2014-11-131-3/+10
|\| | | | | | | | | | | | | | | Conflicts: src/bluetooth/bluetooth.pro src/bluetooth/qbluetoothlocaldevice_p.h Change-Id: Ic50580a3828e6c1f7c71fc79e1247df73cc1ecb7
| * Android: Add BluetoothLE device scanAlex Blasche2014-10-281-3/+10
| | | | | | | | | | | | Change-Id: Ibbb1e9f141d494327082aebaf9e34ffe44039115 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Merge branch '5.4' into wip/winAlex Blasche2014-09-081-18/+21
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/bluetooth/qbluetooth.cpp src/bluetooth/qbluetoothdevicediscoveryagent.h src/bluetooth/qbluetoothdevicediscoveryagent_p.h src/bluetooth/qbluetoothlocaldevice_p.h Change-Id: I87958a39605af9c2d45bbc63dc61771c5fa1cc76
| * Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-281-0/+11
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp Change-Id: Ie8bf1903f9c7c1ccd5b05a3f97049ae0882b88b8
| | * Add missing private headers warningSamuel Gaist2014-08-181-0/+11
| | | | | | | | | | | | | | | Change-Id: I0f079a9b1b45bd2d2e946e06d7688f299a9c3fc3 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | Update license headers and add new licensesJani Heikkinen2014-08-241-19/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I7a8b8b787fcae9a178794364efdefe1021d10b1b Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | | Implement the QBluetoothDeviceDiscoveryAgent class on WindowsDenis Shienkov2014-09-011-1/+29
|/ / | | | | | | | | Change-Id: I74eaf9acedbcd5b601ff3a6feef21869dbbf9bd9 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Improve consistency of device discovery.Alex Blasche2014-08-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device discovery of BTLE devices fails once the second device discovery is performed in the current process. The first discovery always succeeds. BTLE devices are advertised right after the start of the device discovery session. However the discovery session never seems to stop once it is done for the first time. This can be seen by the fact that the Discovering property of the adapter constantly toggles between true and false. As a consequence the second device discovery won't find a BTLE device in 99% of all cases. The odds that the API user initiates the second discovery right between two continues adapter searches is rather slim. The fix is to extend the device discovery process beyond a toggle of a single device discovery cycle. We ignore the end signal of the first cycle and continue to the end of the second cycle. At the same time we rely on the perceived bug which restarts the second cycle automatically. Just for the case that the second cycle doesn't start automatically we utilize a timer to manually force an end of the device discovery. The problem is likely to be a bug in Bluez4. A negative side effect of this workaround is a longer device discovery process. Change-Id: I986c8d6498b2cc9ed51f4457267c53813132cf8e Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* | Bluez5: Ensure device discovery returns meaningfull RSSI dataAlex Blasche2014-05-221-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the discovery process was started by QBluetoothDeviceDiscoveryAgent and Bluez wasn't already in discovery mode then the RSSI values are 0. The retrieval of RSSI data takes a bit more time. To find a compromise between speedy return of device scan information and the delayed RSSI information we continue to monitor the device scan and update RSSI information as the values are propagated by Bluez. However the deviceDiscovered() signal is not emitted again after an update. Only re-calling discoveredDevices() will return the most up-to-date RSSI values. Task-number: QTBUG-32085 Change-Id: Icb6566d51503a6004fa3f25c499fc7f941bd7fee Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* | Bluez5 support for QBluetoothDeviceDiscoveryAlex Blasche2014-05-091-1/+17
| | | | | | | | | | | | | | Task-number: QTBUG-32085 Change-Id: I31ae0dc9f0d09f3979797eb95eb87ed7bd181ae3 Reviewed-by: Oleg Shparber <trollixx@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Replace Q_SIGNALS/Q_SLOTS with signals/slots in private headersOleg Shparber2014-04-291-2/+2
| | | | | | | | | | | | | | This patch fixes private headers accordingly to coding guidelines Change-Id: Id428e162207a7ae70ccfbcb172d28cab79739818 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Fix coding style in QBluetoothOleg Shparber2014-04-231-6/+6
|/ | | | | | | | Affected: QBluetooth, QBluetoothAddress, QBluetoothDeviceDiscoveryAgent, QBluetoothDeviceInfo, QBluetoothHostInfo, QBluetoothLocalDevice Change-Id: Ia5af61f87eafecfba56b75fa61b81014cdd38960 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Port QtBluetooth to AndroidAlex Blasche2014-02-131-6/+21
| | | | | | | | | | | | | | | | | | | | | | This is a feature merge to dev targeting Qt 5.3. Known issues: -QTBUG-36754: QBluetoothServer::close() crashes -QTBUG-36763: QBluetothTransferManager port to Android not possible -QTBUG-36764: Improve QBluetoothLocalDevice::connectedDevices() -QTBUG-36810: Remove direct use of Android action strings The above issues and some other minor TODO's will be addressed until final release time. Task-number: QTBUG-33792 [ChangeLog][QtBluetooth][Android] QtBluetooth has been ported to Android. Change-Id: I31ba83e3b7d6aa68e7258b7e43235de7d1a6e68a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Remove QtBluetooth and QtNfc namespace.Alex Blasche2013-09-091-2/+2
| | | | | | | | This is based on namespace discussions on the Qt project dev mailing list. We continue to use the Qt namespace. Change-Id: I6119d06662f7682c11f42d759f3218be1f5a7d6c Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Make Bluetooth adapter choosable for device and service searchNedim Hadzic2013-09-051-2/+4
| | | | | | | | | | | | | | | | | In case there are more Bluetooth adapter, device and service search might give different results. Addition to Change-Id: Ideddb39460985c18547baec986b15e43946c85de - added option for setting the device adapter for service search. QBluetoothLocalDevice was used in both classes (device and service search) for passing an argument for setting adapter. The reason for this to keep the same approach, because in QBluetoothServiceDiscoveryAgent class there is already a constructor with QBluetoothAddress argument. Auto tests and examples updated. Change-Id: Ib5d7ff23e4846d9d42dae68d8d424031748811e5 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Make Bluetooth adapter choosable for device searchNedim Hadzic2013-08-291-1/+4
| | | | | | | | In case there are more Bluetooth adapter, device search might give different results. Change-Id: Ideddb39460985c18547baec986b15e43946c85de Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* QNX: Change name of platform define to QT_QNX_BLUETOOTHFabian Bumberger2013-08-231-3/+3
| | | | | | | To be aligned with the bluez implementation Change-Id: I8d3fbd0c23298f984e2c99cbf4131cf8fc0a0a64 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* QNX: Make the device discovery agent more robustFabian Bumberger2013-08-081-6/+12
| | | | | | | Also fixes the autotests. Change-Id: I71983fa3cc49a88bb7b94544b7f24bebbd3cf86e Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Update Copyright headersAlex Blasche2013-06-251-1/+1
| | | | | | | | | - Update Digia's copyright year - Add copyright to files without it - Convert old BSD to new LGPL license for auto test code Change-Id: I47f5c871c436f9c2731b235026434448719cc671 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Rename NFC and Bluetooth namespace macros.Aaron McCarthy2013-02-141-2/+2
| | | | | | | | Renamed to the namespace macros to follow what syncqt expects. This fixes missing namespace macro warnings printed by syncqt. Change-Id: I7be5a700e8435a559cb4c2e74938851233095887 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>