Add get_gatt_db to Bluetooth HAL
This patch adds new method, get_gatt_db to bluetooth HAL.
It can be used to grab whole GATT database in one request.
It will trigger get_gatt_db_callback, which is also part of
this patch.
Change-Id: I1a931f126db56e7a29537f3bca9cddff3dd27dc6
diff --git a/include/hardware/bt_gatt_client.h b/include/hardware/bt_gatt_client.h
index e7e8e82..45e8b26 100644
--- a/include/hardware/bt_gatt_client.h
+++ b/include/hardware/bt_gatt_client.h
@@ -245,6 +245,9 @@
typedef void (*scan_parameter_setup_completed_callback)(int client_if,
btgattc_error_t status);
+/** GATT get database callback */
+typedef void (*get_gatt_db_callback)(int conn_id, btgatt_db_element_t *db, int count);
+
typedef struct {
register_client_callback register_client_cb;
scan_result_callback scan_result_cb;
@@ -279,6 +282,7 @@
batchscan_threshold_callback batchscan_threshold_cb;
track_adv_event_callback track_adv_event_cb;
scan_parameter_setup_completed_callback scan_parameter_setup_completed_cb;
+ get_gatt_db_callback get_gatt_db_cb;
} btgatt_client_callbacks_t;
/** Represents the standard BT-GATT client interface. */
@@ -448,6 +452,9 @@
/** Test mode interface */
bt_status_t (*test_command)( int command, btgatt_test_params_t* params);
+ /** Get gatt db content */
+ bt_status_t (*get_gatt_db)( int conn_id);
+
} btgatt_client_interface_t;
__END_DECLS