OSDN Git Service

Unify def tBTM_SEC_CBACK=>tBTM_SEC_CALLBACK
authorChris Manton <cmanton@google.com>
Thu, 20 Aug 2020 17:39:23 +0000 (10:39 -0700)
committerChris Manton <cmanton@google.com>
Thu, 20 Aug 2020 19:35:09 +0000 (19:35 +0000)
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
main/shim/btm_api.h
stack/btm/btm_sec.cc
stack/btm/btm_sec.h
stack/include/btm_api_types.h

index b0a4216..437c0c5 100644 (file)
@@ -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
index e1700aa..62888bc 100644 (file)
@@ -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
index 38ded00..1ee86e0 100644 (file)
@@ -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,
index 07da0fb..5e90176 100644 (file)
@@ -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);
index 3064ff8..1c86ed4 100644 (file)
@@ -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