summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergyservice.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove not needed forward declarationv5.11.0-beta1Alex Blasche2018-02-221-1/+0
| | | | | Change-Id: I73650a766eb667b254f32ddab7bcf26e7c42f847 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Merge all QLEConrollerPrivate::addServiceHelper() implementationAlex Blasche2017-11-031-3/+2
| | | | | Change-Id: Id346f2f98e63c5c7ea9e2cd3fb7e68e4573ac1e5 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Provide UWP specific header for QLEControllerPrivateAlex Blasche2017-11-031-0/+1
| | | | | Change-Id: Ic2ee2a76e2da4c236415f1eb3b98ab642ee3d1fc Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Provide own header for QLEControllerPrivate on AndroidAlex Blasche2017-11-031-0/+1
| | | | | Change-Id: I63d107092e3e404f6b2c38f28d5d9b286711db77 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Provide own header for QLowEnergyControllerPrivate instance on BluezAlex Blasche2017-11-031-0/+1
| | | | | | | | | | | This utilizes the new QLowEnergyController interface and separates the existing Bluez implementation more clearly from other platforms. The existing addServiceHelper() class is moved out into the individual backends to avoid compiling the class into the new dbus backend. Change-Id: I1eea99e493958c61cb1fae830c08a3eb26bda9c3 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Rename various QLEControllerPrivate classesAlex Blasche2017-11-031-2/+2
| | | | | | | | | | | | | | | | | The base class is renamed to QLEControllerPrivate and the existing QLEControllerPrivate becomes QLEControllerPrivateCommon. This is necessary to re-enable Q_DECLARE_PRIVATE. The macro uses by convention the "Private" class prefix which is currently broken because not every implementation uses QLEControllerPrivate as d-pointer type. This also avoids a SC/BC break in qlowenergycontroller.h as the d-pointer remains the same and the functions declared via Q_DECLARE_PRIVATE still return the same type. Change-Id: I84890b06280b2c473a4d370606d3bbc58a258eea Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Replace Q_NULLPTR with nullptrKevin Funk2017-09-291-1/+1
| | | | | Change-Id: Ica194c2568465a94d851ddeaf62ca71b33fe4464 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-211-1/+1
|\ | | | | | | | | | | | | Conflicts: src/bluetooth/qlowenergycontroller.h Change-Id: I15571e47fbf06545d46d1b9a9b2b47bf815ae293
| * Add explicit and make public headers compile with ↵Marc Mutz2016-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -Wzero-as-null-pointer-constant ... or equivalent. QtBase 5.6 headers already compile that way, so let the other modules follow suit. Added explicit where it was missing. This is not a source- incompatible change, because code that breaks by this is a bug. Let's not have this sitting around in an LTS. Task-number: QTBUG-45291 Change-Id: I375361699615d0fc874e0b96a84543e233eff5f0 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | Bluetooth LE: Add support for Signed Write command in the central role.Christian Kandeler2016-02-171-1/+2
| | | | | | | | | | | | Task-number: QTBUG-41175 Change-Id: I62d74236faf9161681306d952e409e23e0cea24d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge remote-tracking branch 'gerrit/dev' into neardAlex Blasche2016-01-261-15/+21
|\ \ | | | | | | | | | Change-Id: If9cf6718cbd619dd7ce38db2da274fe9d0a41fb7
| * | Updated license headersAntti Kokko2016-01-201-15/+21
| |/ | | | | | | | | | | | | | | | | | | 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>
* | Bluetooth LE: Implement GATT server write support.Christian Kandeler2015-12-151-1/+2
| | | | | | | | | | | | | | | | | | | | 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>
* | Bluetooth: Add API to set up GATT services.Christian Kandeler2015-11-201-0/+1
|/ | | | | | | This is the next step in implementing LE peripheral support. Change-Id: I5e8cb186d556e7bfb9ae8a5e60e051ff7398b77d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Add missing metatype registration related functions for Q_ENUMsOliver Wolff2015-07-101-0/+5
| | | | | Change-Id: Iedd83bb8f9d31268fb5a17879feaaf97a82f86cc Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Port from Q_ENUMS to new macro Q_ENUMKonstantin Ritt2015-06-231-3/+4
| | | | | | | | | | | Remove Q_ENUMS in favor of the new Q_ENUM macro which provides registration as meta enum and a debug stream operator. Register some enums via Q_ENUM to improve debug output and types auto-registration. Change-Id: I31c9535a2de7da1783b4ec967612c02a57cb62ff Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Provide missing Q_DECLARE_OPERATORS_FOR_FLAGSKonstantin Ritt2015-05-281-0/+2
| | | | | Change-Id: Ife85fc5a3e01752de07e91ba49216363ca5a5789 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix trailing commas in enumsAlex Blasche2015-04-201-1/+1
| | | | | | | This was caused by the new headersclean enforcing warnings as errors Change-Id: Idd595fc4cf78411a80ff3dbb46477d5130a04c3e Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
* Fix enum value breakAlex Blasche2015-04-151-3/+3
| | | | | | | | | | | | | | | The new values CharacteristicReadError & DescriptorReadError were introduced in Qt 5.5 whereas all other values of the QLEService::ServiceError enum were introduced by Qt 5.4. The new values should not have been put in between the existing enum values as it breaks binary compatibility. Although the QLEService API is tech preview in Qt 5.4, there is no reason to break the compatibility here. In fact this broke the Android implementation as the enum values are hardcoded on the Java side. Change-Id: Ic263550f281e03c90f04ae8ae55d1054c1fd7ea6 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* Add ability to read characteristics and descriptorsAlex Blasche2015-04-101-0/+8
| | | | | | | This patch introduces the new API elements without any implementation. Change-Id: Ia2a4d4c588f2f2f219288967ed9cc69b13b682c6 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.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>
* 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>