summaryrefslogtreecommitdiff
path: root/emulator/bthost.h
diff options
context:
space:
mode:
authorArchie Pusaka <apusaka@chromium.org>2020-05-05 12:29:11 +0800
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2020-06-04 14:17:27 -0700
commit0c7e7a95df390759520c7cf9c2715ccf7a2e9ac5 (patch)
tree5ba79e9ef23499b4685d29c02e24cbddf94a046d /emulator/bthost.h
parenta078a364768cf62b92c4ffaa89647dd49282981a (diff)
downloadbluez-0c7e7a95df390759520c7cf9c2715ccf7a2e9ac5.tar.gz
tools/l2cap-tester: Add test for waiting disconnection response
This is to test the behaviour of L2CAP channel when closed with shut_down(sock, SHUT_WR). In this case, we should wait until we receive a disconnection response before raising G_IO_HUP.
Diffstat (limited to 'emulator/bthost.h')
-rw-r--r--emulator/bthost.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/emulator/bthost.h b/emulator/bthost.h
index b5f36964d..2b347136f 100644
--- a/emulator/bthost.h
+++ b/emulator/bthost.h
@@ -100,9 +100,12 @@ void bthost_le_start_encrypt(struct bthost *bthost, uint16_t handle,
const uint8_t ltk[16]);
typedef void (*bthost_l2cap_connect_cb) (uint16_t handle, uint16_t cid,
void *user_data);
+typedef void (*bthost_l2cap_disconnect_cb) (void *user_data);
void bthost_add_l2cap_server(struct bthost *bthost, uint16_t psm,
- bthost_l2cap_connect_cb func, void *user_data);
+ bthost_l2cap_connect_cb func,
+ bthost_l2cap_disconnect_cb disconn_func,
+ void *user_data);
void bthost_set_sc_support(struct bthost *bthost, bool enable);