Add missing \since tags for new API introduced by Qt 5.4.

Change-Id: Ie51d6e549d80baae57864d4e0d43a1c58897f149
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Add change log for Qt 5.4.0 release

Change-Id: I9eca03f01ba01e9952c28c6d4bd14f656aa5d838
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Fix spelling mistake in change logs

Change-Id: Ia82082ce24c98b69697b348dc20164b8ec034a0b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Merge remote-tracking branch 'origin/5.4.0' into 5.4

Change-Id: Ib79fe0b33b405cdf6fee87f97f6ebb86bb79d976
Reset the controller's internal state when disconnecting

This caused problems when disconnecting from the remote device while
an openrequest was pending and if the controller tried to reconnect
immediately afterwards. The pending request queue was blocked forever.

Change-Id: I444d5ac6763b65ec8baf687e0dccec4b28016a6c
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Improve lowenergyscanner status reporting

Change-Id: If6fccce951c2f3c3787cde2fa593e65da26f4370
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
QLowEnergyService - primary/secondary (OS X and iOS)

It looks like isPrimary property is always 'NO' on CBService objects
discovered making this property ... hmm, TOTALLY USELESS?

Change-Id: Ia38323c204e6cf1c3def3bbb3deb08bb8cdf90e4
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
lowenergyscanned - update example (iOS and OS X)

With Core Bluetooth low energy controller must be created using
device info, not address (which is invalid on OS X and iOS).

Change-Id: I30cb3a061e2cd882981d7e65d636c63e57c36f8e
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Merge branch 'neard' into dev

This merges the new Neard backend for QtNfc into Qt 5.5

Change-Id: I67a13add5b3655ba4f2f3a8caa54d6a010093362
QLowEnergyController - service details discovery (OS X and iOS)

Implement details discovery: characteristics, their values (if any),
descriptors. We have to emulate handles (QLowEnergyHandle) - while
Core Bluetooth internally has the notion of handles, it never exposes
them as a public API.

Change-Id: I09158433ce6835dd34fe8ad47d047212dab59e8e
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Document Android's caching of BTLE service data.

It can be confusing. As more platforms are supported, this behavior
needs to be verified too. The Bluez implementation does not exhibit this
cache behavior.

Change-Id: I42dd003f2ac2632c32e48b1b1784e4ca529950f3
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
QLowEnergyService::writeCharacteristic - implementation for OS X and iOS

writeCharacteristic - implemented with Core Bluetooth for OS X and iOS.

Change-Id: Ia228ff451e1e6d7b6fb7de6cad29198aa9257602
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Fix missing update of cached characteristic value

When we receive a characteristic update we have to update the cached
value on the Qt side. This was accidentally missed during an earlier
commit.

Change-Id: I0f84e35ee44e38d1e46b7ddcd4e78b7e216e49d5
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Merge remote-tracking branch 'origin/5.4' into dev

Change-Id: I6c1eabeea1b3397803e285d13cef147220ff5aa4
Bluetooth LE - handles/chars/descriptors/services (OS X and iOS)

In Qt we work with handles (real for Bluez, emulated for Android/iOS/OS X).
Core Bluetooth has its own (quite primitive and inconvenient) data structures
(arrays of objects, containing nested arrays).
To make things not so ugly I'm adding several
maps to be able to find a characteristic/descriptor/service using a
handle from Qt's layer.
Also modify writeCharacteristic to use this new 'addressing scheme'.

Change-Id: Ic822c9aa82a4df1e9c4cf4c673451cac8006b9ba
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Android: Implements QLEService::includedServices() and type()

Unfortunately it is not possible to say whether a service is
primary or secondary on Android. The platform doesn't expose this
information.

Change-Id: I9b0aad191308120d2d1992a5e7736b985a375e30
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Update QLEService::Type() documentation for Android specifics

Android doesn't expose the required API elements to set the
correct service type. Therefore all services are by definition
primary services too.

Change-Id: Ifae4a1baa856382d481ab377b98f05b5b9974a85
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
QLowEnergyController - writeDescriptor (OS X/iOS)

Core Bluetooth - based implementation.

Change-Id: Ie642a13ae9a4d75401dd10648fac6eeee4123a3b
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Android: Add characteristic indication support

At this point in time characteristic indication is very much under-
documented. We have to make some guesses along the way notifications work.

Also, it turns out the code already supported indications but was not
very future proof. If the ClientCharacteristicConfiguration is expanded
by future Bluetooth specifications the notifications could have been
enabled despite the two relevant bits not being set. All that was
required was to write {0xFC FF} and the notifications would have been
enabled. This was due to assumption that only the byte array {0x00 0xFF}
being the disabling data set.

Change-Id: I6c54d557f51977418f91baf658b62e1121785029
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
QLowEnergyController - concurrent characteristic writes

Qt's API assumes that several write operations must be
serialized (this is not guaranteed with Core Bluetooth AFAIK).
I can enqueu only write with response operations, otherwise
I never know when to do the next write.

Change-Id: Iaa83514748358437e2c39335ab142d084ff197e3
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>