From 3500c8b393047538650aad2ea7c7d6298a5d40de Mon Sep 17 00:00:00 2001 From: Chris Manton Date: Tue, 5 Jan 2021 17:39:22 -0800 Subject: [PATCH] Add API btm_client_interface methods Towards modular code Bug: 163134718 Tag: #refactor Test: gd/cert/run --host Change-Id: I2b73a014bb83ccb65bc8db71dda4389f69a39536 --- stack/btm/btm_client_interface.cc | 5 +++++ stack/include/btm_client_interface.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/stack/btm/btm_client_interface.cc b/stack/btm/btm_client_interface.cc index b1afa3bf6..9f3677e3c 100644 --- a/stack/btm/btm_client_interface.cc +++ b/stack/btm/btm_client_interface.cc @@ -33,6 +33,10 @@ struct btm_client_interface_s btm_client_interface = { .BTM_VendorSpecificCommand = BTM_VendorSpecificCommand, .ACL_RegisterClient = ACL_RegisterClient, .ACL_UnregisterClient = ACL_UnregisterClient, + .btm_init = btm_init, + .btm_free = btm_free, + .btm_ble_init = btm_ble_init, + .btm_ble_free = btm_ble_free, }, .scn = @@ -60,6 +64,7 @@ struct btm_client_interface_s btm_client_interface = { .BTM_ReadRemoteDeviceName = BTM_ReadRemoteDeviceName, .BTM_ReadRemoteFeatures = BTM_ReadRemoteFeatures, .BTM_SetEncryption = BTM_SetEncryption, + .BTM_GetMaxPacketSize = BTM_GetMaxPacketSize, }, .link_policy = diff --git a/stack/include/btm_client_interface.h b/stack/include/btm_client_interface.h index eb9b0c313..02d0db087 100644 --- a/stack/include/btm_client_interface.h +++ b/stack/include/btm_client_interface.h @@ -38,6 +38,10 @@ struct btm_client_interface_s { tBTM_VSC_CMPL_CB* p_cb); void (*ACL_RegisterClient)(struct acl_client_callback_s* callbacks); void (*ACL_UnregisterClient)(struct acl_client_callback_s* callbacks); + void (*btm_init)(); + void (*btm_free)(); + void (*btm_ble_init)(); + void (*btm_ble_free)(); } lifecycle; struct { @@ -73,6 +77,7 @@ struct btm_client_interface_s { void (*BTM_ReadDevInfo)(const RawAddress& bd_addr, tBT_DEVICE_TYPE* p_dev_type, tBLE_ADDR_TYPE* p_addr_type); + uint16_t (*BTM_GetMaxPacketSize)(const RawAddress& bd_addr); } peer; struct { -- 2.11.0