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

Commit 40a29d98 authored by Chris Manton's avatar Chris Manton
Browse files

legacy: Remove all of hci_layer_get_test_interface

Bug: 197150934
Tag: #refactor
Test: gd/cert/run

Change-Id: I0d17df01c0a9804f6335659edc308f967edada24
parent 5f45d733
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -86,10 +86,5 @@ typedef struct hci_t {

const hci_t* hci_layer_get_interface();

const hci_t* hci_layer_get_test_interface(
    const allocator_t* buffer_allocator_interface,
    const btsnoop_t* btsnoop_interface,
    const packet_fragmenter_t* packet_fragmenter_interface);

void hci_layer_cleanup_interface();
bool hci_is_root_inflammation_event_received();
+0 −12
Original line number Diff line number Diff line
@@ -905,15 +905,3 @@ const hci_t* hci_layer_get_interface_legacy() {
const hci_t* hci_layer_get_interface() {
  return bluetooth::shim::hci_layer_get_interface();
}

const hci_t* hci_layer_get_test_interface(
    const allocator_t* buffer_allocator_interface,
    const btsnoop_t* btsnoop_interface,
    const packet_fragmenter_t* packet_fragmenter_interface) {
  buffer_allocator = buffer_allocator_interface;
  btsnoop = btsnoop_interface;
  packet_fragmenter = packet_fragmenter_interface;

  init_layer_interface();
  return &interface;
}
+0 −11
Original line number Diff line number Diff line
@@ -62,7 +62,6 @@ struct hci_is_root_inflammation_event_received
struct handle_root_inflammation_event handle_root_inflammation_event;
struct hci_layer_cleanup_interface hci_layer_cleanup_interface;
struct hci_layer_get_interface hci_layer_get_interface;
struct hci_layer_get_test_interface hci_layer_get_test_interface;

}  // namespace hci_layer
}  // namespace mock
@@ -113,14 +112,4 @@ const hci_t* hci_layer_get_interface() {
  mock_function_count_map[__func__]++;
  return test::mock::hci_layer::hci_layer_get_interface();
}
const hci_t* hci_layer_get_test_interface(
    const allocator_t* buffer_allocator_interface,
    const btsnoop_t* btsnoop_interface,
    const packet_fragmenter_t* packet_fragmenter_interface) {
  mock_function_count_map[__func__]++;
  return test::mock::hci_layer::hci_layer_get_test_interface(
      buffer_allocator_interface, btsnoop_interface,
      packet_fragmenter_interface);
}

// END mockcify generation
+0 −24
Original line number Diff line number Diff line
@@ -138,30 +138,6 @@ struct hci_layer_get_interface {
  const hci_t* operator()() { return body(); };
};
extern struct hci_layer_get_interface hci_layer_get_interface;
// Name: hci_layer_get_test_interface
// Params:  const allocator_t* buffer_allocator_interface, const btsnoop_t*
// btsnoop_interface, const packet_fragmenter_t* packet_fragmenter_interface
// Returns: const hci_t*
struct hci_layer_get_test_interface {
  std::function<const hci_t*(
      const allocator_t* buffer_allocator_interface,
      const btsnoop_t* btsnoop_interface,
      const packet_fragmenter_t* packet_fragmenter_interface)>
      body{[](const allocator_t* buffer_allocator_interface,
              const btsnoop_t* btsnoop_interface,
              const packet_fragmenter_t* packet_fragmenter_interface) {
        return nullptr;
      }};
  const hci_t* operator()(
      const allocator_t* buffer_allocator_interface,
      const btsnoop_t* btsnoop_interface,
      const packet_fragmenter_t* packet_fragmenter_interface) {
    return body(buffer_allocator_interface, btsnoop_interface,
                packet_fragmenter_interface);
  };
};
extern struct hci_layer_get_test_interface hci_layer_get_test_interface;

}  // namespace hci_layer
}  // namespace mock
}  // namespace test