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

Commit 399e7474 authored by Chris Manton's avatar Chris Manton
Browse files

mock: [22/63] Remove BTM_GetPeerDeviceTypeFromFeatures

Use get_btm_client_interface() instead

Bug: 352129816
Test: m .
Flag: EXEMPT, Test infrastructure

Change-Id: I3fe57804d0c2671e86378acfb981fe39b25831de
parent e9f282e0
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@ namespace stack_btm_sec {
// Function state capture and return values, if needed
struct BTM_CanReadDiscoverableCharacteristics BTM_CanReadDiscoverableCharacteristics;
struct BTM_ConfirmReqReply BTM_ConfirmReqReply;
struct BTM_GetPeerDeviceTypeFromFeatures BTM_GetPeerDeviceTypeFromFeatures;
struct BTM_IsAuthenticated BTM_IsAuthenticated;
struct BTM_IsEncrypted BTM_IsEncrypted;
struct BTM_IsLinkKeyAuthed BTM_IsLinkKeyAuthed;
@@ -113,7 +112,6 @@ namespace mock {
namespace stack_btm_sec {

bool BTM_CanReadDiscoverableCharacteristics::return_value = false;
tBT_DEVICE_TYPE BTM_GetPeerDeviceTypeFromFeatures::return_value = 0;
bool BTM_IsAuthenticated::return_value = false;
bool BTM_IsEncrypted::return_value = false;
bool BTM_IsLinkKeyAuthed::return_value = false;
@@ -153,10 +151,6 @@ void BTM_ConfirmReqReply(tBTM_STATUS res, const RawAddress& bd_addr) {
  inc_func_call_count(__func__);
  test::mock::stack_btm_sec::BTM_ConfirmReqReply(res, bd_addr);
}
tBT_DEVICE_TYPE BTM_GetPeerDeviceTypeFromFeatures(const RawAddress& bd_addr) {
  inc_func_call_count(__func__);
  return test::mock::stack_btm_sec::BTM_GetPeerDeviceTypeFromFeatures(bd_addr);
}
bool BTM_IsAuthenticated(const RawAddress& bd_addr, tBT_TRANSPORT transport) {
  inc_func_call_count(__func__);
  return test::mock::stack_btm_sec::BTM_IsAuthenticated(bd_addr, transport);
+0 −11
Original line number Diff line number Diff line
@@ -66,17 +66,6 @@ struct BTM_ConfirmReqReply {
};
extern struct BTM_ConfirmReqReply BTM_ConfirmReqReply;

// Name: BTM_GetPeerDeviceTypeFromFeatures
// Params: const RawAddress& bd_addr
// Return: tBT_DEVICE_TYPE
struct BTM_GetPeerDeviceTypeFromFeatures {
  static tBT_DEVICE_TYPE return_value;
  std::function<tBT_DEVICE_TYPE(const RawAddress& bd_addr)> body{
          [](const RawAddress& /* bd_addr */) { return return_value; }};
  tBT_DEVICE_TYPE operator()(const RawAddress& bd_addr) { return body(bd_addr); }
};
extern struct BTM_GetPeerDeviceTypeFromFeatures BTM_GetPeerDeviceTypeFromFeatures;

// Name: BTM_IsAuthenticated
// Params: const RawAddress& bd_addr, tBT_TRANSPORT transport
// Return: bool