summaryrefslogtreecommitdiff
path: root/android/hal-gatt.c
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2014-11-17 22:46:08 +0100
committerSzymon Janc <szymon.janc@tieto.com>2014-11-19 12:44:34 +0100
commitcf5d70640f283b36d3032f473ca764a6ab12c849 (patch)
treea282cd3c081df12c0aeecc84b86893f62b32839b /android/hal-gatt.c
parent267ad0f0578461820506482e45a6ec9ee996395f (diff)
downloadbluez-cf5d70640f283b36d3032f473ca764a6ab12c849.tar.gz
android/hal-gatt: Implement client batchscan_cfg_storage
This adds required IPC message, HAL implementation and daemon stub handler.
Diffstat (limited to 'android/hal-gatt.c')
-rw-r--r--android/hal-gatt.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/android/hal-gatt.c b/android/hal-gatt.c
index 035dbcf2b..c2f2b9bed 100644
--- a/android/hal-gatt.c
+++ b/android/hal-gatt.c
@@ -1592,11 +1592,19 @@ static bt_status_t batchscan_cfg_storage(int client_if, int batch_scan_full_max,
int batch_scan_trunc_max,
int batch_scan_notify_threshold)
{
- DBG("");
+ struct hal_cmd_gatt_client_configure_batchscan cmd;
- /* TODO */
+ if (!interface_ready())
+ return BT_STATUS_NOT_READY;
- return BT_STATUS_UNSUPPORTED;
+ cmd.client_if = client_if;
+ cmd.full_max = batch_scan_full_max;
+ cmd.trunc_max = batch_scan_trunc_max;
+ cmd.notify_threshold = batch_scan_notify_threshold;
+
+ return hal_ipc_cmd(HAL_SERVICE_ID_GATT,
+ HAL_OP_GATT_CLIENT_CONFIGURE_BATCHSCAN,
+ sizeof(cmd), &cmd, NULL, NULL, NULL);
}
static bt_status_t batchscan_enb_batch_scan(int client_if, int scan_mode,