From: Mikel Astiz <mikel.astiz.oss@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Mikel Astiz <mikel.astiz@bmw-carit.de>
Subject: [RFC v1 6/7] health: Split health into two btd_profile
Date: Wed, 6 Feb 2013 10:16:26 +0100 [thread overview]
Message-ID: <1360142187-15347-7-git-send-email-mikel.astiz.oss@gmail.com> (raw)
In-Reply-To: <1360142187-15347-1-git-send-email-mikel.astiz.oss@gmail.com>
From: Mikel Astiz <mikel.astiz@bmw-carit.de>
Register a separate btd_profile for each health device role.
---
profiles/health/hdp_manager.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/profiles/health/hdp_manager.c b/profiles/health/hdp_manager.c
index 87e70cd..9df5b2b 100644
--- a/profiles/health/hdp_manager.c
+++ b/profiles/health/hdp_manager.c
@@ -65,9 +65,9 @@ static void hdp_driver_remove(struct btd_profile *p, struct btd_device *device)
hdp_device_unregister(device);
}
-static struct btd_profile hdp_profile = {
- .name = "hdp-profile",
- .remote_uuids = BTD_UUIDS(HDP_UUID, HDP_SOURCE_UUID, HDP_SINK_UUID),
+static struct btd_profile hdp_source_profile = {
+ .name = "hdp-source",
+ .remote_uuids = BTD_UUIDS(HDP_SOURCE_UUID),
.device_probe = hdp_driver_probe,
.device_remove = hdp_driver_remove,
@@ -76,19 +76,29 @@ static struct btd_profile hdp_profile = {
.adapter_remove = hdp_adapter_remove,
};
+static struct btd_profile hdp_sink_profile = {
+ .name = "hdp-sink",
+ .remote_uuids = BTD_UUIDS(HDP_SINK_UUID),
+
+ .device_probe = hdp_driver_probe,
+ .device_remove = hdp_driver_remove,
+};
+
int hdp_manager_init(void)
{
if (hdp_manager_start() < 0)
return -1;
- btd_profile_register(&hdp_profile);
+ btd_profile_register(&hdp_source_profile);
+ btd_profile_register(&hdp_sink_profile);
return 0;
}
void hdp_manager_exit(void)
{
- btd_profile_unregister(&hdp_profile);
+ btd_profile_unregister(&hdp_sink_profile);
+ btd_profile_unregister(&hdp_source_profile);
hdp_manager_stop();
}
--
1.8.1
next prev parent reply other threads:[~2013-02-06 9:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-06 9:16 [RFC v1 0/7] One remote UUID per btd_profile Mikel Astiz
2013-02-06 9:16 ` [RFC v1 1/7] avrcp: Refactor server registration Mikel Astiz
2013-02-06 9:16 ` [RFC v1 2/7] audio: Split AVRCP into two btd_profile Mikel Astiz
2013-02-07 9:43 ` Luiz Augusto von Dentz
2013-02-07 10:43 ` Mikel Astiz
2013-02-06 9:16 ` [RFC v1 3/7] proximity: Split internal monitor registration API Mikel Astiz
2013-02-14 16:37 ` Claudio Takahasi
2013-02-15 7:54 ` Mikel Astiz
2013-02-27 7:46 ` Mikel Astiz
2013-02-28 19:34 ` Claudio Takahasi
2013-02-06 9:16 ` [RFC v1 4/7] proximity: Split monitor into three btd_profile Mikel Astiz
2013-02-06 9:16 ` [RFC v1 5/7] gatt: List only GATT_UUID as remote UUID Mikel Astiz
2013-02-06 9:16 ` Mikel Astiz [this message]
2013-02-06 9:16 ` [RFC v1 7/7] profile: Limit to one remote UUID per profile Mikel Astiz
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=1360142187-15347-7-git-send-email-mikel.astiz.oss@gmail.com \
--to=mikel.astiz.oss@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=mikel.astiz@bmw-carit.de \
/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