From a880b227bdb37ebedf50fa2bcaa2d9e468e23e12 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Mon, 4 Nov 2013 16:34:23 +0100 Subject: [PATCH] android: Add support for handling get properties commands When this commands is received all properties shall be reported to HAL. --- android/adapter.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/android/adapter.c b/android/adapter.c index fb5c462a2..56ac4b729 100644 --- a/android/adapter.c +++ b/android/adapter.c @@ -1120,6 +1120,19 @@ static bool get_property(void *buf, uint16_t len) } } +static void get_properties(void) +{ + get_address(); + get_name(); + get_uuids(); + get_class(); + get_type(); + get_service(); + get_scan_mode(); + get_devices(); + get_disc_timeout(); +} + static bool start_discovery(void) { struct mgmt_cp_start_discovery cp; @@ -1504,6 +1517,10 @@ void bt_adapter_handle_cmd(GIOChannel *io, uint8_t opcode, void *buf, goto error; break; + case HAL_OP_GET_ADAPTER_PROPS: + get_properties(); + + break; case HAL_OP_GET_ADAPTER_PROP: if (!get_property(buf, len)) goto error; -- 2.11.0