diff options
author | Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com> | 2014-10-03 16:04:04 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-10-08 14:45:20 +0200 |
commit | 2fe3089a7b715ab6070258ac2036717208688184 (patch) | |
tree | 84add117672b7c01b997bd21a5afe1797c7365b8 /android/hal-map-client.c | |
parent | 62b8a7686842c1e8cdd2eccdb7bd00eb1b5030b2 (diff) | |
download | bluez-2fe3089a7b715ab6070258ac2036717208688184.tar.gz |
android/hal-map-client: Add API calls
Send API calls data using IPC.
Diffstat (limited to 'android/hal-map-client.c')
-rw-r--r-- | android/hal-map-client.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/android/hal-map-client.c b/android/hal-map-client.c index 533b7933b..8255d2bad 100644 --- a/android/hal-map-client.c +++ b/android/hal-map-client.c @@ -17,6 +17,7 @@ #include <stdlib.h> #include <stdbool.h> +#include <string.h> #include "hal-log.h" #include "hal.h" @@ -99,7 +100,16 @@ static const struct hal_ipc_handler ev_handlers[] = { static bt_status_t get_remote_mas_instances(bt_bdaddr_t *bd_addr) { - return BT_STATUS_UNSUPPORTED; + struct hal_cmd_map_client_get_instances cmd; + + if (!interface_ready()) + return BT_STATUS_NOT_READY; + + memcpy(cmd.bdaddr, bd_addr, sizeof(*bd_addr)); + + return hal_ipc_cmd(HAL_SERVICE_ID_MAP_CLIENT, + HAL_OP_MAP_CLIENT_GET_INSTANCES, sizeof(cmd), + &cmd, NULL, NULL, NULL); } static bt_status_t init(btmce_callbacks_t *callbacks) |