// TODO Issue LeReadRemoteFeatures Command
}
+ bluetooth::hci::AddressWithType GetLocalAddressWithType() {
+ return connection_->GetLocalAddress();
+ }
+
void OnConnectionUpdate(hci::ErrorCode hci_status,
uint16_t connection_interval,
uint16_t connection_latency,
is_locally_initiated, reason)));
}
+bluetooth::hci::AddressWithType shim::legacy::Acl::GetConnectionLocalAddress(
+ const RawAddress& remote_bda) {
+ bluetooth::hci::AddressWithType address_with_type;
+ auto remote_address = ToGdAddress(remote_bda);
+ for (auto& [handle, connection] : pimpl_->handle_to_le_connection_map_) {
+ if (connection->GetRemoteAddressWithType().GetAddress() == remote_address) {
+ return connection->GetLocalAddressWithType();
+ }
+ }
+ LOG_WARN("address not found!");
+ return address_with_type;
+}
+
void shim::legacy::Acl::OnLeLinkDisconnected(HciHandle handle,
hci::ErrorCode reason) {
hci::AddressWithType remote_address_with_type =
std::unique_ptr<hci::acl_manager::LeAclConnection>) override;
void OnLeConnectFail(hci::AddressWithType, hci::ErrorCode reason) override;
void OnLeLinkDisconnected(uint16_t handle, hci::ErrorCode reason);
+ bluetooth::hci::AddressWithType GetConnectionLocalAddress(
+ const RawAddress& remote_bda);
// LinkConnectionInterface
void CreateClassicConnection(const hci::Address& address) override;
void bluetooth::shim::ACL_IgnoreAllLeConnections() {
return Stack::GetInstance()->GetAcl()->ClearAcceptList();
}
+
+void bluetooth::shim::ACL_ReadConnectionAddress(const RawAddress& pseudo_addr,
+ RawAddress& conn_addr,
+ uint8_t* p_addr_type) {
+ auto local_address =
+ Stack::GetInstance()->GetAcl()->GetConnectionLocalAddress(pseudo_addr);
+ conn_addr = ToRawAddress(local_address.GetAddress());
+ *p_addr_type = static_cast<uint8_t>(local_address.GetAddressType());
+}
\ No newline at end of file
void ACL_Shutdown();
void ACL_IgnoreAllLeConnections();
+void ACL_ReadConnectionAddress(const RawAddress& pseudo_addr,
+ RawAddress& conn_addr, uint8_t* p_addr_type);
+
} // namespace shim
} // namespace bluetooth
bluetooth::shim::L2CA_ReadConnectionAddr(remote_bda, local_conn_addr,
p_addr_type);
return;
+ } else if (bluetooth::shim::is_gd_scanning_enabled()) {
+ bluetooth::shim::ACL_ReadConnectionAddress(remote_bda, local_conn_addr,
+ p_addr_type);
+ return;
}
tACL_CONN* p_acl = internal_.btm_bda_to_acl(remote_bda, BT_TRANSPORT_LE);
void bluetooth::shim::ACL_IgnoreAllLeConnections() {
mock_function_count_map[__func__]++;
}
+void bluetooth::shim::ACL_ReadConnectionAddress(const RawAddress& pseudo_addr,
+ RawAddress& conn_addr,
+ uint8_t* p_addr_type) {
+ mock_function_count_map[__func__]++;
+}
\ No newline at end of file