summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update to new Qt license headersneardAlex Blasche2016-01-2616-244/+318
| | | | | Change-Id: I2c799dbac99c66d5e87fd92efc215e121064cfde Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Merge remote-tracking branch 'gerrit/dev' into neardAlex Blasche2016-01-26289-4082/+7369
|\ | | | | | | Change-Id: If9cf6718cbd619dd7ce38db2da274fe9d0a41fb7
| * Updated license headersAntti Kokko2016-01-20257-3587/+6289
| | | | | | | | | | | | | | | | | | | | 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>
| * Updated license headersAntti Kokko2016-01-2030-495/+1054
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I37338c968d8cb5a056cd42e1130cfa077b12d164 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Enable using the module in a statically built applicationAndy Shaw2016-01-114-0/+26
| | | | | | | | | | | | Change-Id: Ib3e11b80d0287bb0421d399d01b92c6367b52a1e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Add example for Bluetooth Peripheral functionality.Christian Kandeler2016-01-266-2/+254
| | | | | | | | | | Change-Id: I1b48bc0be6265fb033fa2c14c2b7a182966fe2a2 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Bluetooth: Print warning to indicate that signed write is unimplemented.Christian Kandeler2016-01-261-0/+1
| | | | | | | | | | Change-Id: I93e9bd7fb3cf7d683907cd4ad6bc5f4781af91ae Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Bluetooth: Add more thorough checks for the Signed Write Command.Christian Kandeler2016-01-251-13/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | We now take the following rules from the specification into account: - Signed writes are only possible if the two devices are bonded. - Signed writes are not allowed if the link is encrypted. - If the link is encrypted, a normal (unsigned) write command can be used to write an attribute even if it is specified that a signed write is required. That is because the encryption provides the same level of trust as the signature. Change-Id: I15d6db10f9b039aeda026e57b0378aef2b88e73a Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Bluetooth: Fix typo in command value.Christian Kandeler2016-01-221-2/+2
| | | | | | | | | | Change-Id: Ieb903989c5ef5de924c9c4a0d31c4ef9a74e2c40 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Bluetooth LE: Fix check for space left in advertising data.Christian Kandeler2016-01-221-1/+1
| | | | | | | | | | | | | | The value we compare against can be smaller than zero. Change-Id: Iea67ea3439d966ff24f93e63870a3b487f4c4644 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Bluetooth LE Advertiser: Add missing endianness conversion.Christian Kandeler2016-01-181-2/+2
| | | | | | | | | | Change-Id: Ie10a247eddf298cb09edc53c75d414d3b0891a96 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Bluetooth LE: Add connection update functionality.Christian Kandeler2016-01-1815-0/+555
| | | | | | | | | | | | | | Implemented for BlueZ only. Change-Id: I358a98bbc7499d5ce5437fb0d4672fde46c3b831 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Add the "We mean it" statement to private headerAlex Blasche2016-01-051-0/+11
| | | | | | | | | | | | | | | | There are more private headers with the statement but they are auto generated using qdbusxml2cpp and should match whatever was generated. Change-Id: I863f3703fc01fdd827dd9ccc480179880ae0d193 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | Merge remote-tracking branch 'gerrit/dev' into neardAlex Blasche2016-01-0514-34/+52
|\| | | | | | | | | | | | | Conflicts: src/bluetooth/qlowenergycontroller.cpp Change-Id: I28b116deb3fa87169432eb2d94b70894359a9057
| * Merge remote-tracking branch 'gerrit/5.6' into devAlex Blasche2016-01-0512-25/+44
| |\ | | | | | | | | | Change-Id: I97b51eb3fe2040711c00da67bbb1954fc2e65c1f
| | * Remove yet another implementation of AutoreleasePool's RAIITimur Pocheptsov2016-01-051-2/+1
| | | | | | | | | | | | | | | | | | | | | Now we have this class in QtCore, no need in my "home-made" version anymore. Change-Id: Id26944dd6970cc2a8ac9d02675f8af9adecc3d44 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| | * Bluez5: Sanitize app name to be valid DBus object path nameAlex Blasche2015-12-234-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | This may happen when the app name contains for example a dash ('-'). Task-number: QTBUG-49402 Change-Id: I04b289b0723e2979a67c93e335205556bf1eb30e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| | * Handle undefined QLowEnergyController error cases as Unknown errorAlex Blasche2015-12-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is important on Android as not all error conditions are exposed via QLowEnergyController::Error enum. Change-Id: I442ecffcadc01e1a2b60ae17dc6e63e08e5f4149 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| | * Fix inconsistent use of 'override'.Erik Verbruggen2015-12-231-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I3addd4258e3bbb5aaa6eca21af338aab57b9cf33 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| | * Remove deprecated 'register' storage class specifier.Erik Verbruggen2015-12-231-1/+1
| | | | | | | | | | | | | | | Change-Id: Iec9163b25f961a5f7371150aba17a892e5fac305 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| | * Android: Invalidate services after a disconnect from the peripheral sideAlex Blasche2015-12-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far, invalidation only took place when the local/central side disconnected the connection. Task-number: QTBUG-50125 Change-Id: Ic01725d1b83e49ad7df6971d980b480f839d550b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| | * Remove unused isConnecting member variable in QLECPrivateOSXAlex Blasche2015-12-232-19/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Most likely it was used before some changes rendered it unused. At this point the variable was initialized to false and never ever set to true. Change-Id: I5b60cf83bc362ff53f8ce276c16392aada9efc69 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| | * OSX/iOS: Invalide QTLE services when remote device disconnectsAlex Blasche2015-12-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | So far, only a local disconnect triggered the invalidation process. Task-number: QTBUG-50125 Change-Id: I324e01c86eb0c7cc820e91a6f6d6d01fb23170ab Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| | * Fix namespaced build on OSX.Erik Verbruggen2015-12-231-2/+2
| | | | | | | | | | | | | | | Change-Id: I0baa4bbbc5d398f388a1e0aff9ba88f82a23c1cc Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * | tvOS supportMike Krus2016-01-053-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Builds but not tested Moved Q_DECLARE_METATYPE outside of namespace to fix namespaced builds Change-Id: I19c1dba904da8fad155f0f612b863e8f5e0c422e Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | Merge remote-tracking branch 'gerrit/dev' into neardAlex Blasche2015-12-2220-396/+656
|\| | | | | | | | | | | Change-Id: I48826b6a83d8876b97095387cd329165a534eec2
| * | Merge "Merge remote-tracking branch 'gerrit/5.6' into dev" into refs/staging/devAlex Blasche2015-12-2118-392/+652
| |\ \
| | * | Merge remote-tracking branch 'gerrit/5.6' into devAlex Blasche2015-12-2118-392/+652
| | |\| | | | | | | | | | | | | Change-Id: I7adae8e8a556145093e76126499e976820fcd9b2
| | | * disable build on android if androidextras is absentOswald Buddenhagen2015-12-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iefea81376d0486aead874dad985e55f0b0af5d27 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| | | * Properly initialize the m_manager pointer.Frank Meerkoetter2015-12-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes coverity CID22012. Change-Id: Ifdadf0330c277aeea6f87bacd986ec15d5a0c144 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| | | * Fix missing breakFrank Meerkoetter2015-12-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes coverity CID21692. Change-Id: I6c4d464c54caae826cef1af25334a03037971ef8 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| | | * Fix resource leak.Frank Meerkoetter2015-12-182-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not leak the private object. Fixes coverity CID21656. Change-Id: I19873364afeb4f8244c2f436129ad82d83491a2a Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| | | * Add "we mean it header statement" to osx private headerAlex Blasche2015-12-151-0/+11
| | | | | | | | | | | | | | | | | | | | Change-Id: I4005833edebd10b778ac06ded49a88e633e5f435 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| | | * Bluetooth: Fix undefined behavior in example.Christian Kandeler2015-12-151-7/+9
| | | | | | | | | | | | | | | | | | | | Change-Id: I85312373f8feca9f117faf8c4b0f0f517c33e9f3 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| | | * Bluetooth: Documentation fix.v5.6.0-beta1Christian Kandeler2015-12-141-4/+4
| | | | | | | | | | | | | | | | | | | | Change-Id: I095fbdfff6ba753c5c9bfbf204b3ac70d8108376 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| | | * qlowenergycontroller_osx - move delegate to the qt_LE_queueTimur Pocheptsov2015-12-107-376/+613
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ATM CBCentralManager's delegate does its work on the main queue. With CoreFoundation event dispatcher it's now possible to use QtBluetooth from non-gui thread (more generally - from a thread other than main). This makes main queue useless - and we have to move to a dedicated dispatch queue. Also, we have to make sure we do not have race conditioins/dead-locks. This patch: 1. decouples OSXBTLECentralManager and QLowEnergyController so that these two objects working (potentially) on different threads do not share any data and do not have to use locks, removes the explicit 'delegate' interface/inheritance and replaces them with LECentralNotifier class - to be able to use Qt's signal/slot mechanics for inter-thread communication. 2. all OSXBTLECentralManager's are now executed on qt_LE_queue queue to avoid any race-conditions (since they potentially update manager's internal state). 3. Results/errors are now reported using LECentralNotifier's object (QLowEnergyController has corresponding slots connected to the notifier) Task-number: QTBUG-49476 Change-Id: Ie07cdc13ad559c96a7d2ff010843fb7bcce07c99 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| | | * Fix assignment of wrong errors values in read operationsDenis Shienkov2015-12-081-2/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: I48acb0f4bcac1cc98d74b2793151e62f2051d7c9 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| | | * Fix trivial typosKonstantin Ritt2015-12-042-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Braodcast -> Broadcast subsequemtly -> subsequently discovred -> discovered Change-Id: I1e9d83bb0b33ad15da1f05d8a7cdd8ba82232f42 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * | | QBluetoothServiceDiscoveryAgentPrivate: use const reference forAnton Kudryavtsev2015-12-072-4/+4
| |/ / | | | | | | | | | | | | | | | | | | parameters to avoid unnecessary data copying. Change-Id: Iaca94a2af27d5d756deb9751c6bc9630f5fbc8bf Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | Make more use of Qt's functions for handling endianness and alignment.Christian Kandeler2015-12-212-47/+23
| | | | | | | | | | | | | | | Change-Id: Iea44e99e8c7b38e3bdece4de989770831d40ff83 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | Bluetooth: Fix endianness issues in GATT server autotest.Christian Kandeler2015-12-162-10/+12
| | | | | | | | | | | | | | | Change-Id: Ifac43c3799f87de7ed0ea981ed7e229714f51584 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | Bluetooth LE: Implement GATT server write support.Christian Kandeler2015-12-1511-125/+763
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Write Request, Write Command and Execute Write Request are fully implemented now. Signed Write support is still missing. Notifications and Indications are sent. The server side gets informed via the respective signals when a client writes a characteristic or descriptor. Change-Id: Icba6a0270f6e1c4c3ed2ba61b55c1a5fbb69752b Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | Add operator!= for QBluetoothUuid.Christian Kandeler2015-12-112-1/+8
| | | | | | | | | | | | | | | Change-Id: I37942b9123116693c5b4cf6dd9d0747b7cfb2d06 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | Bluetooth LE: Implement ATT access permissions.Christian Kandeler2015-12-0410-29/+243
| | | | | | | | | | | | | | | Change-Id: I456d083d45569ea8d61f0a659f72646d653143d1 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | Merge remote-tracking branch 'gerrit/dev' into neardAlex Blasche2015-12-0327-442/+533
|\| | | | | | | | | | | Change-Id: I1fc766d26aadb7cc01d33c4c8a2260411d7bb138
| * | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-0127-442/+533
| |\| | | | | | | | | | Change-Id: Id2cf334af75d6a0804da7e0125ff7552c49f9ac4
| | * Merge remote-tracking branch 'gerrit/5.5' into 5.6Alex Blasche2015-12-0114-37/+64
| | |\ | | | | | | | | | | | | Change-Id: I4404df69bfdac335e9c1eb63e4ada3ba89b48b6c
| | | * Don't register meta types during static init time5.5Alex Blasche2015-11-3015-36/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QMetaType register my not be up and running by the time we attempt these meta type registration. Change-Id: I1a857a936a24b4b00a49574fac311c08c09b3d5a Task-number: QTBUG-49455 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| | | * Enforce unbuffered L2CAP socket for GATTAlex Blasche2015-11-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GATT protocol does not enforce a length indicator on each GATT command. Usually this is not a problem because each request is followed by a response and therefore we can assume the entire packet content is a single response/request. However the GATT WRITE_COMMAND does not have a response. Multiple requests can be sent in quick follow-up. If buffering is utilized the consecutive commands may be merged and received as single data blob on the remote device. Since Write commands don't have a length indicator they cannot be distinguished and ultimately the write command will set the wrong value. Change-Id: I02f3cd3cfaedfeae6a40272f5d22d3d88c39aa55 Task-number: QTBUG-49650 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
| | * | BT/BlueZ: Do not react to "Insufficient Authorization" error.Christian Kandeler2015-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Authorization in the context of ATT is purely a server-side feature that the client cannot influence, so increasing the security level will not help. The "Insufficient key size" error, however, should be handled. Change-Id: I14b24700f3ebc365215eefb78b0aa8487fcbfd4d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>