Service discovery via Bluez5

At the same time we shift the ServiceClassUUID to service name mapping
to QBluetoothUuid. It was used by Android and now Bluez 5 uses it too.

Task-number: QTBUG-32085
Change-Id: I9f2d4dc4e2997683485f2ba7aaefb646cb72fb75
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Bluez5: Ensure device discovery returns meaningfull RSSI data

If the discovery process was started by QBluetoothDeviceDiscoveryAgent
and Bluez wasn't already in discovery mode then the RSSI values
are 0. The retrieval of RSSI data takes a bit more time.

To find a compromise between speedy return of device scan information
and the delayed RSSI information we continue to monitor the device scan
and update RSSI information as the values are propagated by Bluez.
However the deviceDiscovered() signal is not emitted again  after an
update. Only re-calling discoveredDevices() will return the most
up-to-date RSSI values.

Task-number: QTBUG-32085
Change-Id: Icb6566d51503a6004fa3f25c499fc7f941bd7fee
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Simplify detection of Bluetooth Base UUID derived uuids

This avoids unnecessary code duplication.

Change-Id: I9e49cf3c5e524cf7b3ef811b4640d5248c2ba1b0
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Utilize Qt global discovery mode session in QBluetootLocalDevice.

QtBluezDiscoveryManager manges the global discovery session for all Qt
classes. This was introduced when implementing the device discovery.
QBluetoothLocalDevice was not using this mechanism yet which could lead
to discovery sessions being killed while still required.

Change-Id: I4229cb2aa34df35cf4d0650c828c8cfa11040d4a
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Code cleanup: Avoid repeated service info duplication check

Change-Id: I00701e9103a6acfdfc2697949280f8a7de8bcdfe
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Fix crash during call to QBluetoothServiceDiscoveryAgent::stop()

This was triggered when the stop() call was made while the SDP thread
was talking to the SDP server.

Change-Id: If6624dce21ca4a099d5beae064685b6b3a907989
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Use proper include syntax for system headers

They can be found in /usr/include

Change-Id: I734fd72c52d2b78aca6388d79e59c973e8d99a73
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Use Alias as Device/Adapter name on Bluez 5

Bluez5 docs recommend to use the Alias rather than the Name property.
This ensures that a potentially user chosen device name is used rather
than the actual device name. If no Alias is set the property
automatically reverts back to the Name value.

Change-Id: If2b397cf49df6dc78bb205c1136b8d1dd5e7c02f
Reviewed-by: Bea Lam <bea.lam@jollamobile.com>
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Add QBluetoothUuid::protocolToString()

[ChangeLog][QtBluetooth][General] Added
QBluetoothUuid::protocolToString(QBluetoothUuid::ProtocolUuid) which
returns a human-readable string for the given protocol uuid.

Change-Id: I26b9a1b47b1254ac8a49091c2854d1cfab0c66d6
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Bluez5: Fix unit test for QBluetoothServiceDiscoveryAgent

Change-Id: Ic26edc97ee685e847cf545b3eef5611cf69546dc
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Port QBluetoothSocket/QBluetoothServer to Bluez 5

Task-number: QTBUG-32085
Change-Id: I9fe63f3291a10a195d460720cd1821913a63b25b
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>