mbox series

[BlueZ,0/3] Propagate disconnection reason

Message ID 20250519161412.107904-1-frederic.danis@collabora.com
Headers show
Series Propagate disconnection reason | expand

Message

Frédéric Danis May 19, 2025, 4:14 p.m. UTC
Currently a client application is informed of the disconnection by the
update of the Connected property to false.
This sends a Disconnected signal with the disconnection reason before
the property is updated.

This will help client application to know the reason for the
disconnection and to take appropriate action.

bluetoothctl is updated to display the disconnection reason on reception
of the signal.

This can be tested in bluetoothctl by disconnecting a device, which
generates:
[SIGNAL] org.bluez.Device1.Disconnected disconnection-local-host

Frédéric Danis (3):
  src/device: Add Disconnected signal to propagate disconnection reason
  doc/device: Add Disconnected signal
  client: Display disconnection reason

 client/main.c            | 20 ++++++++++++++++++++
 doc/org.bluez.Device.rst | 17 +++++++++++++++++
 src/adapter.c            | 13 ++++++++-----
 src/device.c             | 37 +++++++++++++++++++++++++++++++++++--
 src/device.h             |  3 ++-
 5 files changed, 82 insertions(+), 8 deletions(-)