Add transport param to Connect APIs

Support for passing preferred transport for GATT connections as part of
Connect APIs

Change-Id: I83ba256574234c0a15a4bff48bcffa2e237c9393
This commit is contained in:
Ganesh Ganapathi Batta 2014-04-18 10:02:49 -07:00 committed by Matthew Xie
parent 6253b05364
commit f9f4d10c4a
3 changed files with 13 additions and 2 deletions

View file

@ -195,7 +195,7 @@ typedef struct {
/** 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 @@ typedef struct {
/** Test mode interface */
bt_status_t (*test_command)( int command, btgatt_test_params_t* params);
} btgatt_client_interface_t;
__END_DECLS

View file

@ -129,7 +129,8 @@ typedef struct {
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 @@ typedef struct {
/** 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

View file

@ -43,6 +43,14 @@ typedef struct
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 */