summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothservicediscoveryagent.cpp
Commit message (Collapse)AuthorAgeFilesLines
* winrt: Add service discoveryOliver Wolff2017-01-201-0/+2
| | | | | | | | | | | | | | | In Windows 10 SDK versions < 14393 full service discovery is not supported. While GetRfcommServicesWithCacheModeAsync enables us to specify the lookup mode get_RfcommServices only returns cached services. To be able to offer some functionality for older version we use its results but give a warning about the limited abilites of this API in case of full service discovery. Task-number: QTBUG-37779 Change-Id: I21a15f8bb1d058780c8322ece2c3d9a285ecab25 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Merge remote-tracking branch 'gerrit/5.6' into 5.7Alex Blasche2016-06-091-4/+4
|\ | | | | | | Change-Id: Id8dffff9bb75db396aabf6da2a3acb78505a6476
| * QBluetoothServiceDiscoveryAgent: set q_ptr in d_ptr's constructor.Edward Welbourne2016-06-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | The agent class constructors were initializing the q_ptr member of their d_ptr; it is cleaner to pass this down to the d_ptr's constructor and let it do this itself. This also lets Coverity know that initialization actually does happen (CID 22330). In particular, it makes sure we can't leave it uninitialized, if an agent implementation happens to neglect to do so. Change-Id: Ie01046a5a113b5669e8e63c6a22f692cd3943ac0 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-061-1/+6
|\| | | | | | | | | | | | | Conflicts: examples/nfc/corkboard/corkboard.pro Change-Id: I5d1ea0a8e21a1b55dbf744c2f4b469bc51f05c7a
| * Improve QBluetoothServiceDiscoveryAgent::setUuidFilter() docsAlex Blasche2016-04-271-1/+6
| | | | | | | | | | | | | | | | | | | | Better explains that the uuid filter is applied against two service attributes rather than only one. The ServiceId and the ServiceClassIds are used for matching purposes. Change-Id: Ib301e438c27977288c56a2bb9dfe68e2d3f2a10d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | 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>
* Remove QNX/BlackBerry implementation for QtBluetoothAlex Blasche2015-06-171-2/+3
| | | | | | | | | [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>
* 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>
* Fix crashing btchat example when selecting remote devicev5.4.1Alex Blasche2015-01-291-0/+5
| | | | | | | | | | | | | | | | | The example immidiately destroys the QBluetoothServiceDiscoveryAgent when the user selects a remote chat service from the remote selector dialog. This may happen even when the scheduled QtConcurrent call to runSdpScan() was still pending. The subsequent signal callback into the deleted parent caused a crash. Unfortunately QtConcurrent::run() returns a QFuture which does not permit stopping the pending thread execution. Therefore the runSdpScan() had to be rewritten using QProcess to properly destruct pending calls. Change-Id: I1ed5e147feb94a26240901a02d836056eddabbf6 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Add missing InvalidBluetoothAdapterError to QML discovery modelAlex Blasche2014-11-211-1/+2
| | | | | | | | | | | | QBluetoothServiceDiscoveryAgent::InvalidBluetoothAdapter was introduced by Qt 5.3 but never added to the QML BluetoothDiscoveryModel. This patch fixes the problem. This was noticed due to a crash on Android emulator. Change-Id: I652576929659ca370216133154e36158e8425711 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Extend docs on Minimal SDP discoveryAlex Blasche2014-09-301-4/+10
| | | | | | Change-Id: If1add78a34f4d01313e022bd7af1d53ac2abd535 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Add \since to all Qt Bluetooth classes which didn't have the tag yetAlex Blasche2014-09-261-0/+2
| | | | | | Change-Id: I50d818294cb53962bca2b08edbfdc4558890777c Task-number: QTBUG-36775 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Remove QLowEnergyServiceInfoAlex Blasche2014-09-031-9/+18
| | | | | | | | There is no need for this class anymore as QBluetoothServiceInfo covers the same information. Change-Id: I411a8abb68b34a3a4893a67ee9fac096f44bbd62 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-241-18/+10
| | | | | | | | | - 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>
* Fix BTLE related qdoc errorsAlex Blasche2014-06-041-0/+6
| | | | | | Change-Id: Id1a56b0ed050fd9cebee8738351e560b442d748f Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Merge branch 'dev' into btleAlex Blasche2014-05-261-2/+24
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/bluetooth/bluetooth.pro src/bluetooth/bluez/bluez.pri src/bluetooth/doc/src/bluetooth-index.qdoc src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp src/bluetooth/qbluetoothdeviceinfo.cpp src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp src/bluetooth/qbluetoothservicediscoveryagent_p.h src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp Change-Id: I88b22c51a4ee95b067ef8d2b2fddb5cbff4566f8
| * Code cleanup: Avoid repeated service info duplication checkAlex Blasche2014-05-231-0/+15
| | | | | | | | | | Change-Id: I00701e9103a6acfdfc2697949280f8a7de8bcdfe Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
| * Service discovery via Bluez5Alex Blasche2014-05-221-1/+8
| | | | | | | | | | | | | | | | | | At the same time we shift the ServiceClassUUID to service name mapping to QBluetoothUuid. It was used by Android and now Bluez 5 uses it too. Task-number: QTBUG-32085 Change-Id: I9f2d4dc4e2997683485f2ba7aaefb646cb72fb75 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
| * Provide correct code snippet for QBluetoothServiceDiscoveryAgentOleg Shparber2014-04-221-1/+1
| | | | | | | | | | Change-Id: I8b975a2f55833c58479edac5d62809c1e83ea417 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Merge branch 'dev' into btleAlex Blasche2014-02-171-42/+83
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/bluetooth/bluetooth.pro src/bluetooth/doc/src/examples.qdoc src/bluetooth/qbluetoothdevicediscoveryagent_qnx.cpp src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp src/bluetooth/qbluetoothservicediscoveryagent_p.h src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp Change-Id: Ie1577e4b0f469cd5a6b05a61cbe94f180a64448d
| * Port QtBluetooth to AndroidAlex Blasche2014-02-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Merge remote-tracking branch 'gerrit/stable' into devAlex Blasche2014-02-031-15/+38
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/bluetooth/qbluetoothservicediscoveryagent.cpp Change-Id: I52831fc8c69062e90c003836fd9402f19d6a0ba5
| | * Stop SDP search if QML Model is turned offAlex Blasche2014-01-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | So far, we only ever disabled the device search. If a SDP discovery was running and we changed to device discovery the SDP discovery kept running in the background. Change-Id: I5f2cf88ecf7f9b5cfe2608e0ceda366b552982e5 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| | * Do not clear result lists while the SDP search is ongoing.Alex Blasche2014-01-201-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Or bad things will happen... Change-Id: I7df3925ff5d15f3f904f4dd38e24b247ec151fd1 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
| | * Improve QBluetoothServiceDiscoveryAgent documentationAlex Blasche2014-01-201-16/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtBluetooth][QBluetoothServiceDiscoveryAgent] The QBluetoothServiceDiscoveryAgent class documentation has been improved. Change-Id: I5472e9ceda45d9bcf0634b5bf2cecf265986bc10 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
| * | Don't stop Bt discoveries while we have InvalidBluetoothAdapterErrorAlex Blasche2014-01-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change complements 23a3863de809a4051ae6db4942145cb0cb624d6c. The discovery process should not stop when the passed local adapter address is invalid. While the first change ensures that start() cannot be called stop() was still callable. The platform specific implementations potentially set lastError to something else und thus would permit a call to start() later on. This may lead to invalid internal states. Change-Id: Ibfd87374bf712614fad90172894ea2e009ba198a Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-171-16/+5
| |\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I7295292bb7d9b5fc7eba8f099f4592b70de80d11
| | * Cleanup more duplicated code in SDP discovery class.Alex Blasche2014-01-171-16/+5
| | | | | | | | | | | | | | | Change-Id: I4b6be592204cc435bfec508725d64cb8f7529a3b Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| * | Document a somewhat peculiar signal behavior mismatch during Bt discoveryAlex Blasche2014-01-151-3/+7
| | | | | | | | | | | | | | | Change-Id: I8f9ac85e7753a9d6142bbefcd0e4bcda09e0f3d8 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-101-2/+0
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp Change-Id: Ic9e5cb3989426b90f6dad58d53dba366638ff35f
| | * Don't set the internal service discovery state twice to the sameAlex Blasche2014-01-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | The first call is not necessary as nothing has changed in the meantime. Change-Id: I8db51fd725dd210b3d5c7b01d399d24877bf9b2f Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-061-1/+2
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/bluetooth/qbluetoothlocaldevice_qnx.cpp src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp Change-Id: If7dd968047fec5352567e9b67ca5b8e680c7523d
| | * Improve error reporting.Alex Blasche2013-12-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever we emit an error, we should set the human readable error string in the discovery classes. [ChangeLog][QtBluetooth][Documentation] Fix cases where device and service discovery classes emitted an error signal but the human readable error string was not adjusted. Change-Id: I9680853d17d2ee4bc1293826bb7bf56cc999e2ed Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | Improve and fix documentation for the Bluetooth discovery classes.Alex Blasche2013-12-201-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtBluetooth][Documentation] The documentation for the Bluetooth discovery classes has been improved. Change-Id: Id4366b491e8bbda8cf884b9ad3594dd89cc925e8 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | Check the local adapter's BluetoothAdress before doing the discoveryFabian Bumberger2013-12-201-2/+18
| |/ | | | | | | | | | | | | | | Task-number: QTBUG-35571 Change-Id: I8f2eea7a8437787d61a238c760e948f45738618a Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* / Implemented Bluetooth Low Energy gatt service and characteristics discoveryNedim Hadzic2013-11-041-1/+0
|/ | | | | | | | | Bluez v4.x does not have total support for LE devices, a new approach, using gatttool command was implemented. Auto-tests and documentation will be in other commits. Change-Id: Iee711cc111199e15956052eebb7593bd3a5e27c8 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Emit service discovery error during internal device discoveryAlex Blasche2013-09-251-1/+19
| | | | | | | | | This was discovered when starting a service discovery while no Bluetooth device is connected. Change-Id: Ibb970ee6cb95ff50bca635813cce23c4d7f8e3c6 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Fix peer to peer communication using two local adapters.Alex Blasche2013-09-251-1/+5
| | | | | | | | | | | | The code assumed to use the default adapter in a variety of places which caused wrong SDP registrations, device searches and peer names. The btchat examples was extended to cope with two local adapters. If there are more than two local adapters they will be ignored. Change-Id: I27d8bce65d943773e4e6cbd86982446fa79664a4 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Refactor device and service discovery errorsFabian Bumberger2013-09-201-4/+6
| | | | | | | | - Make them more consistent with other Qt modules - Propagate the error during device discovery to the QBluetoothServiceDiscoveryAgent Change-Id: Idcd3e0e6061b85e8b6adad248625740f3b91289a Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* BlackBerry: Add some platform documentationFabian Bumberger2013-09-181-1/+1
| | | | | Change-Id: If2a8d289578f3bc7622cedd9faf35893880a2157 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-8/+34
| | | | | | | | | | | | | | | | | 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>
* 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>
* QNX making the device discovery agent more robustFabian Bumberger2012-11-271-0/+2
| | | | | Change-Id: Ibb7da66092e0edca9ac3d7e801275de5d166d6d8 Reviewed-by: Alex <ablasche@gmail.com>
* Qt Bluetooth: Created \qmlmodule and \module pagesJerome Pasion2012-09-291-3/+2
| | | | | | | | These pages will list the C++ classes and the QML types in Qt Bluetooth. Removed extra groups. Change-Id: I27d7004d804cc0cc29af997f3a11fcc9f9477efb Reviewed-by: Alex <ablasche@gmail.com>
* Qt Bluetooth: Modularized documentationJerome Pasion2012-09-271-1/+1
| | | | | | | | | | -moved documentation to src/bluetooth/doc -added a qdocconf file for Qt Bluetooth -fixed relative paths for snippets -moved examples to examples/bluetooth Change-Id: Id41bac50dca628400568d191f1c3ccfbaac790a1 Reviewed-by: Alex <ablasche@gmail.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I4f07028d0bf0b3ba4c4649897b80687ea5e51abc Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Doc: add landing page for Qt Bluetooth moduleLeena Miettinen2012-08-311-1/+1
| | | | | | | | Move information from other topics to the landing page. Change-Id: I550dd1e4467e0ec8d60218f25d36e3fa12554488 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@nokia.com> Reviewed-by: Alex <ablasche@gmail.com>
* Replaced the deprecated \o qdoc command with \li, and added the missing ↵veshivas2012-04-241-3/+4
| | | | | | | \endlist command. Change-Id: I15aae722ffdeae7da38b421d59a509aa868f69aa Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>