summaryrefslogtreecommitdiff
path: root/android/hal-health.c
diff options
context:
space:
mode:
authorRavi kumar Veeramally <ravikumar.veeramally@linux.intel.com>2014-03-14 15:30:56 +0200
committerSzymon Janc <szymon.janc@tieto.com>2014-03-17 14:52:59 +0100
commita49823593712a225eaa985c7ae3a3951635b1237 (patch)
tree4b87fe0cf2682d9bd1cc7dc8fa06c088ae96b7bf /android/hal-health.c
parent862d816dad93058e8cc224013784ed86b5477400 (diff)
downloadbluez-a49823593712a225eaa985c7ae3a3951635b1237.tar.gz
android/hal-health: Add HDP .unregister_application method
Diffstat (limited to 'android/hal-health.c')
-rw-r--r--android/hal-health.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/android/hal-health.c b/android/hal-health.c
index 918fb695d..2dfba8039 100644
--- a/android/hal-health.c
+++ b/android/hal-health.c
@@ -38,6 +38,21 @@ static bool interface_ready(void)
static const struct hal_ipc_handler ev_handlers[] = {
};
+static bt_status_t unregister_application(int app_id)
+{
+ struct hal_cmd_health_unreg_app cmd;
+
+ DBG("");
+
+ if (!interface_ready())
+ return BT_STATUS_NOT_READY;
+
+ cmd.app_id = app_id;
+
+ return hal_ipc_cmd(HAL_SERVICE_ID_HEALTH, HAL_OP_HEALTH_UNREG_APP,
+ sizeof(cmd), &cmd, 0, NULL, NULL);
+}
+
static bt_status_t init(bthl_callbacks_t *callbacks)
{
struct hal_cmd_register_module cmd;
@@ -90,7 +105,7 @@ static bthl_interface_t health_if = {
.size = sizeof(health_if),
.init = init,
.register_application = NULL,
- .unregister_application = NULL,
+ .unregister_application = unregister_application,
.connect_channel = NULL,
.destroy_channel = NULL,
.cleanup = cleanup