diff mbox series

[BlueZ,v2,2/3] doc/device: Add Disconnected signal

Message ID 20250520162621.190769-3-frederic.danis@collabora.com
State New
Headers show
Series Propagate disconnection reason | expand

Commit Message

Frédéric Danis May 20, 2025, 4:26 p.m. UTC
---
v1->v2: Replace text reason by numerical reason
	Improve documentation

 doc/org.bluez.Device.rst | 47 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
diff mbox series

Patch

diff --git a/doc/org.bluez.Device.rst b/doc/org.bluez.Device.rst
index 80501eddd..771b7613f 100644
--- a/doc/org.bluez.Device.rst
+++ b/doc/org.bluez.Device.rst
@@ -155,6 +155,53 @@  array{array{byte}} GetServiceRecords() [experimental]
 	:org.bluez.Error.NotConnected:
 	:org.bluez.Error.DoesNotExist:
 
+Signals
+-------
+
+void Disconnected(byte reason)
+````````````````````````````````
+
+	This signal is launched when a device is disconnected, with the reason of
+	the disconnection.
+
+	This could be used by client application, depending on internal policy, to
+	try to reconnect to the device in case of timeout or unknown disconnection,
+	or to try to connect to another device.
+
+	Possible reasons:
+
+	:0:
+		Unknown.
+
+	:1:
+		Timeout.
+
+		The link supervision timeout has expired for a connection or the
+		synchronization timeout has expired for a broadcast.
+
+	:2:
+		Disconnected from local host.
+
+		The local device terminated the connection, terminated synchronization
+		with a broadcaster, or terminated broadcasting packets.
+
+	:3:
+		Disconnected from remote.
+
+		This disconnection can be due to:
+			- the user on the remote device either terminated the connection
+			  or stopped broadcasting packets,
+			- the remote device terminated the connection because of low
+			  resources,
+			- the remote device terminated the connection because the device
+			  is about to power off.
+
+	:4:
+		Authentication failure.
+
+	:5:
+		Local host suspend.
+
 Properties
 ----------