Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5a5191c authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Mock static initialization order 19"

parents 007a5f2e f4e69505
Loading
Loading
Loading
Loading
+119 −119

File changed.

Preview size limit exceeded, changes collapsed.

+49 −49
Original line number Original line Diff line number Diff line
@@ -131,44 +131,44 @@ tBTM_STATUS btm_proc_smp_cback::return_value = 0;


// Mocked functions, if any
// Mocked functions, if any
void BTM_BleConfirmReply(const RawAddress& bd_addr, uint8_t res) {
void BTM_BleConfirmReply(const RawAddress& bd_addr, uint8_t res) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::BTM_BleConfirmReply(bd_addr, res);
  test::mock::stack_btm_ble::BTM_BleConfirmReply(bd_addr, res);
}
}
bool BTM_BleDataSignature(const RawAddress& bd_addr, uint8_t* p_text,
bool BTM_BleDataSignature(const RawAddress& bd_addr, uint8_t* p_text,
                          uint16_t len, BLE_SIGNATURE signature) {
                          uint16_t len, BLE_SIGNATURE signature) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::BTM_BleDataSignature(bd_addr, p_text, len,
  return test::mock::stack_btm_ble::BTM_BleDataSignature(bd_addr, p_text, len,
                                                         signature);
                                                         signature);
}
}
void BTM_BleLoadLocalKeys(uint8_t key_type, tBTM_BLE_LOCAL_KEYS* p_key) {
void BTM_BleLoadLocalKeys(uint8_t key_type, tBTM_BLE_LOCAL_KEYS* p_key) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::BTM_BleLoadLocalKeys(key_type, p_key);
  test::mock::stack_btm_ble::BTM_BleLoadLocalKeys(key_type, p_key);
}
}
void BTM_BleOobDataReply(const RawAddress& bd_addr, uint8_t res, uint8_t len,
void BTM_BleOobDataReply(const RawAddress& bd_addr, uint8_t res, uint8_t len,
                         uint8_t* p_data) {
                         uint8_t* p_data) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::BTM_BleOobDataReply(bd_addr, res, len, p_data);
  test::mock::stack_btm_ble::BTM_BleOobDataReply(bd_addr, res, len, p_data);
}
}
void BTM_BlePasskeyReply(const RawAddress& bd_addr, uint8_t res,
void BTM_BlePasskeyReply(const RawAddress& bd_addr, uint8_t res,
                         uint32_t passkey) {
                         uint32_t passkey) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::BTM_BlePasskeyReply(bd_addr, res, passkey);
  test::mock::stack_btm_ble::BTM_BlePasskeyReply(bd_addr, res, passkey);
}
}
void BTM_BleReadPhy(
void BTM_BleReadPhy(
    const RawAddress& bd_addr,
    const RawAddress& bd_addr,
    base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)> cb) {
    base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)> cb) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::BTM_BleReadPhy(bd_addr, cb);
  test::mock::stack_btm_ble::BTM_BleReadPhy(bd_addr, cb);
}
}
void BTM_BleSecureConnectionOobDataReply(const RawAddress& bd_addr,
void BTM_BleSecureConnectionOobDataReply(const RawAddress& bd_addr,
                                         uint8_t* p_c, uint8_t* p_r) {
                                         uint8_t* p_c, uint8_t* p_r) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::BTM_BleSecureConnectionOobDataReply(bd_addr, p_c,
  test::mock::stack_btm_ble::BTM_BleSecureConnectionOobDataReply(bd_addr, p_c,
                                                                 p_r);
                                                                 p_r);
}
}
void BTM_BleSetPhy(const RawAddress& bd_addr, uint8_t tx_phys, uint8_t rx_phys,
void BTM_BleSetPhy(const RawAddress& bd_addr, uint8_t tx_phys, uint8_t rx_phys,
                   uint16_t phy_options) {
                   uint16_t phy_options) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::BTM_BleSetPhy(bd_addr, tx_phys, rx_phys,
  test::mock::stack_btm_ble::BTM_BleSetPhy(bd_addr, tx_phys, rx_phys,
                                           phy_options);
                                           phy_options);
}
}
@@ -176,79 +176,79 @@ void BTM_BleSetPrefConnParams(const RawAddress& bd_addr, uint16_t min_conn_int,
                              uint16_t max_conn_int,
                              uint16_t max_conn_int,
                              uint16_t peripheral_latency,
                              uint16_t peripheral_latency,
                              uint16_t supervision_tout) {
                              uint16_t supervision_tout) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::BTM_BleSetPrefConnParams(
  test::mock::stack_btm_ble::BTM_BleSetPrefConnParams(
      bd_addr, min_conn_int, max_conn_int, peripheral_latency,
      bd_addr, min_conn_int, max_conn_int, peripheral_latency,
      supervision_tout);
      supervision_tout);
}
}
bool BTM_BleVerifySignature(const RawAddress& bd_addr, uint8_t* p_orig,
bool BTM_BleVerifySignature(const RawAddress& bd_addr, uint8_t* p_orig,
                            uint16_t len, uint32_t counter, uint8_t* p_comp) {
                            uint16_t len, uint32_t counter, uint8_t* p_comp) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::BTM_BleVerifySignature(bd_addr, p_orig, len,
  return test::mock::stack_btm_ble::BTM_BleVerifySignature(bd_addr, p_orig, len,
                                                           counter, p_comp);
                                                           counter, p_comp);
}
}
const Octet16& BTM_GetDeviceDHK() {
const Octet16& BTM_GetDeviceDHK() {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::BTM_GetDeviceDHK();
  return test::mock::stack_btm_ble::BTM_GetDeviceDHK();
}
}
const Octet16& BTM_GetDeviceEncRoot() {
const Octet16& BTM_GetDeviceEncRoot() {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::BTM_GetDeviceEncRoot();
  return test::mock::stack_btm_ble::BTM_GetDeviceEncRoot();
}
}
const Octet16& BTM_GetDeviceIDRoot() {
const Octet16& BTM_GetDeviceIDRoot() {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::BTM_GetDeviceIDRoot();
  return test::mock::stack_btm_ble::BTM_GetDeviceIDRoot();
}
}
bool BTM_ReadConnectedTransportAddress(RawAddress* remote_bda,
bool BTM_ReadConnectedTransportAddress(RawAddress* remote_bda,
                                       tBT_TRANSPORT transport) {
                                       tBT_TRANSPORT transport) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::BTM_ReadConnectedTransportAddress(
  return test::mock::stack_btm_ble::BTM_ReadConnectedTransportAddress(
      remote_bda, transport);
      remote_bda, transport);
}
}
void BTM_ReadDevInfo(const RawAddress& remote_bda, tBT_DEVICE_TYPE* p_dev_type,
void BTM_ReadDevInfo(const RawAddress& remote_bda, tBT_DEVICE_TYPE* p_dev_type,
                     tBLE_ADDR_TYPE* p_addr_type) {
                     tBLE_ADDR_TYPE* p_addr_type) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::BTM_ReadDevInfo(remote_bda, p_dev_type,
  test::mock::stack_btm_ble::BTM_ReadDevInfo(remote_bda, p_dev_type,
                                             p_addr_type);
                                             p_addr_type);
}
}
bool BTM_GetRemoteDeviceName(const RawAddress& bd_addr, BD_NAME bd_name) {
bool BTM_GetRemoteDeviceName(const RawAddress& bd_addr, BD_NAME bd_name) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::BTM_GetRemoteDeviceName(bd_addr, bd_name);
  return test::mock::stack_btm_ble::BTM_GetRemoteDeviceName(bd_addr, bd_name);
}
}
void BTM_SecAddBleDevice(const RawAddress& bd_addr, tBT_DEVICE_TYPE dev_type,
void BTM_SecAddBleDevice(const RawAddress& bd_addr, tBT_DEVICE_TYPE dev_type,
                         tBLE_ADDR_TYPE addr_type) {
                         tBLE_ADDR_TYPE addr_type) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::BTM_SecAddBleDevice(bd_addr, dev_type, addr_type);
  test::mock::stack_btm_ble::BTM_SecAddBleDevice(bd_addr, dev_type, addr_type);
}
}
void BTM_SecAddBleKey(const RawAddress& bd_addr, tBTM_LE_KEY_VALUE* p_le_key,
void BTM_SecAddBleKey(const RawAddress& bd_addr, tBTM_LE_KEY_VALUE* p_le_key,
                      tBTM_LE_KEY_TYPE key_type) {
                      tBTM_LE_KEY_TYPE key_type) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::BTM_SecAddBleKey(bd_addr, p_le_key, key_type);
  test::mock::stack_btm_ble::BTM_SecAddBleKey(bd_addr, p_le_key, key_type);
}
}
void BTM_SecurityGrant(const RawAddress& bd_addr, uint8_t res) {
void BTM_SecurityGrant(const RawAddress& bd_addr, uint8_t res) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::BTM_SecurityGrant(bd_addr, res);
  test::mock::stack_btm_ble::BTM_SecurityGrant(bd_addr, res);
}
}
tBTM_STATUS BTM_SetBleDataLength(const RawAddress& bd_addr,
tBTM_STATUS BTM_SetBleDataLength(const RawAddress& bd_addr,
                                 uint16_t tx_pdu_length) {
                                 uint16_t tx_pdu_length) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::BTM_SetBleDataLength(bd_addr,
  return test::mock::stack_btm_ble::BTM_SetBleDataLength(bd_addr,
                                                         tx_pdu_length);
                                                         tx_pdu_length);
}
}
bool BTM_UseLeLink(const RawAddress& bd_addr) {
bool BTM_UseLeLink(const RawAddress& bd_addr) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::BTM_UseLeLink(bd_addr);
  return test::mock::stack_btm_ble::BTM_UseLeLink(bd_addr);
}
}
uint8_t btm_ble_br_keys_req(tBTM_SEC_DEV_REC* p_dev_rec,
uint8_t btm_ble_br_keys_req(tBTM_SEC_DEV_REC* p_dev_rec,
                            tBTM_LE_IO_REQ* p_data) {
                            tBTM_LE_IO_REQ* p_data) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::btm_ble_br_keys_req(p_dev_rec, p_data);
  return test::mock::stack_btm_ble::btm_ble_br_keys_req(p_dev_rec, p_data);
}
}
void btm_ble_connected(const RawAddress& bda, uint16_t handle, uint8_t enc_mode,
void btm_ble_connected(const RawAddress& bda, uint16_t handle, uint8_t enc_mode,
                       uint8_t role, tBLE_ADDR_TYPE addr_type,
                       uint8_t role, tBLE_ADDR_TYPE addr_type,
                       bool addr_matched,
                       bool addr_matched,
                       bool can_read_discoverable_characteristics) {
                       bool can_read_discoverable_characteristics) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::btm_ble_connected(
  test::mock::stack_btm_ble::btm_ble_connected(
      bda, handle, enc_mode, role, addr_type, addr_matched,
      bda, handle, enc_mode, role, addr_type, addr_matched,
      can_read_discoverable_characteristics);
      can_read_discoverable_characteristics);
@@ -256,135 +256,135 @@ void btm_ble_connected(const RawAddress& bda, uint16_t handle, uint8_t enc_mode,
tBTM_SEC_ACTION btm_ble_determine_security_act(bool is_originator,
tBTM_SEC_ACTION btm_ble_determine_security_act(bool is_originator,
                                               const RawAddress& bdaddr,
                                               const RawAddress& bdaddr,
                                               uint16_t security_required) {
                                               uint16_t security_required) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::btm_ble_determine_security_act(
  return test::mock::stack_btm_ble::btm_ble_determine_security_act(
      is_originator, bdaddr, security_required);
      is_originator, bdaddr, security_required);
}
}
bool btm_ble_get_acl_remote_addr(uint16_t hci_handle, RawAddress& conn_addr,
bool btm_ble_get_acl_remote_addr(uint16_t hci_handle, RawAddress& conn_addr,
                                 tBLE_ADDR_TYPE* p_addr_type) {
                                 tBLE_ADDR_TYPE* p_addr_type) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::btm_ble_get_acl_remote_addr(
  return test::mock::stack_btm_ble::btm_ble_get_acl_remote_addr(
      hci_handle, conn_addr, p_addr_type);
      hci_handle, conn_addr, p_addr_type);
}
}
bool btm_ble_get_enc_key_type(const RawAddress& bd_addr, uint8_t* p_key_types) {
bool btm_ble_get_enc_key_type(const RawAddress& bd_addr, uint8_t* p_key_types) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::btm_ble_get_enc_key_type(bd_addr,
  return test::mock::stack_btm_ble::btm_ble_get_enc_key_type(bd_addr,
                                                             p_key_types);
                                                             p_key_types);
}
}
void btm_ble_increment_sign_ctr(const RawAddress& bd_addr, bool is_local) {
void btm_ble_increment_sign_ctr(const RawAddress& bd_addr, bool is_local) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::btm_ble_increment_sign_ctr(bd_addr, is_local);
  test::mock::stack_btm_ble::btm_ble_increment_sign_ctr(bd_addr, is_local);
}
}
uint8_t btm_ble_io_capabilities_req(tBTM_SEC_DEV_REC* p_dev_rec,
uint8_t btm_ble_io_capabilities_req(tBTM_SEC_DEV_REC* p_dev_rec,
                                    tBTM_LE_IO_REQ* p_data) {
                                    tBTM_LE_IO_REQ* p_data) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::btm_ble_io_capabilities_req(p_dev_rec,
  return test::mock::stack_btm_ble::btm_ble_io_capabilities_req(p_dev_rec,
                                                                p_data);
                                                                p_data);
}
}
void btm_ble_link_encrypted(const RawAddress& bd_addr, uint8_t encr_enable) {
void btm_ble_link_encrypted(const RawAddress& bd_addr, uint8_t encr_enable) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::btm_ble_link_encrypted(bd_addr, encr_enable);
  test::mock::stack_btm_ble::btm_ble_link_encrypted(bd_addr, encr_enable);
}
}
void btm_ble_link_sec_check(const RawAddress& bd_addr,
void btm_ble_link_sec_check(const RawAddress& bd_addr,
                            tBTM_LE_AUTH_REQ auth_req,
                            tBTM_LE_AUTH_REQ auth_req,
                            tBTM_BLE_SEC_REQ_ACT* p_sec_req_act) {
                            tBTM_BLE_SEC_REQ_ACT* p_sec_req_act) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::btm_ble_link_sec_check(bd_addr, auth_req,
  test::mock::stack_btm_ble::btm_ble_link_sec_check(bd_addr, auth_req,
                                                    p_sec_req_act);
                                                    p_sec_req_act);
}
}
void btm_ble_ltk_request(uint16_t handle, uint8_t rand[8], uint16_t ediv) {
void btm_ble_ltk_request(uint16_t handle, uint8_t rand[8], uint16_t ediv) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::btm_ble_ltk_request(handle, rand, ediv);
  test::mock::stack_btm_ble::btm_ble_ltk_request(handle, rand, ediv);
}
}
void btm_ble_ltk_request_reply(const RawAddress& bda, bool use_stk,
void btm_ble_ltk_request_reply(const RawAddress& bda, bool use_stk,
                               const Octet16& stk) {
                               const Octet16& stk) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::btm_ble_ltk_request_reply(bda, use_stk, stk);
  test::mock::stack_btm_ble::btm_ble_ltk_request_reply(bda, use_stk, stk);
}
}
void btm_ble_rand_enc_complete(uint8_t* p, uint16_t op_code,
void btm_ble_rand_enc_complete(uint8_t* p, uint16_t op_code,
                               tBTM_RAND_ENC_CB* p_enc_cplt_cback) {
                               tBTM_RAND_ENC_CB* p_enc_cplt_cback) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::btm_ble_rand_enc_complete(p, op_code,
  test::mock::stack_btm_ble::btm_ble_rand_enc_complete(p, op_code,
                                                       p_enc_cplt_cback);
                                                       p_enc_cplt_cback);
}
}
uint8_t btm_ble_read_sec_key_size(const RawAddress& bd_addr) {
uint8_t btm_ble_read_sec_key_size(const RawAddress& bd_addr) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::btm_ble_read_sec_key_size(bd_addr);
  return test::mock::stack_btm_ble::btm_ble_read_sec_key_size(bd_addr);
}
}
void btm_ble_reset_id(void) {
void btm_ble_reset_id(void) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::btm_ble_reset_id();
  test::mock::stack_btm_ble::btm_ble_reset_id();
}
}
tBTM_STATUS btm_ble_set_encryption(const RawAddress& bd_addr,
tBTM_STATUS btm_ble_set_encryption(const RawAddress& bd_addr,
                                   tBTM_BLE_SEC_ACT sec_act,
                                   tBTM_BLE_SEC_ACT sec_act,
                                   uint8_t link_role) {
                                   uint8_t link_role) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::btm_ble_set_encryption(bd_addr, sec_act,
  return test::mock::stack_btm_ble::btm_ble_set_encryption(bd_addr, sec_act,
                                                           link_role);
                                                           link_role);
}
}
void btm_ble_set_keep_rfu_in_auth_req(bool keep_rfu) {
void btm_ble_set_keep_rfu_in_auth_req(bool keep_rfu) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::btm_ble_set_keep_rfu_in_auth_req(keep_rfu);
  test::mock::stack_btm_ble::btm_ble_set_keep_rfu_in_auth_req(keep_rfu);
}
}
void btm_ble_set_no_disc_if_pair_fail(bool disable_disc) {
void btm_ble_set_no_disc_if_pair_fail(bool disable_disc) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::btm_ble_set_no_disc_if_pair_fail(disable_disc);
  test::mock::stack_btm_ble::btm_ble_set_no_disc_if_pair_fail(disable_disc);
}
}
void btm_ble_set_test_local_sign_cntr_value(bool enable,
void btm_ble_set_test_local_sign_cntr_value(bool enable,
                                            uint32_t test_local_sign_cntr) {
                                            uint32_t test_local_sign_cntr) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::btm_ble_set_test_local_sign_cntr_value(
  test::mock::stack_btm_ble::btm_ble_set_test_local_sign_cntr_value(
      enable, test_local_sign_cntr);
      enable, test_local_sign_cntr);
}
}
void btm_ble_set_test_mac_value(bool enable, uint8_t* p_test_mac_val) {
void btm_ble_set_test_mac_value(bool enable, uint8_t* p_test_mac_val) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::btm_ble_set_test_mac_value(enable, p_test_mac_val);
  test::mock::stack_btm_ble::btm_ble_set_test_mac_value(enable, p_test_mac_val);
}
}
tBTM_STATUS btm_ble_start_encrypt(const RawAddress& bda, bool use_stk,
tBTM_STATUS btm_ble_start_encrypt(const RawAddress& bda, bool use_stk,
                                  Octet16* p_stk) {
                                  Octet16* p_stk) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::btm_ble_start_encrypt(bda, use_stk, p_stk);
  return test::mock::stack_btm_ble::btm_ble_start_encrypt(bda, use_stk, p_stk);
}
}
tL2CAP_LE_RESULT_CODE btm_ble_start_sec_check(const RawAddress& bd_addr,
tL2CAP_LE_RESULT_CODE btm_ble_start_sec_check(const RawAddress& bd_addr,
                                              uint16_t psm, bool is_originator,
                                              uint16_t psm, bool is_originator,
                                              tBTM_SEC_CALLBACK* p_callback,
                                              tBTM_SEC_CALLBACK* p_callback,
                                              void* p_ref_data) {
                                              void* p_ref_data) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::btm_ble_start_sec_check(
  return test::mock::stack_btm_ble::btm_ble_start_sec_check(
      bd_addr, psm, is_originator, p_callback, p_ref_data);
      bd_addr, psm, is_originator, p_callback, p_ref_data);
}
}
void btm_ble_test_command_complete(uint8_t* p) {
void btm_ble_test_command_complete(uint8_t* p) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::btm_ble_test_command_complete(p);
  test::mock::stack_btm_ble::btm_ble_test_command_complete(p);
}
}
void btm_ble_update_sec_key_size(const RawAddress& bd_addr,
void btm_ble_update_sec_key_size(const RawAddress& bd_addr,
                                 uint8_t enc_key_size) {
                                 uint8_t enc_key_size) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::btm_ble_update_sec_key_size(bd_addr, enc_key_size);
  test::mock::stack_btm_ble::btm_ble_update_sec_key_size(bd_addr, enc_key_size);
}
}
bool btm_get_local_div(const RawAddress& bd_addr, uint16_t* p_div) {
bool btm_get_local_div(const RawAddress& bd_addr, uint16_t* p_div) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::btm_get_local_div(bd_addr, p_div);
  return test::mock::stack_btm_ble::btm_get_local_div(bd_addr, p_div);
}
}
tBTM_STATUS btm_proc_smp_cback(tSMP_EVT event, const RawAddress& bd_addr,
tBTM_STATUS btm_proc_smp_cback(tSMP_EVT event, const RawAddress& bd_addr,
                               const tSMP_EVT_DATA* p_data) {
                               const tSMP_EVT_DATA* p_data) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return test::mock::stack_btm_ble::btm_proc_smp_cback(event, bd_addr, p_data);
  return test::mock::stack_btm_ble::btm_proc_smp_cback(event, bd_addr, p_data);
}
}
void btm_sec_save_le_key(const RawAddress& bd_addr, tBTM_LE_KEY_TYPE key_type,
void btm_sec_save_le_key(const RawAddress& bd_addr, tBTM_LE_KEY_TYPE key_type,
                         tBTM_LE_KEY_VALUE* p_keys, bool pass_to_application) {
                         tBTM_LE_KEY_VALUE* p_keys, bool pass_to_application) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::btm_sec_save_le_key(bd_addr, key_type, p_keys,
  test::mock::stack_btm_ble::btm_sec_save_le_key(bd_addr, key_type, p_keys,
                                                 pass_to_application);
                                                 pass_to_application);
}
}
void doNothing(uint8_t* data, uint16_t len) {
void doNothing(uint8_t* data, uint16_t len) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::doNothing(data, len);
  test::mock::stack_btm_ble::doNothing(data, len);
}
}
void read_phy_cb(
void read_phy_cb(
    base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)> cb,
    base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)> cb,
    uint8_t* data, uint16_t len) {
    uint8_t* data, uint16_t len) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  test::mock::stack_btm_ble::read_phy_cb(cb, data, len);
  test::mock::stack_btm_ble::read_phy_cb(cb, data, len);
}
}
// Mocked functions complete
// Mocked functions complete
+48 −52
Original line number Original line Diff line number Diff line
@@ -65,98 +65,98 @@ using SyncLostCb = base::Callback<void(uint16_t /*sync_handle*/)>;
using SyncTransferCb = base::Callback<void(uint8_t /*status*/, RawAddress)>;
using SyncTransferCb = base::Callback<void(uint8_t /*status*/, RawAddress)>;


bool BTM_BleConfigPrivacy(bool privacy_mode) {
bool BTM_BleConfigPrivacy(bool privacy_mode) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return false;
  return false;
}
}
bool BTM_BleLocalPrivacyEnabled(void) {
bool BTM_BleLocalPrivacyEnabled(void) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return false;
  return false;
}
}
bool btm_ble_cancel_remote_name(const RawAddress& remote_bda) {
bool btm_ble_cancel_remote_name(const RawAddress& remote_bda) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return false;
  return false;
}
}
bool btm_ble_clear_topology_mask(tBTM_BLE_STATE_MASK request_state_mask) {
bool btm_ble_clear_topology_mask(tBTM_BLE_STATE_MASK request_state_mask) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return false;
  return false;
}
}
bool btm_ble_set_topology_mask(tBTM_BLE_STATE_MASK request_state_mask) {
bool btm_ble_set_topology_mask(tBTM_BLE_STATE_MASK request_state_mask) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return false;
  return false;
}
}
bool btm_ble_topology_check(tBTM_BLE_STATE_MASK request_state_mask) {
bool btm_ble_topology_check(tBTM_BLE_STATE_MASK request_state_mask) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return false;
  return false;
}
}
tBTM_STATUS BTM_BleObserve(bool start, uint8_t duration,
tBTM_STATUS BTM_BleObserve(bool start, uint8_t duration,
                           tBTM_INQ_RESULTS_CB* p_results_cb,
                           tBTM_INQ_RESULTS_CB* p_results_cb,
                           tBTM_CMPL_CB* p_cmpl_cb) {
                           tBTM_CMPL_CB* p_cmpl_cb) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return BTM_SUCCESS;
  return BTM_SUCCESS;
}
}
void BTM_BleOpportunisticObserve(bool enable,
void BTM_BleOpportunisticObserve(bool enable,
                                 tBTM_INQ_RESULTS_CB* p_results_cb) {
                                 tBTM_INQ_RESULTS_CB* p_results_cb) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void BTM_BleTargetAnnouncementObserve(bool enable,
void BTM_BleTargetAnnouncementObserve(bool enable,
                                      tBTM_INQ_RESULTS_CB* p_results_cb) {
                                      tBTM_INQ_RESULTS_CB* p_results_cb) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
tBTM_STATUS btm_ble_read_remote_name(const RawAddress& remote_bda,
tBTM_STATUS btm_ble_read_remote_name(const RawAddress& remote_bda,
                                     tBTM_CMPL_CB* p_cb) {
                                     tBTM_CMPL_CB* p_cb) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return BTM_SUCCESS;
  return BTM_SUCCESS;
}
}
tBTM_STATUS btm_ble_set_connectability(uint16_t combined_mode) {
tBTM_STATUS btm_ble_set_connectability(uint16_t combined_mode) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return BTM_SUCCESS;
  return BTM_SUCCESS;
}
}
tBTM_STATUS btm_ble_set_discoverability(uint16_t combined_mode) {
tBTM_STATUS btm_ble_set_discoverability(uint16_t combined_mode) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return BTM_SUCCESS;
  return BTM_SUCCESS;
}
}
tBTM_STATUS btm_ble_start_inquiry(uint8_t duration) {
tBTM_STATUS btm_ble_start_inquiry(uint8_t duration) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return BTM_SUCCESS;
  return BTM_SUCCESS;
}
}
uint16_t BTM_BleReadConnectability() {
uint16_t BTM_BleReadConnectability() {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return 0;
  return 0;
}
}
uint16_t BTM_BleReadDiscoverability() {
uint16_t BTM_BleReadDiscoverability() {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return 0;
  return 0;
}
}
uint8_t BTM_BleMaxMultiAdvInstanceCount(void) {
uint8_t BTM_BleMaxMultiAdvInstanceCount(void) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
  return 0;
  return 0;
}
}
void BTM_BleGetDynamicAudioBuffer(
void BTM_BleGetDynamicAudioBuffer(
    tBTM_BT_DYNAMIC_AUDIO_BUFFER_CB p_dynamic_audio_buffer_cb[]) {
    tBTM_BT_DYNAMIC_AUDIO_BUFFER_CB p_dynamic_audio_buffer_cb[]) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void BTM_BleGetVendorCapabilities(tBTM_BLE_VSC_CB* p_cmn_vsc_cb) {
void BTM_BleGetVendorCapabilities(tBTM_BLE_VSC_CB* p_cmn_vsc_cb) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void BTM_BleSetScanParams(uint32_t scan_interval, uint32_t scan_window,
void BTM_BleSetScanParams(uint32_t scan_interval, uint32_t scan_window,
                          tBLE_SCAN_MODE scan_mode,
                          tBLE_SCAN_MODE scan_mode,
                          base::Callback<void(uint8_t)> cb) {
                          base::Callback<void(uint8_t)> cb) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void btm_ble_decrement_link_topology_mask(uint8_t link_role) {
void btm_ble_decrement_link_topology_mask(uint8_t link_role) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void btm_ble_dir_adv_tout(void) { mock_function_count_map[__func__]++; }
void btm_ble_dir_adv_tout(void) { inc_func_call_count(__func__); }
void btm_ble_free() { mock_function_count_map[__func__]++; }
void btm_ble_free() { inc_func_call_count(__func__); }
void btm_ble_increment_link_topology_mask(uint8_t link_role) {
void btm_ble_increment_link_topology_mask(uint8_t link_role) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void btm_ble_init(void) { mock_function_count_map[__func__]++; }
void btm_ble_init(void) { inc_func_call_count(__func__); }
void btm_ble_process_adv_addr(RawAddress& bda, tBLE_ADDR_TYPE* addr_type) {
void btm_ble_process_adv_addr(RawAddress& bda, tBLE_ADDR_TYPE* addr_type) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void btm_ble_process_adv_pkt(uint8_t data_len, const uint8_t* data) {
void btm_ble_process_adv_pkt(uint8_t data_len, const uint8_t* data) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void btm_ble_process_adv_pkt_cont(uint16_t evt_type, tBLE_ADDR_TYPE addr_type,
void btm_ble_process_adv_pkt_cont(uint16_t evt_type, tBLE_ADDR_TYPE addr_type,
                                  const RawAddress& bda, uint8_t primary_phy,
                                  const RawAddress& bda, uint8_t primary_phy,
@@ -165,36 +165,36 @@ void btm_ble_process_adv_pkt_cont(uint16_t evt_type, tBLE_ADDR_TYPE addr_type,
                                  int8_t rssi, uint16_t periodic_adv_int,
                                  int8_t rssi, uint16_t periodic_adv_int,
                                  uint8_t data_len, const uint8_t* data,
                                  uint8_t data_len, const uint8_t* data,
                                  const RawAddress& original_bda) {
                                  const RawAddress& original_bda) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void btm_ble_process_adv_pkt_cont_for_inquiry(
void btm_ble_process_adv_pkt_cont_for_inquiry(
    uint16_t evt_type, tBLE_ADDR_TYPE addr_type, const RawAddress& bda,
    uint16_t evt_type, tBLE_ADDR_TYPE addr_type, const RawAddress& bda,
    uint8_t primary_phy, uint8_t secondary_phy, uint8_t advertising_sid,
    uint8_t primary_phy, uint8_t secondary_phy, uint8_t advertising_sid,
    int8_t tx_power, int8_t rssi, uint16_t periodic_adv_int,
    int8_t tx_power, int8_t rssi, uint16_t periodic_adv_int,
    std::vector<uint8_t> advertising_data) {
    std::vector<uint8_t> advertising_data) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void btm_ble_process_ext_adv_pkt(uint8_t data_len, const uint8_t* data) {
void btm_ble_process_ext_adv_pkt(uint8_t data_len, const uint8_t* data) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void btm_ble_process_phy_update_pkt(uint8_t len, uint8_t* data) {
void btm_ble_process_phy_update_pkt(uint8_t len, uint8_t* data) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void btm_ble_read_remote_features_complete(uint8_t* p) {
void btm_ble_read_remote_features_complete(uint8_t* p) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void btm_ble_read_remote_name_cmpl(bool status, const RawAddress& bda,
void btm_ble_read_remote_name_cmpl(bool status, const RawAddress& bda,
                                   uint16_t length, char* p_name) {
                                   uint16_t length, char* p_name) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void btm_ble_set_adv_flag(uint16_t connect_mode, uint16_t disc_mode) {
void btm_ble_set_adv_flag(uint16_t connect_mode, uint16_t disc_mode) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void btm_ble_stop_inquiry(void) { mock_function_count_map[__func__]++; }
void btm_ble_stop_inquiry(void) { inc_func_call_count(__func__); }
void btm_ble_update_dmt_flag_bits(uint8_t* adv_flag_value,
void btm_ble_update_dmt_flag_bits(uint8_t* adv_flag_value,
                                  const uint16_t connect_mode,
                                  const uint16_t connect_mode,
                                  const uint16_t disc_mode) {
                                  const uint16_t disc_mode) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void btm_ble_update_inq_result(tINQ_DB_ENT* p_i, uint8_t addr_type,
void btm_ble_update_inq_result(tINQ_DB_ENT* p_i, uint8_t addr_type,
                               const RawAddress& bda, uint16_t evt_type,
                               const RawAddress& bda, uint16_t evt_type,
@@ -202,52 +202,48 @@ void btm_ble_update_inq_result(tINQ_DB_ENT* p_i, uint8_t addr_type,
                               uint8_t advertising_sid, int8_t tx_power,
                               uint8_t advertising_sid, int8_t tx_power,
                               int8_t rssi, uint16_t periodic_adv_int,
                               int8_t rssi, uint16_t periodic_adv_int,
                               std::vector<uint8_t> const& data) {
                               std::vector<uint8_t> const& data) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void btm_ble_update_mode_operation(uint8_t link_role, const RawAddress* bd_addr,
void btm_ble_update_mode_operation(uint8_t link_role, const RawAddress* bd_addr,
                                   tHCI_STATUS status) {
                                   tHCI_STATUS status) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void btm_ble_write_adv_enable_complete(uint8_t* p) {
void btm_ble_write_adv_enable_complete(uint8_t* p) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
void btm_clear_all_pending_le_entry(void) {
  mock_function_count_map[__func__]++;
}
}
void btm_clear_all_pending_le_entry(void) { inc_func_call_count(__func__); }
void btm_send_hci_set_scan_params(uint8_t scan_type, uint16_t scan_int,
void btm_send_hci_set_scan_params(uint8_t scan_type, uint16_t scan_int,
                                  uint16_t scan_win,
                                  uint16_t scan_win,
                                  tBLE_ADDR_TYPE addr_type_own,
                                  tBLE_ADDR_TYPE addr_type_own,
                                  uint8_t scan_filter_policy) {
                                  uint8_t scan_filter_policy) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void BTM_BleStartPeriodicSync(uint8_t adv_sid, RawAddress address,
void BTM_BleStartPeriodicSync(uint8_t adv_sid, RawAddress address,
                              uint16_t skip, uint16_t timeout,
                              uint16_t skip, uint16_t timeout,
                              StartSyncCb syncCb, SyncReportCb reportCb,
                              StartSyncCb syncCb, SyncReportCb reportCb,
                              SyncLostCb lostCb) {
                              SyncLostCb lostCb) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
void BTM_BleStopPeriodicSync(uint16_t handle) {
  mock_function_count_map[__func__]++;
}
}
void BTM_BleStopPeriodicSync(uint16_t handle) { inc_func_call_count(__func__); }
void BTM_BleCancelPeriodicSync(uint8_t adv_sid, RawAddress address) {
void BTM_BleCancelPeriodicSync(uint8_t adv_sid, RawAddress address) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void BTM_BlePeriodicSyncTransfer(RawAddress addr, uint16_t service_data,
void BTM_BlePeriodicSyncTransfer(RawAddress addr, uint16_t service_data,
                                 uint16_t sync_handle, SyncTransferCb cb) {
                                 uint16_t sync_handle, SyncTransferCb cb) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void BTM_BlePeriodicSyncSetInfo(RawAddress addr, uint16_t service_data,
void BTM_BlePeriodicSyncSetInfo(RawAddress addr, uint16_t service_data,
                                uint8_t adv_handle, SyncTransferCb cb) {
                                uint8_t adv_handle, SyncTransferCb cb) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void BTM_BlePeriodicSyncTxParameters(RawAddress addr, uint8_t mode,
void BTM_BlePeriodicSyncTxParameters(RawAddress addr, uint8_t mode,
                                     uint16_t skip, uint16_t timeout,
                                     uint16_t skip, uint16_t timeout,
                                     StartSyncCb syncCb) {
                                     StartSyncCb syncCb) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void btm_ble_periodic_adv_sync_tx_rcvd(uint8_t* p, uint16_t param_len) {
void btm_ble_periodic_adv_sync_tx_rcvd(uint8_t* p, uint16_t param_len) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
void btm_ble_biginfo_adv_report_rcvd(uint8_t* p, uint16_t param_len) {
void btm_ble_biginfo_adv_report_rcvd(uint8_t* p, uint16_t param_len) {
  mock_function_count_map[__func__]++;
  inc_func_call_count(__func__);
}
}
+20 −22

File changed.

Preview size limit exceeded, changes collapsed.

+63 −65

File changed.

Preview size limit exceeded, changes collapsed.