Remove dead code.

This is the default backend and Bluez is not a default backend. Hence
the default backend can never build Bluez specific sections.

Change-Id: I66f4ce9f4b7b4c4d222138ac2e56640d2bc08808
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Fixed QTBUG-40172 Android Bluetooth Socket Connection fails in some cases.

Change-Id: Ibc4c835a9778bfa220ad6553f2c0140a7727d75d
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Move socket workaround into own fctn and fix possible channel mismatch

Previously the remote rfcomm channel was fixed to 1 which may not
always match the correct rfcomm port.

At the end of the day this is still a workaround for failure to connect
when socket creation via UUID fails. We assume that the remote rfcomm
service can be reached via the channel number.

There is the remote chance that we connect to the wrong remote channel
because getServiceChannel() fails and we attempt to connect to the
hardcoded channel 1. However the workaround significantly reduces the
chance of failure as a few devices (especially on the low end margin)
cannot successfully connect via the UUID.

The patch improves code readability and formatting too.

Task-number: QTBUG-40172
Change-Id: Iae90252c877ca13953a81ea1ed83cc2c73abdf2a
Reviewed-by: firatagdas <firatagdas@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Add changelog for QtBluetooth & QtNfc 5.3.2 release.

Change-Id: Id21197134f525d6835664a2b2f27ca48d405406c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Merge remote-tracking branch 'gerrit/btle' into 5.4

Change-Id: I6786b50e3f302c6027255dc2393b3e7923705a1d
Fix compiler warning about unused parameters

Change-Id: I493a7087e29399c1d32116a07e51ce7aa18becc0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Add class documentation for QLowEnergyController

This class is part of the new Bluetooth Low Energy feature in Qt 5.4

Change-Id: Ib1a8000b4ad256400f18e241a296fe1ffa97414a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Add missing private headers warning

Change-Id: I0f079a9b1b45bd2d2e946e06d7688f299a9c3fc3
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Add class documentation for QLowEnergyService

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>
Update QLowEnergyCharacteristic class documentation.

Change-Id: I9f8a2cc1b833e91f05434e68ad3b5b4757eac786
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Update QLowEnergyDescriptor class documentation.

Change-Id: I65d28f43862e95258c3115b79de839b884966119
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Update license headers and add new licenses

- 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>
Provide a documentation overview for Bluetooth LE

Change-Id: I252c085f5b3ea6ccc2820a1f59d9228745ae2900
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
First round of fixes for heartrate example docs

Remove old and obsolte code description. Later this will be readded
based on the Bluetooth-le-overview documentation which describes the
same thing.

Improve screenshot section of the example.

Change-Id: I499809fa0afdb27f09844678a52d0ce5a492b3c0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Update and extend the lowenergyscanner example docs

Change-Id: I0be30191cbceb963c7e1bfd7e55a1f2f38772d5f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Fix Bluez5 FullDiscovery SDP scan

Several bugs prevented QBLuetoothServiceDiscoveryAgent from properly
working on Bluez5

1.) If parseSDPRecord returned an empty QByteArray we continued the
parse loop without further advancing the sdpResult list.

2.) Each sdp result was individually base64 encoded but the library
side decoded the entire list of items in one go. The item separation
gets lost during the transfer. As a result only every second item was
properly decoded. Therefore only every second sdp record was properly
recognized. Now we encode the entire result and transfer it in one go.

3.) Don't separate the xml items based on their size anymore. Although
this is possibly slower it is a lot simpler to understand
and debug. In combination with the above two problems the previous
pointer based logic was leading to crashes too.

4.) QProcess::readAll() seems to loose data when the process
finished and the output was very large. After this patch we start
reading right after the start of the sdpscanner.

Change-Id: I84a0be9d68e86c851945751c576a3ccf755db883
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Make QBluetoothSocket's _q_writeNotify & _q_readNotify private

These two functions are really only needed by Linux style socket code.
There is no need for other platforms to implement them as dummy too.
It simplifies the code somewhat.

Change-Id: I3e0aced8d9f7b590d1c6aaa60f97bd060ee8f4b4
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Merge the ServiceNotValidError and OperationError of QLEService

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>
Remove libgato code from to-be-released code

It continues to live in the development branches

Change-Id: I13f140f78b26e4f1bf23d8e023834038812190c6
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Improve quint128 to QBluetoothUuid conversion performance

The change improves the performance between 8-10%.

Change-Id: I342e669d3f18cd2179b65f1af172db52303ff44c
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>