From 7ce786b66980d4eefc782b5b082e54e61d2d8491 Mon Sep 17 00:00:00 2001 From: Grzegorz Kolodziejczyk Date: Fri, 28 Nov 2014 09:22:01 +0100 Subject: [PATCH] android/client: Add support for gattc batch_cfg_storage --- android/client/if-gatt.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c index 89fa45f90..d43a5e89c 100644 --- a/android/client/if-gatt.c +++ b/android/client/if-gatt.c @@ -2029,6 +2029,34 @@ static void multi_adv_disable_p(int argc, const char **argv) EXEC(if_gatt->client->multi_adv_disable, client_if); } + +/* batch scanconfigure storage */ +static void batchscan_cfg_storage_c(int argc, const char **argv, + enum_func *enum_func, void **user) +{ + if (argc == 2) { + *user = client_if_str; + *enum_func = enum_one_string; + } +} + +static void batchscan_cfg_storage_p(int argc, const char **argv) +{ + int client_if; + int batch_scan_full_max; + int batch_scan_trunc_max; + int batch_scan_notify_threshold; + + RETURN_IF_NULL(if_gatt); + VERIFY_CLIENT_IF(2, client_if); + VERIFY_BATCH_SCAN_FULL_MAX(3, batch_scan_full_max); + VERIFY_BATCH_SCAN_TRUNC_MAX(4, batch_scan_trunc_max); + VERIFY_BATCH_SCAN_NOTIFY_THR(5, batch_scan_notify_threshold); + + EXEC(if_gatt->client->batchscan_cfg_storage, client_if, + batch_scan_full_max, batch_scan_trunc_max, + batch_scan_notify_threshold); +} #endif /* get_device_type */ @@ -2127,6 +2155,9 @@ static struct method client_methods[] = { " [] []" " []"), STD_METHODCH(multi_adv_disable, ""), + STD_METHODCH(batchscan_cfg_storage, " " + " " + " "), #else STD_METHODCH(scan, " [1|0]"), STD_METHODCH(connect, " []"), -- 2.47.3