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

Commit 563d72ff authored by Chris Manton's avatar Chris Manton
Browse files

Add API stack/acl/btm_acl::acl_get_transport_from_handle

Working towards encapsulation of tACL_CONN

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I56d631e9f6e8d78e114ff37fa940aeba2f72722b
parent 0d99da99
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2744,3 +2744,11 @@ bool acl_is_transport_le_from_handle(uint16_t handle) {
  }
  return p_acl->transport == BT_TRANSPORT_LE;
}

tBT_TRANSPORT acl_get_transport_from_handle(uint16_t handle) {
  tACL_CONN* p_acl = acl_get_connection_from_handle(handle);
  if (p_acl == nullptr) {
    return BT_TRANSPORT_INVALID;
  }
  return p_acl->transport;
}
+2 −0
Original line number Diff line number Diff line
@@ -291,3 +291,5 @@ void btm_cont_rswitch_from_handle(uint16_t hci_handle);
uint8_t acl_link_role(const RawAddress& remote_bda, tBT_TRANSPORT transport);

bool acl_is_transport_le_from_handle(uint16_t handle);

tBT_TRANSPORT acl_get_transport_from_handle(uint16_t handle);