[pulseaudio-discuss] [PATCH 3/3] bluetooth: Add pa_bluetooth_transport_unlink

Luiz Augusto von Dentz luiz.dentz at gmail.com
Mon Sep 8 02:14:43 PDT 2014


From: Luiz Augusto von Dentz <luiz.von.dentz at intel.com>

---
 src/modules/bluetooth/bluez5-util.c | 4 ++++
 src/modules/bluetooth/bluez5-util.h | 1 +
 2 files changed, 5 insertions(+)

diff --git a/src/modules/bluetooth/bluez5-util.c b/src/modules/bluetooth/bluez5-util.c
index 3c0d6e1..e14b1fa 100644
--- a/src/modules/bluetooth/bluez5-util.c
+++ b/src/modules/bluetooth/bluez5-util.c
@@ -196,6 +196,10 @@ void pa_bluetooth_transport_put(pa_bluetooth_transport *t) {
     pa_bluetooth_transport_set_state(t, PA_BLUETOOTH_TRANSPORT_STATE_IDLE);
 }
 
+void pa_bluetooth_transport_unlink(pa_bluetooth_transport *t) {
+    pa_bluetooth_transport_set_state(t, PA_BLUETOOTH_TRANSPORT_STATE_DISCONNECTED);
+}
+
 void pa_bluetooth_transport_free(pa_bluetooth_transport *t) {
     pa_assert(t);
 
diff --git a/src/modules/bluetooth/bluez5-util.h b/src/modules/bluetooth/bluez5-util.h
index 5bcab16..d41bf28 100644
--- a/src/modules/bluetooth/bluez5-util.h
+++ b/src/modules/bluetooth/bluez5-util.h
@@ -114,6 +114,7 @@ pa_bluetooth_transport *pa_bluetooth_transport_new(pa_bluetooth_device *d, const
 
 void pa_bluetooth_transport_set_state(pa_bluetooth_transport *t, pa_bluetooth_transport_state_t state);
 void pa_bluetooth_transport_put(pa_bluetooth_transport *t);
+void pa_bluetooth_transport_unlink(pa_bluetooth_transport *t);
 void pa_bluetooth_transport_free(pa_bluetooth_transport *t);
 
 bool pa_bluetooth_device_any_transport_connected(const pa_bluetooth_device *d);
-- 
1.9.3



More information about the pulseaudio-discuss mailing list