From: Antonio Ospite <ospite@studenti.unina.it>
To: linux-bluetooth@vger.kernel.org
Cc: Bastien Nocera <hadess@hadess.net>,
linux-input@vger.kernel.org, Jim Paris <jim@jtan.com>,
Ranulf Doswell <ralf@ranulf.net>,
"Pascal A . Brisset" <pascal44973@pabr.org>,
Marcin Tolysz <tolysz@gmail.com>,
Christian Birchinger <joker@netswarm.net>,
Filipe Lopes <falktx@gmail.com>, Alan Ott <alan@signal11.us>,
Mikko Virkkila <virkkila@kapsi.fi>,
Antonio Ospite <ospite@studenti.unina.it>
Subject: [PATCH v2 2/3] Re-add manager_get_default_adapter()
Date: Fri, 25 Feb 2011 11:04:51 +0100 [thread overview]
Message-ID: <1298628292-8842-3-git-send-email-ospite@studenti.unina.it> (raw)
In-Reply-To: <1298628292-8842-1-git-send-email-ospite@studenti.unina.it>
From: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
---
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
next prev parent reply other threads:[~2011-02-25 10:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-25 10:04 [PATCH v2 0/3] Another try for the Sixaxis plugin Antonio Ospite
2011-02-25 10:04 ` [PATCH v2 1/3] Remove input/sixpair.c Antonio Ospite
2011-02-25 10:04 ` Antonio Ospite [this message]
2011-02-25 10:04 ` [PATCH v2 3/3] Add sixaxis plugin: USB pairing and LEDs settings Antonio Ospite
[not found] ` <1298628292-8842-4-git-send-email-ospite-aNJ+ML1ZbiP93QAQaVx+gl6hYfS7NtTn@public.gmane.org>
2011-05-06 1:14 ` Bastien Nocera
[not found] ` <1304644488.16101.28.camel-7u+x0O+HiKDXoxyGr5pmpw@public.gmane.org>
2011-05-06 8:45 ` Antonio Ospite
2011-05-06 23:14 ` Antonio Ospite
[not found] ` <20110507011412.ba0ad1e9.ospite-aNJ+ML1ZbiP93QAQaVx+gl6hYfS7NtTn@public.gmane.org>
2011-05-07 16:57 ` Bastien Nocera
2011-06-03 11:59 ` Antonio Ospite
[not found] ` <20110603135904.096660bc.ospite-aNJ+ML1ZbiP93QAQaVx+gl6hYfS7NtTn@public.gmane.org>
2011-06-03 15:25 ` Bastien Nocera
2011-06-03 15:56 ` simon
2011-06-08 9:20 ` Antonio Ospite
[not found] ` <1298628292-8842-1-git-send-email-ospite-aNJ+ML1ZbiP93QAQaVx+gl6hYfS7NtTn@public.gmane.org>
2011-02-25 12:34 ` [PATCH v2 0/3] Another try for the Sixaxis plugin Bastien Nocera
2011-03-24 17:32 ` Antonio Ospite
2011-03-25 15:31 ` Jim Paris
2011-03-25 16:27 ` Antonio Ospite
2011-02-25 14:11 ` pascal44973
2011-02-25 15:49 ` Simon Kenyon
[not found] ` <4D67CF87.50600-YTvESifDTt4@public.gmane.org>
2011-02-25 16:02 ` Bastien Nocera
2011-04-30 11:31 ` Joakim Plate
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1298628292-8842-3-git-send-email-ospite@studenti.unina.it \
--to=ospite@studenti.unina.it \
--cc=alan@signal11.us \
--cc=falktx@gmail.com \
--cc=hadess@hadess.net \
--cc=jim@jtan.com \
--cc=joker@netswarm.net \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=pascal44973@pabr.org \
--cc=ralf@ranulf.net \
--cc=tolysz@gmail.com \
--cc=virkkila@kapsi.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).