LE: Add peripheral role support (3/4)
Initial stack support for the LE peripheral role.
Change-Id: Ie036432c90c405a331e2fceaf88bf97a46182176
diff --git a/include/hardware/bt_gatt_client.h b/include/hardware/bt_gatt_client.h
index c03e774..d6b0cb4 100644
--- a/include/hardware/bt_gatt_client.h
+++ b/include/hardware/bt_gatt_client.h
@@ -151,6 +151,11 @@
typedef void (*read_remote_rssi_callback)(int client_if, bt_bdaddr_t* bda,
int rssi, int status);
+/**
+ * Callback indicationg the status of a listen() operation
+ */
+typedef void (*listen_callback)(int status, int server_if);
+
typedef struct {
register_client_callback register_client_cb;
scan_result_callback scan_result_cb;
@@ -169,6 +174,7 @@
write_descriptor_callback write_descriptor_cb;
execute_write_callback execute_write_cb;
read_remote_rssi_callback read_remote_rssi_cb;
+ listen_callback listen_cb;
} btgatt_client_callbacks_t;
/** Represents the standard BT-GATT client interface. */
@@ -191,6 +197,9 @@
bt_status_t (*disconnect)( int client_if, const bt_bdaddr_t *bd_addr,
int conn_id);
+ /** Start or stop advertisements to listen for incoming connections */
+ bt_status_t (*listen)(int client_if, bool start);
+
/** Clear the attribute cache for a given device */
bt_status_t (*refresh)( int client_if, const bt_bdaddr_t *bd_addr );
@@ -266,6 +275,11 @@
/** Determine the type of the remote device (LE, BR/EDR, Dual-mode) */
int (*get_device_type)( const bt_bdaddr_t *bd_addr );
+ /** Set the advertising data or scan response data */
+ bt_status_t (*set_adv_data)(int server_if, bool set_scan_rsp, bool include_name,
+ bool include_txpower, int min_interval, int max_interval, int appearance,
+ uint16_t manufacturer_len, char* manufacturer_data);
+
/** Test mode interface */
bt_status_t (*test_command)( int command, btgatt_test_params_t* params);
} btgatt_client_interface_t;