summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Eisenbach <andre@broadcom.com>2013-08-06 19:54:25 -0700
committerMatthew Xie <mattx@google.com>2013-08-14 00:53:11 -0700
commit299e43c186a9c8a6611d8c5f61d158436948afe5 (patch)
tree7c61c756d336d957a53e44384b2562d378bccbe1
parent02223d1602c1728b3c94f68059d1b2e76d35dbd3 (diff)
downloadlibhardware-299e43c186a9c8a6611d8c5f61d158436948afe5.tar.gz
LE: Add peripheral role support (3/4)
Initial stack support for the LE peripheral role. Change-Id: Ie036432c90c405a331e2fceaf88bf97a46182176
-rw-r--r--include/hardware/bt_gatt_client.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/hardware/bt_gatt_client.h b/include/hardware/bt_gatt_client.h
index c03e7745..d6b0cb40 100644
--- a/include/hardware/bt_gatt_client.h
+++ b/include/hardware/bt_gatt_client.h
@@ -151,6 +151,11 @@ typedef void (*write_descriptor_callback)(int conn_id, int status,
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 @@ typedef struct {
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 @@ typedef struct {
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 @@ typedef struct {
/** 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;