diff options
author | Jakub Pawlowski <jpawlowski@google.com> | 2017-03-24 20:31:31 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-03-24 20:31:32 +0000 |
commit | b1def383da0936832a967c303ca07ab92ab554a5 (patch) | |
tree | 090497e5cab76f65ee15a8d213704b04850e51b6 | |
parent | 4929629d91908b68d7b4a9740f70a9b2bb05a7f3 (diff) | |
parent | 6f0c6f1874d329b7f7a2fdee14f3d70b5172224a (diff) | |
download | libhardware-b1def383da0936832a967c303ca07ab92ab554a5.tar.gz |
Merge "Expose connection update callback (2/3)"
-rw-r--r-- | include/hardware/bt_gatt_client.h | 6 | ||||
-rw-r--r-- | include/hardware/bt_gatt_server.h | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/hardware/bt_gatt_client.h b/include/hardware/bt_gatt_client.h index 3df0a960..d54256d8 100644 --- a/include/hardware/bt_gatt_client.h +++ b/include/hardware/bt_gatt_client.h @@ -170,6 +170,11 @@ typedef void (*services_added_callback)(int conn_id, btgatt_db_element_t *added, typedef void (*phy_updated_callback)(int conn_id, uint8_t tx_phy, uint8_t rx_phy, uint8_t status); +/** Callback invoked when the connection parameters for a given connection changes */ +typedef void (*conn_updated_callback)(int conn_id, uint16_t interval, + uint16_t latency, uint16_t timeout, + uint8_t status); + typedef struct { register_client_callback register_client_cb; connect_callback open_cb; @@ -189,6 +194,7 @@ typedef struct { services_removed_callback services_removed_cb; services_added_callback services_added_cb; phy_updated_callback phy_updated_cb; + conn_updated_callback conn_updated_cb; } btgatt_client_callbacks_t; /** Represents the standard BT-GATT client interface. */ diff --git a/include/hardware/bt_gatt_server.h b/include/hardware/bt_gatt_server.h index d2e4ccd0..36259a18 100644 --- a/include/hardware/bt_gatt_server.h +++ b/include/hardware/bt_gatt_server.h @@ -109,6 +109,10 @@ typedef void (*mtu_changed_callback)(int conn_id, int mtu); typedef void (*phy_updated_callback)(int conn_id, uint8_t tx_phy, uint8_t rx_phy, uint8_t status); +/** Callback invoked when the connection parameters for a given connection changes */ +typedef void (*conn_updated_callback)(int conn_id, uint16_t interval, + uint16_t latency, uint16_t timeout, + uint8_t status); typedef struct { register_server_callback register_server_cb; connection_callback connection_cb; @@ -125,6 +129,7 @@ typedef struct { congestion_callback congestion_cb; mtu_changed_callback mtu_changed_cb; phy_updated_callback phy_updated_cb; + conn_updated_callback conn_updated_cb; } btgatt_server_callbacks_t; /** Represents the standard BT-GATT server interface. */ |