Commit Graph

16 Commits

Author SHA1 Message Date
Andreas Buhr adbffb2cd1 Beautify btchat example: Print name of leaving clients
Btchat code tried to print the name of leaving clients, but
socket->peerName(), which was called, does not work any more when
then disconnected signal is triggered. This patch adds a map
storing the names of the clients. Thus we can print who left the chat.

Change-Id: I11aa998fc5da358db2c74508be6618150c94ea08
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2021-02-15 13:06:59 +01:00
Alex Blasche dfee9aa22f Fix the BluetoothProfileDescriptorStructure
As per spec this is meant to be a list/sequence within a sequence and
the version was missing too. For simplicity version 1.0 is used.

Fixes: QTBUG-58529
Change-Id: I57090148aadf60ea1fbbb207ff0a4ae61e06caf2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-10-15 12:48:51 +00:00
Alex Blasche b09f5e493d Remove unused snippet section markers
This section is not used by any part of the documentation.

Change-Id: I3cfc5ff187bfe43bbd75302b45b7dcc6eddb113c
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-10-15 12:48:47 +00:00
Oliver Wolff f1aea39b23 Clean up btchat example
- Replace old connect syntax
- Clean up includes
- Replace 0 with nullptr
- Add socket error handling

Change-Id: Id4c7634db29a23184d3ce2d92ffa39c71505de12
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2018-08-16 09:21:25 +00:00
Oliver Wolff a0ade06800 Replace foreach with for loop and set QT_NO_FOREACH
To avoid unnecessary copies, const is used wherever possible.

Change-Id: Ic743716512751cfd24fad5bd37c244b115dd26fe
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2018-08-15 07:56:46 +00:00
Kai Koehne b171cddac0 Fix outdated BSD license header
Change-Id: I28f5936913a6127806325df34af4bf71a142e72e
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2017-10-17 11:17:54 +00:00
Oliver Wolff 97977bc5f2 Remove wrong attribute assignment from btchat example
Change-Id: If6695194644fa0eceec80808115fd09af895a220
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2017-01-30 13:06:42 +00:00
Jani Heikkinen 7354c6d393 Update copyright headers
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>
2015-02-16 11:48:42 +00:00
Alex Blasche 746f45b946 Register PublicBrowseGroup as sequence
Based on Bluetooth spec Vol3 PartB 5.1.7 the BrowseGroupList consists
of a data element sequence. The current approach was not correct.

This was discovered because Bluez5 doesn't add a custom service to the
Extended Inquiry Response (EIR) unless it is in a sequence. If the
service is not part of the EIR other platforms such as Windows report
an error or won't simply see the service.

This was not a problem when using Bluez4 because it was more
tolerant towards such mistakes and added the custom service to the EIR
anyway.

Task-number: QTBUG-43806
Change-Id: Ib0ca59005c940249fb6aefd8ecafe5b2ceff3878
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
2015-01-21 08:27:02 +01:00
Nedim Hadzic ec61d7b9e8 Implemented Bluetooth Low Energy gatt service and characteristics discovery
Bluez v4.x does not have total support for LE devices, a new approach, using gatttool command was implemented.

Auto-tests and documentation will be in other commits.

Change-Id: Iee711cc111199e15956052eebb7593bd3a5e27c8
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-11-04 09:35:01 +01:00
Fabian Bumberger eefe516bd0 Change the service properties in btchat example
And adding some links to the documentation.

Change-Id: I7f9baf6a648547ef028f9521b0d88b88267fa301
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-10-01 15:53:59 +02:00
Alex Blasche 85de7d64e8 Fix peer to peer communication using two local adapters.
The code assumed to use the default adapter in a variety of places
which caused wrong SDP registrations, device searches and peer names.

The btchat examples was extended to cope with two local adapters. If there are
more than two local adapters they will be ignored.

Change-Id: I27d8bce65d943773e4e6cbd86982446fa79664a4
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-09-25 10:37:27 +02:00
Fabian Bumberger ec83763323 Unify QBluetoothSoket, QBluetoothServer and QBluetoothServiceInfo protocol enum
Change-Id: I6e66196a599e2cceabc7d93d728ba97361d8999f
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-09-20 10:09:12 +02:00
Fabian Bumberger d8d903826d Merge QRfcommServer and QL2capServer to QBluetoothServer
Task-number: QTBUG-32722

Change-Id: Ia75ad5af2f81b737a8cca09dba919a7dc0fa0f8a
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-08-29 14:06:54 +02:00
Alex Blasche 8dad4698d9 Update Copyright headers
- Update Digia's copyright year
- Add copyright to files without it
- Convert old BSD to new LGPL license for auto test code

Change-Id: I47f5c871c436f9c2731b235026434448719cc671
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-06-25 10:08:54 +02:00
Jerome Pasion d8a179128c Qt Bluetooth: Modularized documentation
-moved documentation to src/bluetooth/doc
-added a qdocconf file for Qt Bluetooth
-fixed relative paths for snippets
-moved examples to examples/bluetooth

Change-Id: Id41bac50dca628400568d191f1c3ccfbaac790a1
Reviewed-by: Alex <ablasche@gmail.com>
2012-09-27 14:43:52 +02:00