Add transport param to Connect APIs
Support for passing preferred transport for GATT connections as part of
Connect APIs
Change-Id: I83ba256574234c0a15a4bff48bcffa2e237c9393
diff --git a/include/hardware/bt_gatt_client.h b/include/hardware/bt_gatt_client.h
index 11b146d..f709e2c 100644
--- a/include/hardware/bt_gatt_client.h
+++ b/include/hardware/bt_gatt_client.h
@@ -195,7 +195,7 @@
/** Create a connection to a remote LE or dual-mode device */
bt_status_t (*connect)( int client_if, const bt_bdaddr_t *bd_addr,
- bool is_direct );
+ bool is_direct, int transport );
/** Disconnect a remote device or cancel a pending connection */
bt_status_t (*disconnect)( int client_if, const bt_bdaddr_t *bd_addr,
@@ -291,6 +291,7 @@
/** Test mode interface */
bt_status_t (*test_command)( int command, btgatt_test_params_t* params);
+
} btgatt_client_interface_t;
__END_DECLS
diff --git a/include/hardware/bt_gatt_server.h b/include/hardware/bt_gatt_server.h
index 1a5a400..32f8ef6 100644
--- a/include/hardware/bt_gatt_server.h
+++ b/include/hardware/bt_gatt_server.h
@@ -129,7 +129,8 @@
bt_status_t (*unregister_server)(int server_if );
/** Create a connection to a remote peripheral */
- bt_status_t (*connect)(int server_if, const bt_bdaddr_t *bd_addr, bool is_direct );
+ bt_status_t (*connect)(int server_if, const bt_bdaddr_t *bd_addr,
+ bool is_direct, int transport);
/** Disconnect an established connection or cancel a pending one */
bt_status_t (*disconnect)(int server_if, const bt_bdaddr_t *bd_addr,
@@ -168,6 +169,7 @@
/** Send a response to a read/write operation */
bt_status_t (*send_response)(int conn_id, int trans_id,
int status, btgatt_response_t *response);
+
} btgatt_server_interface_t;
__END_DECLS
diff --git a/include/hardware/bt_gatt_types.h b/include/hardware/bt_gatt_types.h
index 0ac217e..e037ddc 100644
--- a/include/hardware/bt_gatt_types.h
+++ b/include/hardware/bt_gatt_types.h
@@ -43,6 +43,14 @@
uint8_t is_primary;
} btgatt_srvc_id_t;
+/** Preferred physical Transport for GATT connection */
+typedef enum
+{
+ GATT_TRANSPORT_AUTO,
+ GATT_TRANSPORT_BREDR,
+ GATT_TRANSPORT_LE
+} btgatt_transport_t;
+
__END_DECLS
#endif /* ANDROID_INCLUDE_BT_GATT_TYPES_H */