Loading system/main/shim/acl_api.cc +19 −0 Original line number Diff line number Diff line Loading @@ -107,3 +107,22 @@ void bluetooth::shim::ACL_ReadConnectionAddress(const RawAddress& pseudo_addr, conn_addr = ToRawAddress(local_address.GetAddress()); *p_addr_type = static_cast<uint8_t>(local_address.GetAddressType()); } void bluetooth::shim::ACL_AddToAddressResolution( const tBLE_BD_ADDR& legacy_address_with_type, const Octet16& peer_irk, const Octet16& local_irk) { Stack::GetInstance()->GetAcl()->AddToAddressResolution( ToAddressWithType(legacy_address_with_type.bda, legacy_address_with_type.type), peer_irk, local_irk); } void bluetooth::shim::ACL_RemoveFromAddressResolution( const tBLE_BD_ADDR& legacy_address_with_type) { Stack::GetInstance()->GetAcl()->RemoveFromAddressResolution(ToAddressWithType( legacy_address_with_type.bda, legacy_address_with_type.type)); } void bluetooth::shim::ACL_ClearAddressResolution() { Stack::GetInstance()->GetAcl()->ClearAddressResolution(); } system/main/shim/acl_api.h +7 −0 Original line number Diff line number Diff line Loading @@ -40,5 +40,12 @@ void ACL_IgnoreAllLeConnections(); void ACL_ReadConnectionAddress(const RawAddress& pseudo_addr, RawAddress& conn_addr, uint8_t* p_addr_type); void ACL_AddToAddressResolution(const tBLE_BD_ADDR& legacy_address_with_type, const Octet16& peer_irk, const Octet16& local_irk); void ACL_RemoveFromAddressResolution( const tBLE_BD_ADDR& legacy_address_with_type); void ACL_ClearAddressResolution(); } // namespace shim } // namespace bluetooth system/test/mock/mock_main_shim_acl_api.cc +15 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ extern std::map<std::string, int> mock_function_count_map; #include "main/shim/acl_api.h" #include "stack/include/bt_hdr.h" #include "stack/include/bt_octets.h" #include "types/ble_address_with_type.h" #include "types/raw_address.h" Loading Loading @@ -71,3 +72,17 @@ void bluetooth::shim::ACL_ReadConnectionAddress(const RawAddress& pseudo_addr, uint8_t* p_addr_type) { mock_function_count_map[__func__]++; } void bluetooth::shim::ACL_AddToAddressResolution( const tBLE_BD_ADDR& legacy_address_with_type, const Octet16& peer_irk, const Octet16& local_irk) { mock_function_count_map[__func__]++; } void bluetooth::shim::ACL_RemoveFromAddressResolution( const tBLE_BD_ADDR& legacy_address_with_type) { mock_function_count_map[__func__]++; } void bluetooth::shim::ACL_ClearAddressResolution() { mock_function_count_map[__func__]++; } Loading
system/main/shim/acl_api.cc +19 −0 Original line number Diff line number Diff line Loading @@ -107,3 +107,22 @@ void bluetooth::shim::ACL_ReadConnectionAddress(const RawAddress& pseudo_addr, conn_addr = ToRawAddress(local_address.GetAddress()); *p_addr_type = static_cast<uint8_t>(local_address.GetAddressType()); } void bluetooth::shim::ACL_AddToAddressResolution( const tBLE_BD_ADDR& legacy_address_with_type, const Octet16& peer_irk, const Octet16& local_irk) { Stack::GetInstance()->GetAcl()->AddToAddressResolution( ToAddressWithType(legacy_address_with_type.bda, legacy_address_with_type.type), peer_irk, local_irk); } void bluetooth::shim::ACL_RemoveFromAddressResolution( const tBLE_BD_ADDR& legacy_address_with_type) { Stack::GetInstance()->GetAcl()->RemoveFromAddressResolution(ToAddressWithType( legacy_address_with_type.bda, legacy_address_with_type.type)); } void bluetooth::shim::ACL_ClearAddressResolution() { Stack::GetInstance()->GetAcl()->ClearAddressResolution(); }
system/main/shim/acl_api.h +7 −0 Original line number Diff line number Diff line Loading @@ -40,5 +40,12 @@ void ACL_IgnoreAllLeConnections(); void ACL_ReadConnectionAddress(const RawAddress& pseudo_addr, RawAddress& conn_addr, uint8_t* p_addr_type); void ACL_AddToAddressResolution(const tBLE_BD_ADDR& legacy_address_with_type, const Octet16& peer_irk, const Octet16& local_irk); void ACL_RemoveFromAddressResolution( const tBLE_BD_ADDR& legacy_address_with_type); void ACL_ClearAddressResolution(); } // namespace shim } // namespace bluetooth
system/test/mock/mock_main_shim_acl_api.cc +15 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ extern std::map<std::string, int> mock_function_count_map; #include "main/shim/acl_api.h" #include "stack/include/bt_hdr.h" #include "stack/include/bt_octets.h" #include "types/ble_address_with_type.h" #include "types/raw_address.h" Loading Loading @@ -71,3 +72,17 @@ void bluetooth::shim::ACL_ReadConnectionAddress(const RawAddress& pseudo_addr, uint8_t* p_addr_type) { mock_function_count_map[__func__]++; } void bluetooth::shim::ACL_AddToAddressResolution( const tBLE_BD_ADDR& legacy_address_with_type, const Octet16& peer_irk, const Octet16& local_irk) { mock_function_count_map[__func__]++; } void bluetooth::shim::ACL_RemoveFromAddressResolution( const tBLE_BD_ADDR& legacy_address_with_type) { mock_function_count_map[__func__]++; } void bluetooth::shim::ACL_ClearAddressResolution() { mock_function_count_map[__func__]++; }