summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Eisenbach <eisenbach@google.com>2014-11-26 12:56:23 -0800
committerAndre Eisenbach <eisenbach@google.com>2014-11-26 12:56:23 -0800
commit285fed09639f66923529289d71cc633ad738c96c (patch)
tree9dbcb7085ce1fabd98f91d2b7f9daef38dc4022b
parentb73bc86089b8a65da88776bafcf48529431150b8 (diff)
downloadlibhardware-285fed09639f66923529289d71cc633ad738c96c.tar.gz
Add server-side callback for change in MTU (1/4)
When a client requests to update the LE transport MTU, the server currently does not get notified and can therefor not properly size notifications appropriate to the current MTU. Bug: 18388114 Change-Id: I136f32cba48da3302e13fb9a9ec81b8e01712138
-rw-r--r--include/hardware/bt_gatt_server.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hardware/bt_gatt_server.h b/include/hardware/bt_gatt_server.h
index 2b1de278..0d6cc1e8 100644
--- a/include/hardware/bt_gatt_server.h
+++ b/include/hardware/bt_gatt_server.h
@@ -117,6 +117,9 @@ typedef void (*indication_sent_callback)(int conn_id, int status);
*/
typedef void (*congestion_callback)(int conn_id, bool congested);
+/** Callback invoked when the MTU for a given connection changes */
+typedef void (*mtu_changed_callback)(int conn_id, int mtu);
+
typedef struct {
register_server_callback register_server_cb;
connection_callback connection_cb;
@@ -133,6 +136,7 @@ typedef struct {
response_confirmation_callback response_confirmation_cb;
indication_sent_callback indication_sent_cb;
congestion_callback congestion_cb;
+ mtu_changed_callback mtu_changed_cb;
} btgatt_server_callbacks_t;
/** Represents the standard BT-GATT server interface. */