From 01f92e2042feb4b5da9bfa690d4e54f816432d72 Mon Sep 17 00:00:00 2001 From: Chris Manton Date: Thu, 20 Aug 2020 10:39:23 -0700 Subject: [PATCH] Unify def tBTM_SEC_CBACK=>tBTM_SEC_CALLBACK The names were aliases to each other Bug: 163134718 Tag: #refactor Test: compile & verify basic functions working Change-Id: I4b15d054adc53b0e13f916fc08dcaf17c91d6008 --- main/shim/btm_api.cc | 4 ++-- main/shim/btm_api.h | 4 ++-- stack/btm/btm_sec.cc | 2 +- stack/btm/btm_sec.h | 2 +- stack/include/btm_api_types.h | 7 ++++--- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/main/shim/btm_api.cc b/main/shim/btm_api.cc index b0a42161a..437c0c575 100644 --- a/main/shim/btm_api.cc +++ b/main/shim/btm_api.cc @@ -971,7 +971,7 @@ void bluetooth::shim::SendRemoteNameRequest(const RawAddress& raw_address) { tBTM_STATUS bluetooth::shim::btm_sec_mx_access_request( const RawAddress& bd_addr, uint16_t psm, bool is_originator, - uint32_t mx_proto_id, uint32_t mx_chan_id, tBTM_SEC_CBACK* p_callback, + uint32_t mx_proto_id, uint32_t mx_chan_id, tBTM_SEC_CALLBACK* p_callback, void* p_ref_data) { // Security has already been fulfilled by the l2cap connection, so reply back // that everything is totally fine and legit and definitely not two kids in a @@ -985,7 +985,7 @@ tBTM_STATUS bluetooth::shim::btm_sec_mx_access_request( tBTM_STATUS bluetooth::shim::BTM_SetEncryption(const RawAddress& bd_addr, tBT_TRANSPORT transport, - tBTM_SEC_CBACK* p_callback, + tBTM_SEC_CALLBACK* p_callback, void* p_ref_data, tBTM_BLE_SEC_ACT sec_act) { // When we just bond a device, encryption is already done diff --git a/main/shim/btm_api.h b/main/shim/btm_api.h index e1700aa9b..62888bcfb 100644 --- a/main/shim/btm_api.h +++ b/main/shim/btm_api.h @@ -1622,7 +1622,7 @@ tBTM_STATUS BTM_SecBondCancel(const RawAddress& bd_addr); ******************************************************************************/ tBTM_STATUS BTM_SetEncryption(const RawAddress& bd_addr, tBT_TRANSPORT transport, - tBTM_SEC_CBACK* p_callback, void* p_ref_data, + tBTM_SEC_CALLBACK* p_callback, void* p_ref_data, tBTM_BLE_SEC_ACT sec_act); /******************************************************************************* @@ -2002,7 +2002,7 @@ void SendRemoteNameRequest(const RawAddress& raw_address); tBTM_STATUS btm_sec_mx_access_request(const RawAddress& bd_addr, uint16_t psm, bool is_originator, uint32_t mx_proto_id, uint32_t mx_chan_id, - tBTM_SEC_CBACK* p_callback, + tBTM_SEC_CALLBACK* p_callback, void* p_ref_data); } // namespace shim diff --git a/stack/btm/btm_sec.cc b/stack/btm/btm_sec.cc index 38ded0030..1ee86e075 100644 --- a/stack/btm/btm_sec.cc +++ b/stack/btm/btm_sec.cc @@ -1038,7 +1038,7 @@ tBTM_LINK_KEY_TYPE BTM_SecGetDeviceLinkKeyType(const RawAddress& bd_addr) { ******************************************************************************/ tBTM_STATUS BTM_SetEncryption(const RawAddress& bd_addr, tBT_TRANSPORT transport, - tBTM_SEC_CBACK* p_callback, void* p_ref_data, + tBTM_SEC_CALLBACK* p_callback, void* p_ref_data, tBTM_BLE_SEC_ACT sec_act) { if (bluetooth::shim::is_gd_shim_enabled()) { return bluetooth::shim::BTM_SetEncryption(bd_addr, transport, p_callback, diff --git a/stack/btm/btm_sec.h b/stack/btm/btm_sec.h index 07da0fb07..5e9017626 100644 --- a/stack/btm/btm_sec.h +++ b/stack/btm/btm_sec.h @@ -304,7 +304,7 @@ tBTM_LINK_KEY_TYPE BTM_SecGetDeviceLinkKeyType(const RawAddress& bd_addr); ******************************************************************************/ tBTM_STATUS BTM_SetEncryption(const RawAddress& bd_addr, tBT_TRANSPORT transport, - tBTM_SEC_CBACK* p_callback, void* p_ref_data, + tBTM_SEC_CALLBACK* p_callback, void* p_ref_data, tBTM_BLE_SEC_ACT sec_act); bool BTM_SecIsSecurityPending(const RawAddress& bd_addr); diff --git a/stack/include/btm_api_types.h b/stack/include/btm_api_types.h index 3064ff88a..1c86ed49e 100644 --- a/stack/include/btm_api_types.h +++ b/stack/include/btm_api_types.h @@ -933,9 +933,10 @@ typedef void(tBTM_MKEY_CALLBACK)(const RawAddress& bd_addr, uint8_t status, * optional data passed in by BTM_SetEncryption * tBTM_STATUS - result of the operation */ -typedef void(tBTM_SEC_CBACK)(const RawAddress* bd_addr, tBT_TRANSPORT trasnport, - void* p_ref_data, tBTM_STATUS result); -typedef tBTM_SEC_CBACK tBTM_SEC_CALLBACK; +typedef void(tBTM_SEC_CALLBACK)(const RawAddress* bd_addr, + tBT_TRANSPORT trasnport, void* p_ref_data, + tBTM_STATUS result); +typedef tBTM_SEC_CALLBACK tBTM_SEC_CALLBACK; /* Bond Cancel complete. Parameters are * Result of the cancel operation -- 2.11.0