summaryrefslogtreecommitdiffstats
path: root/include/hardware/bt_gatt_client.h
diff options
context:
space:
mode:
authorAndre Eisenbach <andre@broadcom.com>2013-07-09 00:02:48 -0700
committerMatthew Xie <mattx@google.com>2013-08-13 19:35:15 -0700
commit02223d1602c1728b3c94f68059d1b2e76d35dbd3 (patch)
tree8f1ad8228af4f8a290a36278ebcb44288b65d47a /include/hardware/bt_gatt_client.h
parent6e548cf960faf18975138a1a6952684ecbee3ba3 (diff)
downloadhardware_libhardware-02223d1602c1728b3c94f68059d1b2e76d35dbd3.zip
hardware_libhardware-02223d1602c1728b3c94f68059d1b2e76d35dbd3.tar.gz
hardware_libhardware-02223d1602c1728b3c94f68059d1b2e76d35dbd3.tar.bz2
LE: Add instance ID to descriptors (3/4)
If a remote devices offers multiple descriptors with the same UUID, the instance ID is used to differentiate between them. Change-Id: Ia5ab989f222a5cf1b7cb66966ad4f91f2b660708
Diffstat (limited to 'include/hardware/bt_gatt_client.h')
-rw-r--r--include/hardware/bt_gatt_client.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/include/hardware/bt_gatt_client.h b/include/hardware/bt_gatt_client.h
index 8b49f59..c03e774 100644
--- a/include/hardware/bt_gatt_client.h
+++ b/include/hardware/bt_gatt_client.h
@@ -40,8 +40,8 @@ typedef struct
typedef struct
{
btgatt_srvc_id_t srvc_id;
- btgatt_char_id_t char_id;
- bt_uuid_t descr_id;
+ btgatt_gatt_id_t char_id;
+ btgatt_gatt_id_t descr_id;
btgatt_unformatted_value_t value;
uint16_t value_type;
uint8_t status;
@@ -51,8 +51,8 @@ typedef struct
typedef struct
{
btgatt_srvc_id_t srvc_id;
- btgatt_char_id_t char_id;
- bt_uuid_t descr_id;
+ btgatt_gatt_id_t char_id;
+ btgatt_gatt_id_t descr_id;
uint8_t status;
} btgatt_write_params_t;
@@ -62,7 +62,7 @@ typedef struct
uint8_t value[BTGATT_MAX_ATTR_LEN];
bt_bdaddr_t bda;
btgatt_srvc_id_t srvc_id;
- btgatt_char_id_t char_id;
+ btgatt_gatt_id_t char_id;
uint16_t len;
uint8_t is_notify;
} btgatt_notify_params_t;
@@ -105,13 +105,13 @@ typedef void (*search_result_callback)( int conn_id, btgatt_srvc_id_t *srvc_id);
/** GATT characteristic enumeration result callback */
typedef void (*get_characteristic_callback)(int conn_id, int status,
- btgatt_srvc_id_t *srvc_id, btgatt_char_id_t *char_id,
+ btgatt_srvc_id_t *srvc_id, btgatt_gatt_id_t *char_id,
int char_prop);
/** GATT descriptor enumeration result callback */
typedef void (*get_descriptor_callback)(int conn_id, int status,
- btgatt_srvc_id_t *srvc_id, btgatt_char_id_t *char_id,
- bt_uuid_t *descr_id);
+ btgatt_srvc_id_t *srvc_id, btgatt_gatt_id_t *char_id,
+ btgatt_gatt_id_t *descr_id);
/** GATT included service enumeration result callback */
typedef void (*get_included_service_callback)(int conn_id, int status,
@@ -120,7 +120,7 @@ typedef void (*get_included_service_callback)(int conn_id, int status,
/** Callback invoked in response to [de]register_for_notification */
typedef void (*register_for_notification_callback)(int conn_id,
int registered, int status, btgatt_srvc_id_t *srvc_id,
- btgatt_char_id_t *char_id);
+ btgatt_gatt_id_t *char_id);
/**
* Remote device notification callback, invoked when a remote device sends
@@ -212,36 +212,36 @@ typedef struct {
* Set start_char_id to NULL to get the first characteristic.
*/
bt_status_t (*get_characteristic)( int conn_id,
- btgatt_srvc_id_t *srvc_id, btgatt_char_id_t *start_char_id);
+ btgatt_srvc_id_t *srvc_id, btgatt_gatt_id_t *start_char_id);
/**
* Enumerate descriptors for a given characteristic.
* Set start_descr_id to NULL to get the first descriptor.
*/
bt_status_t (*get_descriptor)( int conn_id,
- btgatt_srvc_id_t *srvc_id, btgatt_char_id_t *char_id,
- bt_uuid_t *start_descr_id);
+ btgatt_srvc_id_t *srvc_id, btgatt_gatt_id_t *char_id,
+ btgatt_gatt_id_t *start_descr_id);
/** Read a characteristic on a remote device */
bt_status_t (*read_characteristic)( int conn_id,
- btgatt_srvc_id_t *srvc_id, btgatt_char_id_t *char_id,
+ btgatt_srvc_id_t *srvc_id, btgatt_gatt_id_t *char_id,
int auth_req );
/** Write a remote characteristic */
bt_status_t (*write_characteristic)(int conn_id,
- btgatt_srvc_id_t *srvc_id, btgatt_char_id_t *char_id,
+ btgatt_srvc_id_t *srvc_id, btgatt_gatt_id_t *char_id,
int write_type, int len, int auth_req,
char* p_value);
/** Read the descriptor for a given characteristic */
bt_status_t (*read_descriptor)(int conn_id,
- btgatt_srvc_id_t *srvc_id, btgatt_char_id_t *char_id,
- bt_uuid_t *descr_id, int auth_req);
+ btgatt_srvc_id_t *srvc_id, btgatt_gatt_id_t *char_id,
+ btgatt_gatt_id_t *descr_id, int auth_req);
/** Write a remote descriptor for a given characteristic */
bt_status_t (*write_descriptor)( int conn_id,
- btgatt_srvc_id_t *srvc_id, btgatt_char_id_t *char_id,
- bt_uuid_t *descr_id, int write_type, int len,
+ btgatt_srvc_id_t *srvc_id, btgatt_gatt_id_t *char_id,
+ btgatt_gatt_id_t *descr_id, int write_type, int len,
int auth_req, char* p_value);
/** Execute a prepared write operation */
@@ -253,12 +253,12 @@ typedef struct {
*/
bt_status_t (*register_for_notification)( int client_if,
const bt_bdaddr_t *bd_addr, btgatt_srvc_id_t *srvc_id,
- btgatt_char_id_t *char_id);
+ btgatt_gatt_id_t *char_id);
/** Deregister a previous request for notifications/indications */
bt_status_t (*deregister_for_notification)( int client_if,
const bt_bdaddr_t *bd_addr, btgatt_srvc_id_t *srvc_id,
- btgatt_char_id_t *char_id);
+ btgatt_gatt_id_t *char_id);
/** Request RSSI for a given remote device */
bt_status_t (*read_remote_rssi)( int client_if, const bt_bdaddr_t *bd_addr);