summaryrefslogtreecommitdiff
path: root/profiles/health
diff options
context:
space:
mode:
authorMikel Astiz <mikel.astiz@bmw-carit.de>2013-03-01 14:59:12 +0100
committerJohan Hedberg <johan.hedberg@intel.com>2013-03-10 09:03:31 +0200
commit48563e3d3ed04cd31432c076d5039e960167d865 (patch)
tree998ba5411607d15fa3f8648cc4b06a4773f7b126 /profiles/health
parent338c7de753e8c84e0425ee3fea1a83b8e2ca22dd (diff)
downloadbluez-48563e3d3ed04cd31432c076d5039e960167d865.tar.gz
health: Split health into two btd_profile
Register a separate btd_profile for each health device role.
Diffstat (limited to 'profiles/health')
-rw-r--r--profiles/health/hdp_manager.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/profiles/health/hdp_manager.c b/profiles/health/hdp_manager.c
index 87e70cd78..9df5b2b03 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();
}