From 28449c86c106e57c3b69b0024b2a53a8c24269c9 Mon Sep 17 00:00:00 2001 From: Grzegorz Kolodziejczyk Date: Thu, 20 Nov 2014 16:34:05 +0100 Subject: [PATCH] android/client: Add support for gattc scan_filter_clear cmd --- android/client/if-gatt.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c index 4c9dcfa92..c06a1a5cb 100644 --- a/android/client/if-gatt.c +++ b/android/client/if-gatt.c @@ -1739,6 +1739,28 @@ static void scan_filter_add_remove_p(int argc, const char **argv) &p_uuid, &p_uuid_mask, &bd_addr, addr_type, data_len, (char *) p_data, mask_len, (char *) p_mask); } + +/* scan filter clean */ +static void scan_filter_clear_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 scan_filter_clear_p(int argc, const char **argv) +{ + int client_if; + int filt_index; + + RETURN_IF_NULL(if_gatt); + VERIFY_CLIENT_IF(2, client_if); + VERIFY_FILT_INDEX(3, filt_index); + + EXEC(if_gatt->client->scan_filter_clear, client_if, filt_index); +} #endif /* get_device_type */ @@ -1816,6 +1838,7 @@ static struct method client_methods[] = { " " " [] " " [] []"), + STD_METHODCH(scan_filter_clear, " "), #else STD_METHODCH(scan, " [1|0]"), STD_METHODCH(connect, " []"), -- 2.47.3