From: Bastien Nocera <hadess@xxxxxxxxxx> Signed-off-by: Bastien Nocera <hadess@xxxxxxxxxx> Signed-off-by: Antonio Ospite <ospite@xxxxxxxxxxxxxxxxx> --- src/manager.c | 5 +++++ src/manager.h | 1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/manager.c b/src/manager.c index e805e0c..254ace4 100644 --- a/src/manager.c +++ b/src/manager.c @@ -262,6 +262,11 @@ static void manager_set_default_adapter(int id) DBUS_TYPE_INVALID); } +struct btd_adapter *manager_get_default_adapter(void) +{ + return manager_find_adapter_by_id(default_adapter_id); +} + static void manager_remove_adapter(struct btd_adapter *adapter) { uint16_t dev_id = adapter_get_dev_id(adapter); diff --git a/src/manager.h b/src/manager.h index 05c38b3..4f92d2f 100644 --- a/src/manager.h +++ b/src/manager.h @@ -35,6 +35,7 @@ void manager_cleanup(DBusConnection *conn, const char *path); const char *manager_get_base_path(void); struct btd_adapter *manager_find_adapter(const bdaddr_t *sba); struct btd_adapter *manager_find_adapter_by_id(int id); +struct btd_adapter *manager_get_default_adapter(void); void manager_foreach_adapter(adapter_cb func, gpointer user_data); GSList *manager_get_adapters(void); struct btd_adapter *btd_manager_register_adapter(int id); -- 1.7.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html