summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergyservice.h
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Convert qRegisterMetaType<T>(const char*) to qRegisterMetaType<T>()Alex Blasche2015-01-281-0/+3
| | | | | | | | | | | | | | | This is much safer and cleaner. [ChangeLog][QtBluetooth][Important Behavior Changes] Q_DECLARE_METATYPE added for QBluetoothServiceDiscoveryAgent::Error, QBluetoothSocket::SocketState, QBluetoothSocket::SocketError and QBluetoothDeviceInfo. This breaks source compatibility if application code has defined the above metatypes already. The applications Q_DECLARE_METATYPE must be removed to fix the compile error. Change-Id: I1c7cb1ee25832b7e5337c9aca6f36b21e8caf22e Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Majority of service detail discovery code on AndroidAlex Blasche2014-11-101-1/+2
| | | | | | | | | | Primarily the change adds the required data structures and interfaces on the Java side. What is missing is the reporting of the discovery details back to Qt. Change-Id: I37f2e17bb0f87b4c526f1b43a933b9b09b22be72 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Add QLES::characteristicWritten() signalAlex Blasche2014-09-021-0/+2
| | | | | | | | | | | | The previous characteristicChanged() signal was emitted when the characteristic was updated due to a notification and when the value was changed using writeCharacteristic(). This meant that it was not possible to distinguish the two use cases. The new signal is only emitted in response to writeCharacteristic() whereas the old signal is only emitted when the peripheral indicates a change. Change-Id: Ie8797090f9463ae0e7fb053a42a79afa6829ca75 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Rename descriptorChanged() to descriptorWritten()Alex Blasche2014-09-021-1/+1
| | | | | | | | | | | | | | | | | This is the part of a change to be able to distinguish characteristic write confirmations from characteristic change notifications. Since descriptors cannot receive notifications they won't have a changed() signal and all existing descriptorChanged() signals become descriptorWritten() signals. The changed() signal is emitted when a value notification is received from the device. The written() signal is emitted when a write request from the API user was successful. Change-Id: Ief2491ead4723eaa1bca65a09a09c34458f33630 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add support for BTLE write command (BlueZ/Linux)Alex Blasche2014-09-021-1/+8
| | | | | | | | So far, we only supported write requests which reply with write responses. Change-Id: Ibdad36dcf18dec23260f003911b9361cc4ab1e3d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge the ServiceNotValidError and OperationError of QLEServiceAlex Blasche2014-08-251-2/+1
| | | | | | | | | | | | The invalid service error is essentially the same as the operation error. The OperationError remains and the ServiceNotValidError is removed. Remove an unrelated but obsolete TODO from the source code. We can read larger than MTU values already. That's what the Blob requests are for. Change-Id: I3ed496194d55cd05f8e9e09680e962a2b7638702 Reviewed-by: Fabian Bumberger <fbumberger@rim.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>
* Add class documentation for QLowEnergyServiceAlex Blasche2014-08-181-5/+6
| | | | | | | This class is part of the new Bluetooth Low Energy feature in Qt 5.4 Change-Id: If10cac1ac1312cb63137c854a4456bf2d646f630 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Implement support for QLowEnergyService include hierarchies.Alex Blasche2014-08-131-1/+2
| | | | | Change-Id: Id11d2dcb06bd04bc1d911d746002fbbc53326ffa Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Detect secondary services and display service type in lowenergyscannerAlex Blasche2014-07-231-3/+4
| | | | | | | | QLowEnergyService::ServiceState was converted to a flag because a primary and secondary service can be included by other services. Change-Id: I425ce8e3f39ee07cccee2763b57a049a624f6178 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Rename QLowEnergyControllerNew -> QLowEnergyControllerAlex Blasche2014-07-231-3/+3
| | | | | | | | Moves the new API into its place and completes the removal of the old API. Change-Id: I10a285e24e288aeb747cb1606574e27a4bf57308 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Add simpler API to retrieve descriptor/characteristic for certain uuidAlex Blasche2014-07-161-1/+1
| | | | | | | | This new API is mostly syntactic sugar and reduces the amount of code to be written by API users. Change-Id: I51ff1ea706ac97199646d211e39e79c8140ee74b Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Port HeartRateListener Example to new API.Alex Blasche2014-07-161-1/+1
| | | | | Change-Id: If3af869a8e5d380592d24b7482ff8eb34a11e6a0 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Support writing of descriptorsAlex Blasche2014-07-151-1/+4
| | | | | Change-Id: I6c93ed820d8532f5540f23faefc7d82a2798667c Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Add QLowEnergyService::contains(QLowEnergyDescriptor)Alex Blasche2014-07-151-1/+3
| | | | | | | | The patch adds extensive test code for the two contains() functions in QLowEnergyService. Change-Id: I640767b55ccad63e390478ccf14f2b47eb24de7f Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Support writing of characteristicAlex Blasche2014-07-021-1/+6
| | | | | | | | Right now we assume that the target characteristic is writable with confirmation response. WriteNoResponse support is still missing. Change-Id: Ie584db43f80a0bf90ec67499772488f509fc3d29 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Introduce QLowEnergyDescriptorAlex Blasche2014-06-261-1/+1
| | | | | | | | | | | | | The class is based in QLowEnergyDescriptorInfo and exposes the found descriptor information. The only missing piece of information is the descriptor value. Extends the QLowEnergyController unit test in such a way that descriptor information is tested too (except for values). Change-Id: I6ba6a862fff48fbdd27cd8219d2eb8f6d0058aea Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Read characteristic values on BluezAlex Blasche2014-06-261-3/+4
| | | | | Change-Id: I6427c6dad133ca11852f5295cf37720addec7644 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* QLECharacteristic::handle() returns the value handle and not char handleAlex Blasche2014-06-251-2/+1
| | | | | Change-Id: Ib9a8c0ebe50d783fb0fe26ae2e1ceed0c47d5027 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Send and process ReadByType request/responsesAlex Blasche2014-06-201-1/+1
| | | | | | | | | | | | The characteristic information is not yet incorporated into the internal QLEService data strcutures. This change introduces the concept of a pending request queue to be able to refer to the request's context information when processing the response. Change-Id: Id699856543b0fd3a8471721b48679f917096a99b Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Unify the shared data types between controller and service classAlex Blasche2014-06-191-9/+5
| | | | | | | This reduces the overhead and simplifies the data structures Change-Id: Iddf184a6d3de5ac253c889f2223a09f2fe08ce15 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Connect QLowEnergyService and QLowEnergyControllerNew classesAlex Blasche2014-06-191-3/+17
| | | | | | | | | | | Ensures that the two classes have sufficient references to each other. When the controller disconnects the related QLES classes should become invalid. Introduces an error flag for QLowEnergyService. Change-Id: I28aee49e45f93c68c4ac69a5e489c0a3cc33dbf5 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Push improved API.Alex Blasche2014-06-171-0/+99
QLowEnergyService represents each single service on the remote BTLE device. QLowEnergyControllerNew acts as factory for QLowEnergyService instances. Change-Id: I07c6bfae6d14b73a80e8314f6e8471285fccf069 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>