Return-Path: From: Antonio Ospite To: linux-bluetooth@vger.kernel.org Cc: Bastien Nocera , linux-input@vger.kernel.org, Jim Paris , Ranulf Doswell , "Pascal A . Brisset" , Marcin Tolysz , Christian Birchinger , Filipe Lopes , Alan Ott , Mikko Virkkila , Antonio Ospite Subject: [PATCH v2 2/3] Re-add manager_get_default_adapter() Date: Fri, 25 Feb 2011 11:04:51 +0100 Message-Id: <1298628292-8842-3-git-send-email-ospite@studenti.unina.it> In-Reply-To: <1298628292-8842-1-git-send-email-ospite@studenti.unina.it> References: <1298628292-8842-1-git-send-email-ospite@studenti.unina.it> Sender: linux-input-owner@vger.kernel.org List-ID: From: Bastien Nocera Signed-off-by: Bastien Nocera Signed-off-by: Antonio Ospite --- 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.4.1