diff options
author | Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com> | 2014-03-13 13:58:52 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-03-14 13:34:16 +0100 |
commit | 72b36c7854090411718699d97fc5f52493b64fac (patch) | |
tree | ef42a054936ff2a2e6837f227b82ba4355634895 /android/main.c | |
parent | 2bb8f57c986aa005a005a797730f32f4dfab4f48 (diff) | |
download | bluez-72b36c7854090411718699d97fc5f52493b64fac.tar.gz |
android/health: Add health.c|h file with basic calls
Add health.c|h with basic calls for register and unregister profile.
Diffstat (limited to 'android/main.c')
-rw-r--r-- | android/main.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/android/main.c b/android/main.c index a34f885f5..35ff7182a 100644 --- a/android/main.c +++ b/android/main.c @@ -59,6 +59,7 @@ #include "avrcp.h" #include "handsfree.h" #include "gatt.h" +#include "health.h" #define STARTUP_GRACE_SECONDS 5 #define SHUTDOWN_GRACE_SECONDS 10 @@ -134,6 +135,13 @@ static void service_register(const void *buf, uint16_t len) } break; + case HAL_SERVICE_ID_HEALTH: + if (!bt_health_register(hal_ipc, &adapter_bdaddr, m->mode)) { + status = HAL_STATUS_FAILED; + goto failed; + } + + break; default: DBG("service %u not supported", m->service_id); status = HAL_STATUS_FAILED; @@ -186,6 +194,9 @@ static void service_unregister(const void *buf, uint16_t len) case HAL_SERVICE_ID_GATT: bt_gatt_unregister(); break; + case HAL_SERVICE_ID_HEALTH: + bt_health_unregister(); + break; default: /* This would indicate bug in HAL, as unregister should not be * called in init failed */ @@ -395,6 +406,9 @@ static void cleanup_services(void) case HAL_SERVICE_ID_GATT: bt_gatt_unregister(); break; + case HAL_SERVICE_ID_HEALTH: + bt_health_unregister(); + break; } services[i] = false; |