diff options
author | Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com> | 2014-11-25 11:13:16 +0100 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-11-27 18:21:50 +0100 |
commit | bcbbf62021d288d44ee2842fbe91a553777683bc (patch) | |
tree | 095df98bd9832ca1f490f041d7fedd7ecf90d9ba /android/client | |
parent | 2876cd5b0ed1407d52f6420bf49f5d064142aebf (diff) | |
download | bluez-bcbbf62021d288d44ee2842fbe91a553777683bc.tar.gz |
android/client: Add support for gattc multi_adv_update
Diffstat (limited to 'android/client')
-rw-r--r-- | android/client/if-gatt.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c index c94aaea9b..fa17eb255 100644 --- a/android/client/if-gatt.c +++ b/android/client/if-gatt.c @@ -1930,6 +1930,38 @@ static void multi_adv_enable_p(int argc, const char **argv) EXEC(if_gatt->client->multi_adv_enable, client_if, min_interval, max_interval, adv_type, chnl_map, tx_power, timeout_s); } + +/* update multi advertiser */ +static void multi_adv_update_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 multi_adv_update_p(int argc, const char **argv) +{ + int client_if; + int min_interval, max_interval; + int adv_type; + int chnl_map; + int tx_power; + int timeout_s; + + RETURN_IF_NULL(if_gatt); + VERIFY_CLIENT_IF(2, client_if); + VERIFY_MIN_INTERVAL(3, min_interval); + VERIFY_MAX_INTERVAL(4, max_interval); + VERIFY_ADV_TYPE(5, adv_type); + VERIFY_CHNL_MAP(6, chnl_map); + VERIFY_TX_POWER(7, tx_power); + VERIFY_TIMEOUT_S(8, timeout_s); + + EXEC(if_gatt->client->multi_adv_update, client_if, min_interval, + max_interval, adv_type, chnl_map, tx_power, timeout_s); +} #endif /* get_device_type */ @@ -2020,6 +2052,9 @@ static struct method client_methods[] = { STD_METHODCH(multi_adv_enable, "<client_if> <min_interval>" " <max_interval> <adv_type> <chnl_map> <tx_power>" " <timeout_s>"), + STD_METHODCH(multi_adv_update, "<client_if> <min_interval>" + " <max_interval> <adv_type> <chnl_map> <tx_power>" + " <timeout_s>"), #else STD_METHODCH(scan, "<client_if> [1|0]"), STD_METHODCH(connect, "<client_if> <addr> [<is_direct>]"), |