From 80dd7c1070853cfcdb0ee1b137fd4cca4746c7ae Mon Sep 17 00:00:00 2001 From: Mikel Astiz Date: Wed, 5 Dec 2012 17:23:14 +0100 Subject: [PATCH] bluetooth: Remove unused pa_bluetooth_discovery_get_transport() The function is not used and it also exposes D-Bus-related information in the internal API, which is in general undesired. --- src/modules/bluetooth/bluetooth-util.c | 16 ---------------- src/modules/bluetooth/bluetooth-util.h | 1 - 2 files changed, 17 deletions(-) diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c index 00963fae7..e2d2e62ea 100644 --- a/src/modules/bluetooth/bluetooth-util.c +++ b/src/modules/bluetooth/bluetooth-util.c @@ -977,22 +977,6 @@ pa_bluetooth_device* pa_bluetooth_discovery_get_by_path(pa_bluetooth_discovery * return NULL; } -pa_bluetooth_transport* pa_bluetooth_discovery_get_transport(pa_bluetooth_discovery *y, const char *path) { - pa_bluetooth_device *d; - pa_bluetooth_transport *t; - void *state = NULL; - - pa_assert(y); - pa_assert(PA_REFCNT_VALUE(y) > 0); - pa_assert(path); - - while ((d = pa_hashmap_iterate(y->devices, &state, NULL))) - if ((t = pa_hashmap_get(d->transports, path))) - return t; - - return NULL; -} - pa_bluetooth_transport* pa_bluetooth_device_get_transport(pa_bluetooth_device *d, enum profile profile) { pa_bluetooth_transport *t; void *state = NULL; diff --git a/src/modules/bluetooth/bluetooth-util.h b/src/modules/bluetooth/bluetooth-util.h index e5fe11933..33ef4cf9f 100644 --- a/src/modules/bluetooth/bluetooth-util.h +++ b/src/modules/bluetooth/bluetooth-util.h @@ -143,7 +143,6 @@ void pa_bluetooth_discovery_sync(pa_bluetooth_discovery *d); pa_bluetooth_device* pa_bluetooth_discovery_get_by_path(pa_bluetooth_discovery *d, const char* path); pa_bluetooth_device* pa_bluetooth_discovery_get_by_address(pa_bluetooth_discovery *d, const char* address); -pa_bluetooth_transport* pa_bluetooth_discovery_get_transport(pa_bluetooth_discovery *y, const char *path); pa_bluetooth_transport* pa_bluetooth_device_get_transport(pa_bluetooth_device *d, enum profile profile); bool pa_bluetooth_device_any_audio_connected(const pa_bluetooth_device *d);