summaryrefslogtreecommitdiff
path: root/system/test
diff options
context:
space:
mode:
author Henri Chataing <henrichataing@google.com> 2025-02-26 14:40:34 -0800
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2025-02-26 14:40:34 -0800
commitb504bc2074c1a48cf1894f67714fbdcbae943c74 (patch)
treed02afa1af266ba057d05809e5acebd9aefd58f52 /system/test
parentbb4760088be7446302481ce4f4309f48f1628088 (diff)
parent138659ad3ff2961010b9cacd36fceb36ba73dcce (diff)
Merge "Enforce -Wmissing-prototypes" into main
Diffstat (limited to 'system/test')
-rw-r--r--system/test/common/jni_thread.cc9
-rw-r--r--system/test/common/main_handler.cc5
-rw-r--r--system/test/common/stack_config.cc52
-rw-r--r--system/test/common/sync_main_handler.cc5
-rw-r--r--system/test/fake/fake_looper.cc5
-rw-r--r--system/test/headless/headless.cc81
-rw-r--r--system/test/headless/log.cc5
-rw-r--r--system/test/headless/messenger.cc5
-rw-r--r--system/test/headless/read/name.cc5
-rw-r--r--system/test/headless/util.cc5
-rw-r--r--system/test/mock/mock_audio_hal_interface_a2dp_encoding.cc3
-rw-r--r--system/test/mock/mock_bluetooth_interface.cc4
-rw-r--r--system/test/mock/mock_bta_ag_api.cc4
-rw-r--r--system/test/mock/mock_bta_ag_sco.cc9
-rw-r--r--system/test/mock/mock_bta_ag_sco.h12
-rw-r--r--system/test/mock/mock_bta_ar.cc4
-rw-r--r--system/test/mock/mock_bta_av_ci.cc4
-rw-r--r--system/test/mock/mock_bta_dm_act.cc16
-rw-r--r--system/test/mock/mock_bta_dm_act.h24
-rw-r--r--system/test/mock/mock_bta_dm_api.cc13
-rw-r--r--system/test/mock/mock_bta_dm_api.h21
-rw-r--r--system/test/mock/mock_bta_dm_main.cc4
-rw-r--r--system/test/mock/mock_bta_gattc_api.cc4
-rw-r--r--system/test/mock/mock_bta_gatts_api.cc3
-rw-r--r--system/test/mock/mock_bta_hh_utils.cc9
-rw-r--r--system/test/mock/mock_bta_hh_utils.h11
-rw-r--r--system/test/mock/mock_bta_pan_api.cc3
-rw-r--r--system/test/mock/mock_bta_sdp_api.cc8
-rw-r--r--system/test/mock/mock_bta_sdp_api.h9
-rw-r--r--system/test/mock/mock_bta_sys_conn.cc5
-rw-r--r--system/test/mock/mock_bta_sys_main.cc3
-rw-r--r--system/test/mock/mock_btif_av.cc3
-rw-r--r--system/test/mock/mock_btif_bluetooth.cc39
-rw-r--r--system/test/mock/mock_btif_bluetooth.h64
-rw-r--r--system/test/mock/mock_btif_bqr.cc41
-rw-r--r--system/test/mock/mock_btif_bta_pan_co_rx.cc4
-rw-r--r--system/test/mock/mock_btif_co_bta_av_co.cc5
-rw-r--r--system/test/mock/mock_btif_co_bta_dm_co.cc8
-rw-r--r--system/test/mock/mock_btif_co_bta_hh_co.cc3
-rw-r--r--system/test/mock/mock_btif_config.cc4
-rw-r--r--system/test/mock/mock_btif_core.cc4
-rw-r--r--system/test/mock/mock_btif_dm.cc16
-rw-r--r--system/test/mock/mock_btif_hf.cc4
-rw-r--r--system/test/mock/mock_btif_profile_storage.cc5
-rw-r--r--system/test/mock/mock_btif_sock_l2cap.cc4
-rw-r--r--system/test/mock/mock_btif_sock_rfc.cc23
-rw-r--r--system/test/mock/mock_btif_sock_rfc.h40
-rw-r--r--system/test/mock/mock_btif_stack_manager.cc4
-rw-r--r--system/test/mock/mock_btif_storage.cc32
-rw-r--r--system/test/mock/mock_btif_storage.h53
-rw-r--r--system/test/mock/mock_btif_util.cc60
-rw-r--r--system/test/mock/mock_btif_util.h112
-rw-r--r--system/test/mock/mock_device_esco_parameters.cc13
-rw-r--r--system/test/mock/mock_device_esco_parameters.h6
-rw-r--r--system/test/mock/mock_device_interop.cc10
-rw-r--r--system/test/mock/mock_device_interop.h11
-rw-r--r--system/test/mock/mock_device_iot_config.cc4
-rw-r--r--system/test/mock/mock_jni_thread.cc3
-rw-r--r--system/test/mock/mock_main_shim_acl.cc5
-rw-r--r--system/test/mock/mock_main_shim_acl_interface.cc7
-rw-r--r--system/test/mock/mock_main_shim_hci_layer.cc22
-rw-r--r--system/test/mock/mock_main_shim_hci_layer.h33
-rw-r--r--system/test/mock/mock_osi_future.cc8
-rw-r--r--system/test/mock/mock_osi_future.h11
-rw-r--r--system/test/mock/mock_osi_list.cc8
-rw-r--r--system/test/mock/mock_osi_list.h15
-rw-r--r--system/test/mock/mock_osi_mutex.cc4
-rw-r--r--system/test/mock/mock_osi_properties.cc4
-rw-r--r--system/test/mock/mock_osi_properties.h3
-rw-r--r--system/test/mock/mock_osi_socket.cc4
-rw-r--r--system/test/mock/mock_osi_thread_scheduler.cc55
-rw-r--r--system/test/mock/mock_osi_thread_scheduler.h62
-rw-r--r--system/test/mock/mock_osi_wakelock.cc4
-rw-r--r--system/test/mock/mock_stack_a2dp_sbc.cc4
-rw-r--r--system/test/mock/mock_stack_avrc_apt.cc4
-rw-r--r--system/test/mock/mock_stack_avrc_utils.cc5
-rw-r--r--system/test/mock/mock_stack_btm_ble.cc26
-rw-r--r--system/test/mock/mock_stack_btm_ble.h40
-rw-r--r--system/test/mock/mock_stack_btm_ble_addr.cc6
-rw-r--r--system/test/mock/mock_stack_btm_ble_gap.cc11
-rw-r--r--system/test/mock/mock_stack_btm_ble_privacy.cc15
-rw-r--r--system/test/mock/mock_stack_btm_ble_privacy.h17
-rw-r--r--system/test/mock/mock_stack_btm_dev.cc7
-rw-r--r--system/test/mock/mock_stack_btm_devctl.cc6
-rw-r--r--system/test/mock/mock_stack_btm_hfp_lc3_encoder.cc4
-rw-r--r--system/test/mock/mock_stack_btm_hfp_msbc_decoder.cc4
-rw-r--r--system/test/mock/mock_stack_btm_hfp_msbc_encoder.cc4
-rw-r--r--system/test/mock/mock_stack_btm_inq.cc11
-rw-r--r--system/test/mock/mock_stack_btm_inq.h9
-rw-r--r--system/test/mock/mock_stack_btm_interface.cc6
-rw-r--r--system/test/mock/mock_stack_btm_main.cc5
-rw-r--r--system/test/mock/mock_stack_btm_sco.cc5
-rw-r--r--system/test/mock/mock_stack_btm_sec.cc14
-rw-r--r--system/test/mock/mock_stack_btm_sec.h15
-rw-r--r--system/test/mock/mock_stack_hcic_hciblecmds.cc10
-rw-r--r--system/test/mock/mock_stack_hcic_hciblecmds.h13
-rw-r--r--system/test/mock/mock_stack_l2cap_api.cc5
-rw-r--r--system/test/mock/mock_stack_l2cap_ble.cc5
-rw-r--r--system/test/mock/mock_stack_l2cap_main.cc5
-rw-r--r--system/test/mock/mock_stack_l2cap_utils.cc14
-rw-r--r--system/test/mock/mock_stack_metrics_logging.cc56
-rw-r--r--system/test/mock/mock_stack_metrics_logging.h52
-rw-r--r--system/test/mock/mock_stack_security_client_interface.cc7
-rw-r--r--system/test/mock/mock_udrv_ulinux_uipc.cc12
-rw-r--r--system/test/stub/osi.cc10
105 files changed, 328 insertions, 1249 deletions
diff --git a/system/test/common/jni_thread.cc b/system/test/common/jni_thread.cc
index db1520d36b..ca26fa39da 100644
--- a/system/test/common/jni_thread.cc
+++ b/system/test/common/jni_thread.cc
@@ -21,9 +21,6 @@
#include <map>
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
std::queue<base::OnceClosure> do_in_jni_thread_task_queue;
void run_one_jni_thread_task() {
@@ -39,9 +36,3 @@ void run_all_jni_thread_task() {
run_one_jni_thread_task();
}
}
-
-void reset_mock_jni_thread_queue() {
- while (do_in_jni_thread_task_queue.size()) {
- do_in_jni_thread_task_queue.pop();
- }
-}
diff --git a/system/test/common/main_handler.cc b/system/test/common/main_handler.cc
index 87e97d9c49..c33b663224 100644
--- a/system/test/common/main_handler.cc
+++ b/system/test/common/main_handler.cc
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include "main_handler.h"
+
#include <base/functional/bind.h>
#include <base/functional/callback_forward.h>
#include <base/location.h>
@@ -28,9 +30,6 @@
#include "common/postable_context.h"
#include "include/hardware/bluetooth.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
using bluetooth::common::MessageLoopThread;
using BtMainClosure = std::function<void()>;
diff --git a/system/test/common/stack_config.cc b/system/test/common/stack_config.cc
index c1bc7e7ae7..0bf74fa2e3 100644
--- a/system/test/common/stack_config.cc
+++ b/system/test/common/stack_config.cc
@@ -22,36 +22,36 @@
#include <cstdarg>
#include <cstring>
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
+#include "hci/include/packet_fragmenter.h"
+#include "internal_include/stack_config.h"
-const std::string kSmpOptions("mock smp options");
-const std::string kBroadcastAudioConfigOptions("mock broadcast audio config options");
-bool get_pts_avrcp_test(void) { return false; }
-bool get_pts_secure_only_mode(void) { return false; }
-bool get_pts_conn_updates_disabled(void) { return false; }
-bool get_pts_crosskey_sdp_disable(void) { return false; }
-const std::string* get_pts_smp_options(void) { return &kSmpOptions; }
-int get_pts_smp_failure_case(void) { return 123; }
-bool get_pts_force_eatt_for_notifications(void) { return false; }
-bool get_pts_connect_eatt_unconditionally(void) { return false; }
-bool get_pts_connect_eatt_before_encryption(void) { return false; }
-bool get_pts_unencrypt_broadcast(void) { return false; }
-bool get_pts_eatt_peripheral_collision_support(void) { return false; }
-bool get_pts_use_eatt_for_all_services(void) { return false; }
-bool get_pts_force_le_audio_multiple_contexts_metadata(void) { return false; }
-bool get_pts_l2cap_ecoc_upper_tester(void) { return false; }
-int get_pts_l2cap_ecoc_min_key_size(void) { return -1; }
-int get_pts_l2cap_ecoc_initial_chan_cnt(void) { return -1; }
-bool get_pts_l2cap_ecoc_connect_remaining(void) { return false; }
-int get_pts_l2cap_ecoc_send_num_of_sdu(void) { return -1; }
-bool get_pts_l2cap_ecoc_reconfigure(void) { return false; }
-const std::string* get_pts_broadcast_audio_config_options(void) {
+static const std::string kSmpOptions("mock smp options");
+static const std::string kBroadcastAudioConfigOptions("mock broadcast audio config options");
+static bool get_pts_avrcp_test(void) { return false; }
+static bool get_pts_secure_only_mode(void) { return false; }
+static bool get_pts_conn_updates_disabled(void) { return false; }
+static bool get_pts_crosskey_sdp_disable(void) { return false; }
+static const std::string* get_pts_smp_options(void) { return &kSmpOptions; }
+static int get_pts_smp_failure_case(void) { return 123; }
+static bool get_pts_force_eatt_for_notifications(void) { return false; }
+static bool get_pts_connect_eatt_unconditionally(void) { return false; }
+static bool get_pts_connect_eatt_before_encryption(void) { return false; }
+static bool get_pts_unencrypt_broadcast(void) { return false; }
+static bool get_pts_eatt_peripheral_collision_support(void) { return false; }
+static bool get_pts_use_eatt_for_all_services(void) { return false; }
+static bool get_pts_force_le_audio_multiple_contexts_metadata(void) { return false; }
+static bool get_pts_l2cap_ecoc_upper_tester(void) { return false; }
+static int get_pts_l2cap_ecoc_min_key_size(void) { return -1; }
+static int get_pts_l2cap_ecoc_initial_chan_cnt(void) { return -1; }
+static bool get_pts_l2cap_ecoc_connect_remaining(void) { return false; }
+static int get_pts_l2cap_ecoc_send_num_of_sdu(void) { return -1; }
+static bool get_pts_l2cap_ecoc_reconfigure(void) { return false; }
+static const std::string* get_pts_broadcast_audio_config_options(void) {
return &kBroadcastAudioConfigOptions;
}
-bool get_pts_le_audio_disable_ases_before_stopping(void) { return false; }
+static bool get_pts_le_audio_disable_ases_before_stopping(void) { return false; }
struct config_t;
-config_t* get_all(void) { return nullptr; }
+static config_t* get_all(void) { return nullptr; }
struct packet_fragmenter_t;
const packet_fragmenter_t* packet_fragmenter_get_interface() { return nullptr; }
diff --git a/system/test/common/sync_main_handler.cc b/system/test/common/sync_main_handler.cc
index 1b6219e761..8bbefb4ff9 100644
--- a/system/test/common/sync_main_handler.cc
+++ b/system/test/common/sync_main_handler.cc
@@ -14,14 +14,13 @@
* limitations under the License.
*/
+#include "test/common/sync_main_handler.h"
+
#include <chrono>
#include <future>
#include "stack/include/main_thread.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
constexpr int sync_timeout_in_ms = 3000;
void sync_main_handler() {
diff --git a/system/test/fake/fake_looper.cc b/system/test/fake/fake_looper.cc
index b7d94dd849..123ba7768b 100644
--- a/system/test/fake/fake_looper.cc
+++ b/system/test/fake/fake_looper.cc
@@ -27,10 +27,7 @@
#include "osi/include/allocator.h"
#include "test/fake/fake_thread.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
-pid_t get_thread_id() {
+static pid_t get_thread_id() {
#if defined(OS_MACOSX)
return pthread_mach_thread_np(pthread_self());
#elif defined(OS_LINUX)
diff --git a/system/test/headless/headless.cc b/system/test/headless/headless.cc
index d257b28e6d..753edd15fd 100644
--- a/system/test/headless/headless.cc
+++ b/system/test/headless/headless.cc
@@ -32,9 +32,6 @@
#include "test/headless/messenger.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
//
// Aggregate disparate variables from callback API into unified single structure
//
@@ -69,12 +66,13 @@ std::mutex adapter_state_mutex_;
std::condition_variable adapter_state_cv_;
bt_state_t bt_state_{BT_STATE_OFF};
-void adapter_state_changed(bt_state_t state) {
+static void adapter_state_changed(bt_state_t state) {
std::unique_lock<std::mutex> lck(adapter_state_mutex_);
bt_state_ = state;
adapter_state_cv_.notify_all();
}
-void adapter_properties(bt_status_t status, int num_properties, ::bt_property_t* properties) {
+static void adapter_properties(bt_status_t status, int num_properties,
+ ::bt_property_t* properties) {
const size_t num_callbacks = interface_api_callback_map_.size();
auto callback_list = interface_api_callback_map_.find(__func__);
if (callback_list != interface_api_callback_map_.end()) {
@@ -87,8 +85,8 @@ void adapter_properties(bt_status_t status, int num_properties, ::bt_property_t*
bt_status_text(status), num_properties, std::format_ptr(properties));
}
-void remote_device_properties(bt_status_t status, RawAddress* bd_addr, int num_properties,
- ::bt_property_t* properties) {
+static void remote_device_properties(bt_status_t status, RawAddress* bd_addr, int num_properties,
+ ::bt_property_t* properties) {
log::assert_that(bd_addr != nullptr, "assert failed: bd_addr != nullptr");
const size_t num_callbacks = interface_api_callback_map_.size();
auto callback_list = interface_api_callback_map_.find(__func__);
@@ -104,7 +102,7 @@ void remote_device_properties(bt_status_t status, RawAddress* bd_addr, int num_p
}
// Aggregate disparate variables from callback API into unified single structure
-void device_found(int num_properties, ::bt_property_t* properties) {
+static void device_found(int num_properties, ::bt_property_t* properties) {
[[maybe_unused]] const size_t num_callbacks = interface_api_callback_map_.size();
auto callback_list = interface_api_callback_map_.find(__func__);
if (callback_list != interface_api_callback_map_.end()) {
@@ -117,7 +115,7 @@ void device_found(int num_properties, ::bt_property_t* properties) {
std::format_ptr(properties));
}
-void discovery_state_changed(bt_discovery_state_t state) {
+static void discovery_state_changed(bt_discovery_state_t state) {
auto callback_list = interface_api_callback_map_.find(__func__);
if (callback_list != interface_api_callback_map_.end()) {
for (auto callback : callback_list->second) {
@@ -128,40 +126,42 @@ void discovery_state_changed(bt_discovery_state_t state) {
}
/** Bluetooth Legacy PinKey Request callback */
-void pin_request([[maybe_unused]] RawAddress* remote_bd_addr, [[maybe_unused]] bt_bdname_t* bd_name,
- [[maybe_unused]] uint32_t cod, [[maybe_unused]] bool min_16_digit) {
+static void pin_request([[maybe_unused]] RawAddress* remote_bd_addr,
+ [[maybe_unused]] bt_bdname_t* bd_name, [[maybe_unused]] uint32_t cod,
+ [[maybe_unused]] bool min_16_digit) {
log::info("");
}
-void ssp_request([[maybe_unused]] RawAddress* remote_bd_addr,
- [[maybe_unused]] bt_ssp_variant_t pairing_variant,
- [[maybe_unused]] uint32_t pass_key) {
+static void ssp_request([[maybe_unused]] RawAddress* remote_bd_addr,
+ [[maybe_unused]] bt_ssp_variant_t pairing_variant,
+ [[maybe_unused]] uint32_t pass_key) {
log::info("");
}
/** Bluetooth Bond state changed callback */
/* Invoked in response to create_bond, cancel_bond or remove_bond */
-void bond_state_changed([[maybe_unused]] bt_status_t status,
- [[maybe_unused]] RawAddress* remote_bd_addr,
- [[maybe_unused]] bt_bond_state_t state, [[maybe_unused]] int fail_reason) {
+static void bond_state_changed([[maybe_unused]] bt_status_t status,
+ [[maybe_unused]] RawAddress* remote_bd_addr,
+ [[maybe_unused]] bt_bond_state_t state,
+ [[maybe_unused]] int fail_reason) {
log::info("");
}
-void address_consolidate([[maybe_unused]] RawAddress* main_bd_addr,
- [[maybe_unused]] RawAddress* secondary_bd_addr) {
+static void address_consolidate([[maybe_unused]] RawAddress* main_bd_addr,
+ [[maybe_unused]] RawAddress* secondary_bd_addr) {
log::info("");
}
-void le_address_associate([[maybe_unused]] RawAddress* main_bd_addr,
- [[maybe_unused]] RawAddress* secondary_bd_addr,
- [[maybe_unused]] uint8_t identity_address_type) {
+static void le_address_associate([[maybe_unused]] RawAddress* main_bd_addr,
+ [[maybe_unused]] RawAddress* secondary_bd_addr,
+ [[maybe_unused]] uint8_t identity_address_type) {
log::info("");
}
/** Bluetooth ACL connection state changed callback */
-void acl_state_changed(bt_status_t status, RawAddress* remote_bd_addr, bt_acl_state_t state,
- int transport_link_type, bt_hci_error_code_t hci_reason,
- bt_conn_direction_t direction, uint16_t acl_handle) {
+static void acl_state_changed(bt_status_t status, RawAddress* remote_bd_addr, bt_acl_state_t state,
+ int transport_link_type, bt_hci_error_code_t hci_reason,
+ bt_conn_direction_t direction, uint16_t acl_handle) {
log::assert_that(remote_bd_addr != nullptr, "assert failed: remote_bd_addr != nullptr");
const size_t num_callbacks = interface_api_callback_map_.size();
auto callback_list = interface_api_callback_map_.find(__func__);
@@ -178,33 +178,34 @@ void acl_state_changed(bt_status_t status, RawAddress* remote_bd_addr, bt_acl_st
}
/** Bluetooth Link Quality Report callback */
-void link_quality_report([[maybe_unused]] uint64_t timestamp, [[maybe_unused]] int report_id,
- [[maybe_unused]] int rssi, [[maybe_unused]] int snr,
- [[maybe_unused]] int retransmission_count,
- [[maybe_unused]] int packets_not_receive_count,
- [[maybe_unused]] int negative_acknowledgement_count) {
+static void link_quality_report([[maybe_unused]] uint64_t timestamp, [[maybe_unused]] int report_id,
+ [[maybe_unused]] int rssi, [[maybe_unused]] int snr,
+ [[maybe_unused]] int retransmission_count,
+ [[maybe_unused]] int packets_not_receive_count,
+ [[maybe_unused]] int negative_acknowledgement_count) {
log::info("");
}
/** Switch buffer size callback */
-void switch_buffer_size([[maybe_unused]] bool is_low_latency_buffer_size) { log::info(""); }
+static void switch_buffer_size([[maybe_unused]] bool is_low_latency_buffer_size) { log::info(""); }
/** Switch codec callback */
-void switch_codec([[maybe_unused]] bool is_low_latency_buffer_size) { log::info(""); }
+static void switch_codec([[maybe_unused]] bool is_low_latency_buffer_size) { log::info(""); }
-void thread_event([[maybe_unused]] bt_cb_thread_evt evt) { log::info(""); }
+static void thread_event([[maybe_unused]] bt_cb_thread_evt evt) { log::info(""); }
-void dut_mode_recv([[maybe_unused]] uint16_t opcode, [[maybe_unused]] uint8_t* buf,
- [[maybe_unused]] uint8_t len) {
+static void dut_mode_recv([[maybe_unused]] uint16_t opcode, [[maybe_unused]] uint8_t* buf,
+ [[maybe_unused]] uint8_t len) {
log::info("");
}
-void le_test_mode([[maybe_unused]] bt_status_t status, [[maybe_unused]] uint16_t num_packets) {
+static void le_test_mode([[maybe_unused]] bt_status_t status,
+ [[maybe_unused]] uint16_t num_packets) {
log::info("");
}
-void energy_info([[maybe_unused]] bt_activity_energy_info* energy_info,
- [[maybe_unused]] bt_uid_traffic_t* uid_data) {
+static void energy_info([[maybe_unused]] bt_activity_energy_info* energy_info,
+ [[maybe_unused]] bt_uid_traffic_t* uid_data) {
log::info("");
}
@@ -233,12 +234,12 @@ bt_callbacks_t bt_callbacks{
// HAL HARDWARE CALLBACKS
// OS CALLOUTS
-int acquire_wake_lock_co([[maybe_unused]] const char* lock_name) {
+static int acquire_wake_lock_co([[maybe_unused]] const char* lock_name) {
log::info("");
return 1;
}
-int release_wake_lock_co([[maybe_unused]] const char* lock_name) {
+static int release_wake_lock_co([[maybe_unused]] const char* lock_name) {
log::info("");
return 0;
}
diff --git a/system/test/headless/log.cc b/system/test/headless/log.cc
index a14368bb2a..0ed78bd8ba 100644
--- a/system/test/headless/log.cc
+++ b/system/test/headless/log.cc
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include "log.h"
+
#include <chrono>
#include <ctime>
#include <string>
@@ -22,9 +24,6 @@
#include "internal_include/bt_trace.h"
#include "stack/btm/btm_int_types.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
std::chrono::system_clock::time_point _prev = std::chrono::system_clock::now();
extern tBTM_CB btm_cb;
diff --git a/system/test/headless/messenger.cc b/system/test/headless/messenger.cc
index 4e84ad1c49..5dc2e94c6e 100644
--- a/system/test/headless/messenger.cc
+++ b/system/test/headless/messenger.cc
@@ -26,9 +26,6 @@
#include "test/headless/interface.h"
#include "test/headless/log.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
using namespace bluetooth::test::headless;
using namespace std::chrono_literals;
@@ -96,7 +93,7 @@ bool await_callback(Context& context) {
namespace bluetooth::test::headless {
-void messenger_stats() {
+static void messenger_stats() {
// LOG_CONSOLE("%30s cnt:%zu", "device_found",
// discovered::device_found_.size()); LOG_CONSOLE("%30s cnt:%zu",
// "remote_device_properties",
diff --git a/system/test/headless/read/name.cc b/system/test/headless/read/name.cc
index 0dc5aa38b7..e37e0760c0 100644
--- a/system/test/headless/read/name.cc
+++ b/system/test/headless/read/name.cc
@@ -29,12 +29,9 @@
#include "test/headless/headless.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
std::promise<tBTM_REMOTE_DEV_NAME> promise_;
-void RemoteNameCallback(const tBTM_REMOTE_DEV_NAME* data) { promise_.set_value(*data); }
+static void RemoteNameCallback(const tBTM_REMOTE_DEV_NAME* data) { promise_.set_value(*data); }
int bluetooth::test::headless::Name::Run() {
if (options_.loop_ < 1) {
diff --git a/system/test/headless/util.cc b/system/test/headless/util.cc
index 8c18a3893f..0e6d479df2 100644
--- a/system/test/headless/util.cc
+++ b/system/test/headless/util.cc
@@ -14,14 +14,13 @@
* limitations under the License.
*/
+#include "test/headless/util.h"
+
#include <string>
#include "include/hardware/bluetooth.h"
#include "osi/include/properties.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
bool is_android_running() {
#ifdef __ANDROID__
char value[PROPERTY_VALUE_MAX];
diff --git a/system/test/mock/mock_audio_hal_interface_a2dp_encoding.cc b/system/test/mock/mock_audio_hal_interface_a2dp_encoding.cc
index d5ccf7984c..b97a346e16 100644
--- a/system/test/mock/mock_audio_hal_interface_a2dp_encoding.cc
+++ b/system/test/mock/mock_audio_hal_interface_a2dp_encoding.cc
@@ -34,9 +34,6 @@
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace audio_hal_interface_a2dp_encoding {
diff --git a/system/test/mock/mock_bluetooth_interface.cc b/system/test/mock/mock_bluetooth_interface.cc
index 2dda1267b1..c2fb27cb40 100644
--- a/system/test/mock/mock_bluetooth_interface.cc
+++ b/system/test/mock/mock_bluetooth_interface.cc
@@ -17,14 +17,12 @@
#include <cstdint>
#include <future>
+#include "btif/include/btif_common.h"
#include "btif/include/stack_manager_t.h"
#include "hardware/bluetooth.h"
#include "stack/include/bt_octets.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
void invoke_adapter_state_changed_cb(bt_state_t /* state */) {}
void invoke_adapter_properties_cb(bt_status_t /* status */, int /* num_properties */,
bt_property_t* /* properties */) {}
diff --git a/system/test/mock/mock_bta_ag_api.cc b/system/test/mock/mock_bta_ag_api.cc
index f59d2e4ed5..00a32ad0f2 100644
--- a/system/test/mock/mock_bta_ag_api.cc
+++ b/system/test/mock/mock_bta_ag_api.cc
@@ -27,12 +27,10 @@
#include <vector>
#include "bta/include/bta_ag_api.h"
+#include "bta/include/bta_ag_swb_aptx.h"
#include "test/common/mock_functions.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
tBTA_STATUS BTA_AgEnable(tBTA_AG_CBACK* /* p_cback */) {
inc_func_call_count(__func__);
return BTA_SUCCESS;
diff --git a/system/test/mock/mock_bta_ag_sco.cc b/system/test/mock/mock_bta_ag_sco.cc
index b290955c6a..7e853a64fc 100644
--- a/system/test/mock/mock_bta_ag_sco.cc
+++ b/system/test/mock/mock_bta_ag_sco.cc
@@ -27,9 +27,6 @@
#include "test/common/mock_functions.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
// Original usings
using HfpInterface = bluetooth::audio::hfp::HfpClientInterface;
using namespace bluetooth;
@@ -64,7 +61,6 @@ struct bta_ag_set_sco_allowed bta_ag_set_sco_allowed;
struct bta_ag_set_sco_offload_enabled bta_ag_set_sco_offload_enabled;
struct bta_ag_stream_suspended bta_ag_stream_suspended;
struct bta_clear_active_device bta_clear_active_device;
-struct updateCodecParametersFromProviderInfo updateCodecParametersFromProviderInfo;
} // namespace bta_ag_sco
} // namespace mock
@@ -181,10 +177,5 @@ void bta_clear_active_device() {
inc_func_call_count(__func__);
test::mock::bta_ag_sco::bta_clear_active_device();
}
-void updateCodecParametersFromProviderInfo(tBTA_AG_UUID_CODEC esco_codec,
- enh_esco_params_t& params) {
- inc_func_call_count(__func__);
- test::mock::bta_ag_sco::updateCodecParametersFromProviderInfo(esco_codec, params);
-}
// Mocked functions complete
// END mockcify generation
diff --git a/system/test/mock/mock_bta_ag_sco.h b/system/test/mock/mock_bta_ag_sco.h
index 11f40a758a..f83d9de537 100644
--- a/system/test/mock/mock_bta_ag_sco.h
+++ b/system/test/mock/mock_bta_ag_sco.h
@@ -293,18 +293,6 @@ struct bta_clear_active_device {
};
extern struct bta_clear_active_device bta_clear_active_device;
-// Name: updateCodecParametersFromProviderInfo
-// Params: tBTA_AG_UUID_CODEC esco_codec, enh_esco_params_t& params
-// Return: void
-struct updateCodecParametersFromProviderInfo {
- std::function<void(tBTA_AG_UUID_CODEC esco_codec, enh_esco_params_t& params)> body{
- [](tBTA_AG_UUID_CODEC /* esco_codec */, enh_esco_params_t& /* params */) {}};
- void operator()(tBTA_AG_UUID_CODEC esco_codec, enh_esco_params_t& params) {
- body(esco_codec, params);
- }
-};
-extern struct updateCodecParametersFromProviderInfo updateCodecParametersFromProviderInfo;
-
} // namespace bta_ag_sco
} // namespace mock
} // namespace test
diff --git a/system/test/mock/mock_bta_ar.cc b/system/test/mock/mock_bta_ar.cc
index b0b181e6d8..3c9961f3cc 100644
--- a/system/test/mock/mock_bta_ar.cc
+++ b/system/test/mock/mock_bta_ar.cc
@@ -21,14 +21,12 @@
#include <cstdint>
+#include "bta/include/bta_ar_api.h"
#include "bta/sys/bta_sys.h"
#include "stack/include/avdt_api.h"
#include "test/common/mock_functions.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
void bta_ar_dereg_avct() { inc_func_call_count(__func__); }
void bta_ar_dereg_avdt() { inc_func_call_count(__func__); }
void bta_ar_dereg_avrc(uint16_t /* service_uuid */) { inc_func_call_count(__func__); }
diff --git a/system/test/mock/mock_bta_av_ci.cc b/system/test/mock/mock_bta_av_ci.cc
index 07da047861..9bc0f119b1 100644
--- a/system/test/mock/mock_bta_av_ci.cc
+++ b/system/test/mock/mock_bta_av_ci.cc
@@ -20,11 +20,9 @@
*/
#include "bta/include/bta_av_api.h"
+#include "bta/include/bta_av_ci.h"
#include "test/common/mock_functions.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
void bta_av_ci_setconfig(tBTA_AV_HNDL /* bta_av_handle */, uint8_t /* err_code */,
uint8_t /* category */, bool /* recfg_needed */,
uint8_t /* avdt_handle */) {
diff --git a/system/test/mock/mock_bta_dm_act.cc b/system/test/mock/mock_bta_dm_act.cc
index 9f2686d4fd..65f70c0621 100644
--- a/system/test/mock/mock_bta_dm_act.cc
+++ b/system/test/mock/mock_bta_dm_act.cc
@@ -26,14 +26,16 @@
#include <cstdint>
+#include "bta/dm/bta_dm_act.h"
+#include "bta/dm/bta_dm_device_search.h"
+#include "bta/dm/bta_dm_sec_int.h"
+#include "bta/include/bta_dm_acl.h"
+#include "bta/include/bta_dm_api.h"
#include "test/common/mock_functions.h"
#include "types/raw_address.h"
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace bta_dm_act {
@@ -74,7 +76,6 @@ struct bta_dm_process_remove_device bta_dm_process_remove_device;
struct bta_dm_remove_device bta_dm_remove_device;
struct bta_dm_remote_key_missing bta_dm_remote_key_missing;
struct bta_dm_on_encryption_change bta_dm_on_encryption_change;
-struct bta_dm_rm_cback bta_dm_rm_cback;
struct bta_dm_set_dev_name bta_dm_set_dev_name;
struct bta_dm_set_encryption bta_dm_set_encryption;
@@ -206,7 +207,7 @@ void bta_dm_enable(tBTA_DM_SEC_CBACK* p_sec_cback) {
inc_func_call_count(__func__);
test::mock::bta_dm_act::bta_dm_enable(p_sec_cback);
}
-void bta_dm_encrypt_cback(const RawAddress* bd_addr, tBT_TRANSPORT transport, void* p_ref_data,
+void bta_dm_encrypt_cback(RawAddress bd_addr, tBT_TRANSPORT transport, void* p_ref_data,
tBTM_STATUS result) {
inc_func_call_count(__func__);
test::mock::bta_dm_act::bta_dm_encrypt_cback(bd_addr, transport, p_ref_data, result);
@@ -235,11 +236,6 @@ void bta_dm_on_encryption_change(bt_encryption_change_evt encryption_change) {
inc_func_call_count(__func__);
test::mock::bta_dm_act::bta_dm_on_encryption_change(encryption_change);
}
-void bta_dm_rm_cback(tBTA_SYS_CONN_STATUS status, uint8_t id, uint8_t app_id,
- const RawAddress& peer_addr) {
- inc_func_call_count(__func__);
- test::mock::bta_dm_act::bta_dm_rm_cback(status, id, app_id, peer_addr);
-}
void bta_dm_set_dev_name(const std::vector<uint8_t>& name) {
inc_func_call_count(__func__);
test::mock::bta_dm_act::bta_dm_set_dev_name(name);
diff --git a/system/test/mock/mock_bta_dm_act.h b/system/test/mock/mock_bta_dm_act.h
index df329a53af..ec81b0e62b 100644
--- a/system/test/mock/mock_bta_dm_act.h
+++ b/system/test/mock/mock_bta_dm_act.h
@@ -28,6 +28,7 @@
#include <cstdint>
#include "bta/dm/bta_dm_disc_int.h"
+#include "bta/dm/bta_dm_int.h"
#include "bta/dm/bta_dm_sec_int.h"
#include "types/raw_address.h"
@@ -372,11 +373,11 @@ extern struct bta_dm_enable bta_dm_enable;
// Params: const RawAddress* bd_addr, tBT_TRANSPORT transport, void* p_ref_data,
// tBTM_STATUS result Return: void
struct bta_dm_encrypt_cback {
- std::function<void(const RawAddress* bd_addr, tBT_TRANSPORT transport, void* p_ref_data,
+ std::function<void(RawAddress bd_addr, tBT_TRANSPORT transport, void* p_ref_data,
tBTM_STATUS result)>
- body{[](const RawAddress* /* bd_addr */, tBT_TRANSPORT /* transport */,
- void* /* p_ref_data */, tBTM_STATUS /* result */) {}};
- void operator()(const RawAddress* bd_addr, tBT_TRANSPORT transport, void* p_ref_data,
+ body{[](RawAddress /* bd_addr */, tBT_TRANSPORT /* transport */, void* /* p_ref_data */,
+ tBTM_STATUS /* result */) {}};
+ void operator()(RawAddress bd_addr, tBT_TRANSPORT transport, void* p_ref_data,
tBTM_STATUS result) {
body(bd_addr, transport, p_ref_data, result);
}
@@ -440,21 +441,6 @@ struct bta_dm_on_encryption_change {
};
extern struct bta_dm_on_encryption_change bta_dm_on_encryption_change;
-// Name: bta_dm_rm_cback
-// Params: tBTA_SYS_CONN_STATUS status, uint8_t id, uint8_t app_id, const
-// RawAddress& peer_addr Return: void
-struct bta_dm_rm_cback {
- std::function<void(tBTA_SYS_CONN_STATUS status, uint8_t id, uint8_t app_id,
- const RawAddress& peer_addr)>
- body{[](tBTA_SYS_CONN_STATUS /* status */, uint8_t /* id */, uint8_t /* app_id */,
- const RawAddress& /* peer_addr */) {}};
- void operator()(tBTA_SYS_CONN_STATUS status, uint8_t id, uint8_t app_id,
- const RawAddress& peer_addr) {
- body(status, id, app_id, peer_addr);
- }
-};
-extern struct bta_dm_rm_cback bta_dm_rm_cback;
-
// Name: bta_dm_search_cancel_cmpl
// Params:
// Return: void
diff --git a/system/test/mock/mock_bta_dm_api.cc b/system/test/mock/mock_bta_dm_api.cc
index 2d8129d0a5..1bf8009749 100644
--- a/system/test/mock/mock_bta_dm_api.cc
+++ b/system/test/mock/mock_bta_dm_api.cc
@@ -25,6 +25,8 @@
#include <cstdint>
+#include "bta/include/bta_api.h"
+#include "bta/include/bta_sec_api.h"
#include "hci/le_rand_callback.h"
#include "test/common/mock_functions.h"
@@ -32,9 +34,6 @@
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace bta_dm_api {
@@ -113,8 +112,8 @@ void BTA_DmAddBleKey(const RawAddress& bd_addr, tBTA_LE_KEY_VALUE* p_le_key,
inc_func_call_count(__func__);
test::mock::bta_dm_api::BTA_DmAddBleKey(bd_addr, p_le_key, key_type);
}
-void BTA_DmAddDevice(const RawAddress& bd_addr, DEV_CLASS dev_class, const LinkKey& link_key,
- uint8_t key_type, uint8_t pin_length) {
+void BTA_DmAddDevice(RawAddress bd_addr, DEV_CLASS dev_class, LinkKey link_key, uint8_t key_type,
+ uint8_t pin_length) {
inc_func_call_count(__func__);
test::mock::bta_dm_api::BTA_DmAddDevice(bd_addr, dev_class, link_key, key_type, pin_length);
}
@@ -205,10 +204,10 @@ void BTA_DmDisconnectAllAcls() {
inc_func_call_count(__func__);
test::mock::bta_dm_api::BTA_DmDisconnectAllAcls();
}
-void BTA_DmDiscover(const RawAddress& bd_addr, tBTA_DM_SEARCH_CBACK* p_cback,
+void BTA_DmDiscover(const RawAddress& bd_addr, service_discovery_callbacks cbacks,
tBT_TRANSPORT transport) {
inc_func_call_count(__func__);
- test::mock::bta_dm_api::BTA_DmDiscover(bd_addr, p_cback, transport);
+ test::mock::bta_dm_api::BTA_DmDiscover(bd_addr, cbacks, transport);
}
bool BTA_DmGetConnectionState(const RawAddress& bd_addr) {
inc_func_call_count(__func__);
diff --git a/system/test/mock/mock_bta_dm_api.h b/system/test/mock/mock_bta_dm_api.h
index cbfad950fc..106bcd13bb 100644
--- a/system/test/mock/mock_bta_dm_api.h
+++ b/system/test/mock/mock_bta_dm_api.h
@@ -79,13 +79,12 @@ extern struct BTA_DmAddBleKey BTA_DmAddBleKey;
// Params: const RawAddress& bd_addr, DEV_CLASS dev_class, const LinkKey&
// link_key, uint8_t key_type, uint8_t pin_length Return: void
struct BTA_DmAddDevice {
- std::function<void(const RawAddress& bd_addr, DEV_CLASS dev_class, const LinkKey& link_key,
- uint8_t key_type, uint8_t pin_length)>
- body{[](const RawAddress& /* bd_addr */, DEV_CLASS /* dev_class */,
- const LinkKey& /* link_key */, uint8_t /* key_type */,
- uint8_t /* pin_length */) {}};
- void operator()(const RawAddress& bd_addr, DEV_CLASS dev_class, const LinkKey& link_key,
- uint8_t key_type, uint8_t pin_length) {
+ std::function<void(RawAddress bd_addr, DEV_CLASS dev_class, LinkKey link_key, uint8_t key_type,
+ uint8_t pin_length)>
+ body{[](RawAddress /* bd_addr */, DEV_CLASS /* dev_class */, LinkKey /* link_key */,
+ uint8_t /* key_type */, uint8_t /* pin_length */) {}};
+ void operator()(RawAddress bd_addr, DEV_CLASS dev_class, LinkKey link_key, uint8_t key_type,
+ uint8_t pin_length) {
body(bd_addr, dev_class, link_key, key_type, pin_length);
}
};
@@ -315,13 +314,13 @@ extern struct BTA_DmDisconnectAllAcls BTA_DmDisconnectAllAcls;
// Params: const RawAddress& bd_addr, tBTA_DM_SEARCH_CBACK* p_cback,
// tBT_TRANSPORT transport Return: void
struct BTA_DmDiscover {
- std::function<void(const RawAddress& bd_addr, tBTA_DM_SEARCH_CBACK* p_cback,
+ std::function<void(const RawAddress& bd_addr, service_discovery_callbacks cbacks,
tBT_TRANSPORT transport)>
- body{[](const RawAddress& /* bd_addr */, tBTA_DM_SEARCH_CBACK* /* p_cback */,
+ body{[](const RawAddress& /* bd_addr */, service_discovery_callbacks /* cbacks */,
tBT_TRANSPORT /* transport */) {}};
- void operator()(const RawAddress& bd_addr, tBTA_DM_SEARCH_CBACK* p_cback,
+ void operator()(const RawAddress& bd_addr, service_discovery_callbacks cbacks,
tBT_TRANSPORT transport) {
- body(bd_addr, p_cback, transport);
+ body(bd_addr, cbacks, transport);
}
};
extern struct BTA_DmDiscover BTA_DmDiscover;
diff --git a/system/test/mock/mock_bta_dm_main.cc b/system/test/mock/mock_bta_dm_main.cc
index 4c559cba3c..a7ab35f7ea 100644
--- a/system/test/mock/mock_bta_dm_main.cc
+++ b/system/test/mock/mock_bta_dm_main.cc
@@ -23,15 +23,13 @@
// Mock include file to share data between tests and mock
#include "test/mock/mock_bta_dm_main.h"
+#include "bta/include/bta_api.h"
#include "test/common/mock_functions.h"
// Original usings
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace bta_dm_main {
diff --git a/system/test/mock/mock_bta_gattc_api.cc b/system/test/mock/mock_bta_gattc_api.cc
index 6932102e84..126ad69267 100644
--- a/system/test/mock/mock_bta_gattc_api.cc
+++ b/system/test/mock/mock_bta_gattc_api.cc
@@ -22,6 +22,7 @@
#include <base/functional/bind.h>
#include <base/functional/callback.h>
+#include "bta/gatt/bta_gattc_int.h"
#include "bta/gatt/database.h"
#include "bta/include/bta_gatt_api.h"
#include "stack/include/gatt_api.h"
@@ -30,9 +31,6 @@
#include "types/bt_transport.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
void BTA_GATTC_Disable(void) { inc_func_call_count(__func__); }
const gatt::Characteristic* BTA_GATTC_GetCharacteristic(uint16_t /* conn_id */,
uint16_t /* handle */) {
diff --git a/system/test/mock/mock_bta_gatts_api.cc b/system/test/mock/mock_bta_gatts_api.cc
index 3d57cbba78..c34f764acd 100644
--- a/system/test/mock/mock_bta_gatts_api.cc
+++ b/system/test/mock/mock_bta_gatts_api.cc
@@ -32,9 +32,6 @@
#include "types/bt_transport.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
void BTA_GATTS_Disable(void) { inc_func_call_count(__func__); }
void BTA_GATTS_AppDeregister(tGATT_IF /* server_if */) { inc_func_call_count(__func__); }
void BTA_GATTS_AppRegister(const bluetooth::Uuid& /* app_uuid */, tBTA_GATTS_CBACK* /* p_cback */,
diff --git a/system/test/mock/mock_bta_hh_utils.cc b/system/test/mock/mock_bta_hh_utils.cc
index a922421242..f6aee6948c 100644
--- a/system/test/mock/mock_bta_hh_utils.cc
+++ b/system/test/mock/mock_bta_hh_utils.cc
@@ -30,9 +30,6 @@
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace bta_hh_utils {
@@ -47,7 +44,6 @@ struct bta_hh_read_ssr_param bta_hh_read_ssr_param;
struct bta_hh_tod_spt bta_hh_tod_spt;
struct bta_hh_trace_dev_db bta_hh_trace_dev_db;
struct bta_hh_update_di_info bta_hh_update_di_info;
-struct bta_hh_le_is_hh_gatt_if bta_hh_le_is_hh_gatt_if;
} // namespace bta_hh_utils
} // namespace mock
@@ -96,10 +92,5 @@ void bta_hh_update_di_info(tBTA_HH_DEV_CB* p_cb, uint16_t vendor_id, uint16_t pr
test::mock::bta_hh_utils::bta_hh_update_di_info(p_cb, vendor_id, product_id, version, flag,
ctry_code);
}
-bool bta_hh_le_is_hh_gatt_if(tGATT_IF client_if) {
- inc_func_call_count(__func__);
- test::mock::bta_hh_utils::bta_hh_le_is_hh_gatt_if(client_if);
- return false;
-}
// Mocked functions complete
// END mockcify generation
diff --git a/system/test/mock/mock_bta_hh_utils.h b/system/test/mock/mock_bta_hh_utils.h
index a46d616732..172392e832 100644
--- a/system/test/mock/mock_bta_hh_utils.h
+++ b/system/test/mock/mock_bta_hh_utils.h
@@ -146,17 +146,6 @@ struct bta_hh_update_di_info {
};
extern struct bta_hh_update_di_info bta_hh_update_di_info;
-// Name: bta_hh_le_is_hh_gatt_if
-// Params: tGATT_IF client_if
-// Return: bool
-struct bta_hh_le_is_hh_gatt_if {
- bool return_value{false};
- std::function<bool(tGATT_IF client_if)> body{
- [this](tGATT_IF /* client_if */) { return return_value; }};
- bool operator()(tGATT_IF client_if) { return body(client_if); }
-};
-extern struct bta_hh_le_is_hh_gatt_if bta_hh_le_is_hh_gatt_if;
-
} // namespace bta_hh_utils
} // namespace mock
} // namespace test
diff --git a/system/test/mock/mock_bta_pan_api.cc b/system/test/mock/mock_bta_pan_api.cc
index 0e662c5d19..4f353f3aa1 100644
--- a/system/test/mock/mock_bta_pan_api.cc
+++ b/system/test/mock/mock_bta_pan_api.cc
@@ -25,9 +25,6 @@
#include "test/common/mock_functions.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
void BTA_PanClose(uint16_t /* handle */) { inc_func_call_count(__func__); }
void BTA_PanDisable(void) { inc_func_call_count(__func__); }
void BTA_PanEnable(tBTA_PAN_CBACK /* p_cback */) { inc_func_call_count(__func__); }
diff --git a/system/test/mock/mock_bta_sdp_api.cc b/system/test/mock/mock_bta_sdp_api.cc
index 966920221a..a0facebc53 100644
--- a/system/test/mock/mock_bta_sdp_api.cc
+++ b/system/test/mock/mock_bta_sdp_api.cc
@@ -28,16 +28,12 @@
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace bta_sdp_api {
// Function state capture and return values, if needed
struct BTA_SdpCreateRecordByUser BTA_SdpCreateRecordByUser;
-struct BTA_SdpDumpsys BTA_SdpDumpsys;
struct BTA_SdpEnable BTA_SdpEnable;
struct BTA_SdpRemoveRecordByUser BTA_SdpRemoveRecordByUser;
struct BTA_SdpSearch BTA_SdpSearch;
@@ -65,10 +61,6 @@ tBTA_SDP_STATUS BTA_SdpCreateRecordByUser(void* user_data) {
inc_func_call_count(__func__);
return test::mock::bta_sdp_api::BTA_SdpCreateRecordByUser(user_data);
}
-void BTA_SdpDumpsys(int fd) {
- inc_func_call_count(__func__);
- test::mock::bta_sdp_api::BTA_SdpDumpsys(fd);
-}
tBTA_SDP_STATUS BTA_SdpEnable(tBTA_SDP_DM_CBACK* p_cback) {
inc_func_call_count(__func__);
return test::mock::bta_sdp_api::BTA_SdpEnable(p_cback);
diff --git a/system/test/mock/mock_bta_sdp_api.h b/system/test/mock/mock_bta_sdp_api.h
index 8449e40fe7..b45ac94328 100644
--- a/system/test/mock/mock_bta_sdp_api.h
+++ b/system/test/mock/mock_bta_sdp_api.h
@@ -49,15 +49,6 @@ struct BTA_SdpCreateRecordByUser {
};
extern struct BTA_SdpCreateRecordByUser BTA_SdpCreateRecordByUser;
-// Name: BTA_SdpDumpsys
-// Params: int fd
-// Return: void
-struct BTA_SdpDumpsys {
- std::function<void(int fd)> body{[](int /* fd */) {}};
- void operator()(int fd) { body(fd); }
-};
-extern struct BTA_SdpDumpsys BTA_SdpDumpsys;
-
// Name: BTA_SdpEnable
// Params: tBTA_SDP_DM_CBACK* p_cback
// Return: tBTA_SDP_STATUS
diff --git a/system/test/mock/mock_bta_sys_conn.cc b/system/test/mock/mock_bta_sys_conn.cc
index e8453047a3..4d4348de39 100644
--- a/system/test/mock/mock_bta_sys_conn.cc
+++ b/system/test/mock/mock_bta_sys_conn.cc
@@ -26,9 +26,6 @@
#include "types/hci_role.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
void bta_sys_app_close(tBTA_SYS_ID /* id */, uint8_t /* app_id */,
const RawAddress& /* peer_addr */) {
inc_func_call_count(__func__);
@@ -66,7 +63,7 @@ void bta_sys_reset_sniff(uint8_t /* id */, uint8_t /* app_id */,
inc_func_call_count(__func__);
}
void bta_sys_rm_register(tBTA_SYS_CONN_CBACK* /* p_cback */) { inc_func_call_count(__func__); }
-void bta_sys_role_chg_register(tBTA_SYS_CONN_CBACK* /* p_cback */) {
+void bta_sys_role_chg_register(tBTA_SYS_ROLE_SWITCH_CBACK* /* p_cback */) {
inc_func_call_count(__func__);
}
void bta_sys_sco_close(tBTA_SYS_ID /* id */, uint8_t /* app_id */,
diff --git a/system/test/mock/mock_bta_sys_main.cc b/system/test/mock/mock_bta_sys_main.cc
index dd7e10e6ea..63da8a5969 100644
--- a/system/test/mock/mock_bta_sys_main.cc
+++ b/system/test/mock/mock_bta_sys_main.cc
@@ -30,9 +30,6 @@
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace bta_sys_main {
diff --git a/system/test/mock/mock_btif_av.cc b/system/test/mock/mock_btif_av.cc
index 560c5e1a78..8ee4fd05ea 100644
--- a/system/test/mock/mock_btif_av.cc
+++ b/system/test/mock/mock_btif_av.cc
@@ -32,9 +32,6 @@
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace btif_av {
diff --git a/system/test/mock/mock_btif_bluetooth.cc b/system/test/mock/mock_btif_bluetooth.cc
index c101c6ee4d..7a9de6b076 100644
--- a/system/test/mock/mock_btif_bluetooth.cc
+++ b/system/test/mock/mock_btif_bluetooth.cc
@@ -25,15 +25,13 @@
#include <cstdint>
+#include "btif/include/btif_api.h"
#include "test/common/mock_functions.h"
#include "types/raw_address.h"
// Mocked compile conditionals, if any
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace btif_bluetooth {
@@ -42,14 +40,7 @@ namespace btif_bluetooth {
struct is_atv_device is_atv_device;
struct is_common_criteria_mode is_common_criteria_mode;
struct is_restricted_mode is_restricted_mode;
-struct dut_mode_configure dut_mode_configure;
-struct dut_mode_send dut_mode_send;
struct get_common_criteria_config_compare_result get_common_criteria_config_compare_result;
-struct get_remote_device_properties get_remote_device_properties;
-struct get_remote_device_property get_remote_device_property;
-struct get_remote_services get_remote_services;
-struct le_test_mode le_test_mode;
-struct set_remote_device_property set_remote_device_property;
struct invoke_switch_buffer_size_cb invoke_switch_buffer_size_cb;
} // namespace btif_bluetooth
@@ -69,38 +60,10 @@ bool is_restricted_mode() {
inc_func_call_count(__func__);
return test::mock::btif_bluetooth::is_restricted_mode();
}
-int dut_mode_configure(uint8_t enable) {
- inc_func_call_count(__func__);
- return test::mock::btif_bluetooth::dut_mode_configure(enable);
-}
-int dut_mode_send(uint16_t opcode, uint8_t* buf, uint8_t len) {
- inc_func_call_count(__func__);
- return test::mock::btif_bluetooth::dut_mode_send(opcode, buf, len);
-}
int get_common_criteria_config_compare_result() {
inc_func_call_count(__func__);
return test::mock::btif_bluetooth::get_common_criteria_config_compare_result();
}
-int get_remote_device_properties(RawAddress* remote_addr) {
- inc_func_call_count(__func__);
- return test::mock::btif_bluetooth::get_remote_device_properties(remote_addr);
-}
-int get_remote_device_property(RawAddress* remote_addr, bt_property_type_t type) {
- inc_func_call_count(__func__);
- return test::mock::btif_bluetooth::get_remote_device_property(remote_addr, type);
-}
-int get_remote_services(RawAddress* remote_addr) {
- inc_func_call_count(__func__);
- return test::mock::btif_bluetooth::get_remote_services(remote_addr);
-}
-int le_test_mode(uint16_t opcode, uint8_t* buf, uint8_t len) {
- inc_func_call_count(__func__);
- return test::mock::btif_bluetooth::le_test_mode(opcode, buf, len);
-}
-int set_remote_device_property(RawAddress* remote_addr, const bt_property_t* property) {
- inc_func_call_count(__func__);
- return test::mock::btif_bluetooth::set_remote_device_property(remote_addr, property);
-}
void invoke_switch_buffer_size_cb(bool invoke_switch_buffer_size_cb) {
inc_func_call_count(__func__);
test::mock::btif_bluetooth::invoke_switch_buffer_size_cb(invoke_switch_buffer_size_cb);
diff --git a/system/test/mock/mock_btif_bluetooth.h b/system/test/mock/mock_btif_bluetooth.h
index 7ecc1ef832..f3f198dfd5 100644
--- a/system/test/mock/mock_btif_bluetooth.h
+++ b/system/test/mock/mock_btif_bluetooth.h
@@ -58,23 +58,6 @@ struct is_restricted_mode {
bool operator()() { return body(); }
};
extern struct is_restricted_mode is_restricted_mode;
-// Name: dut_mode_configure
-// Params: uint8_t enable
-// Returns: int
-struct dut_mode_configure {
- std::function<int(uint8_t enable)> body{[](uint8_t /* enable */) { return 0; }};
- int operator()(uint8_t enable) { return body(enable); }
-};
-extern struct dut_mode_configure dut_mode_configure;
-// Name: dut_mode_send
-// Params: uint16_t opcode, uint8_t* buf, uint8_t len
-// Returns: int
-struct dut_mode_send {
- std::function<int(uint16_t /* opcode */, uint8_t* /* buf */, uint8_t /* len */)> body{
- [](uint16_t /* opcode */, uint8_t* /* buf */, uint8_t /* len */) { return 0; }};
- int operator()(uint16_t opcode, uint8_t* buf, uint8_t len) { return body(opcode, buf, len); }
-};
-extern struct dut_mode_send dut_mode_send;
// Name: get_common_criteria_config_compare_result
// Params:
// Returns: int
@@ -83,53 +66,6 @@ struct get_common_criteria_config_compare_result {
int operator()() { return body(); }
};
extern struct get_common_criteria_config_compare_result get_common_criteria_config_compare_result;
-// Name: get_remote_device_properties
-// Params: RawAddress* remote_addr
-// Returns: int
-struct get_remote_device_properties {
- std::function<int(RawAddress* remote_addr)> body{[](RawAddress* /* remote_addr */) { return 0; }};
- int operator()(RawAddress* remote_addr) { return body(remote_addr); }
-};
-extern struct get_remote_device_properties get_remote_device_properties;
-// Name: get_remote_device_property
-// Params: RawAddress* remote_addr, bt_property_type_t type
-// Returns: int
-struct get_remote_device_property {
- std::function<int(RawAddress* remote_addr, bt_property_type_t type)> body{
- [](RawAddress* /* remote_addr */, bt_property_type_t /* type */) { return 0; }};
- int operator()(RawAddress* remote_addr, bt_property_type_t type) {
- return body(remote_addr, type);
- }
-};
-extern struct get_remote_device_property get_remote_device_property;
-// Name: get_remote_services
-// Params: RawAddress* remote_addr
-// Returns: int
-struct get_remote_services {
- std::function<int(RawAddress* remote_addr)> body{[](RawAddress* /* remote_addr */) { return 0; }};
- int operator()(RawAddress* remote_addr) { return body(remote_addr); }
-};
-extern struct get_remote_services get_remote_services;
-// Name: le_test_mode
-// Params: uint16_t opcode, uint8_t* buf, uint8_t len
-// Returns: int
-struct le_test_mode {
- std::function<int(uint16_t opcode, uint8_t* buf, uint8_t len)> body{
- [](uint16_t /* opcode */, uint8_t* /* buf */, uint8_t /* len */) { return 0; }};
- int operator()(uint16_t opcode, uint8_t* buf, uint8_t len) { return body(opcode, buf, len); }
-};
-extern struct le_test_mode le_test_mode;
-// Name: set_remote_device_property
-// Params: RawAddress* remote_addr, const bt_property_t* property
-// Returns: int
-struct set_remote_device_property {
- std::function<int(RawAddress* remote_addr, const bt_property_t* property)> body{
- [](RawAddress* /* remote_addr */, const bt_property_t* /* property */) { return 0; }};
- int operator()(RawAddress* remote_addr, const bt_property_t* property) {
- return body(remote_addr, property);
- }
-};
-extern struct set_remote_device_property set_remote_device_property;
// Name: invoke_switch_buffer_size_cb
// Params: bool invoke_switch_buffer_size_cb
// Returns: void
diff --git a/system/test/mock/mock_btif_bqr.cc b/system/test/mock/mock_btif_bqr.cc
deleted file mode 100644
index 2a17a7778e..0000000000
--- a/system/test/mock/mock_btif_bqr.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Generated mock file from original source file
- * Functions generated:51
- */
-
-#include <cstdint>
-
-#include "test/common/mock_functions.h"
-
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
-namespace bluetooth {
-namespace bqr {
-
-void DumpLmpLlMessage(uint8_t /* length */, const uint8_t* /* p_event */) {
- inc_func_call_count(__func__);
-}
-
-void DumpBtScheduling(uint8_t /* length */, const uint8_t* /* p_event */) {
- inc_func_call_count(__func__);
-}
-
-} // namespace bqr
-} // namespace bluetooth
diff --git a/system/test/mock/mock_btif_bta_pan_co_rx.cc b/system/test/mock/mock_btif_bta_pan_co_rx.cc
index 741104b228..1eed716edf 100644
--- a/system/test/mock/mock_btif_bta_pan_co_rx.cc
+++ b/system/test/mock/mock_btif_bta_pan_co_rx.cc
@@ -25,14 +25,12 @@
#include <cstdint>
+#include "bta/include/bta_pan_co.h"
#include "test/common/mock_functions.h"
// Mocked compile conditionals, if any
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace btif_bta_pan_co_rx {
diff --git a/system/test/mock/mock_btif_co_bta_av_co.cc b/system/test/mock/mock_btif_co_bta_av_co.cc
index efa055531f..f596c047a0 100644
--- a/system/test/mock/mock_btif_co_bta_av_co.cc
+++ b/system/test/mock/mock_btif_co_bta_av_co.cc
@@ -25,15 +25,14 @@
#include <cstdint>
+#include "bta/include/bta_av_co.h"
+#include "btif/include/btif_av_co.h"
#include "test/common/mock_functions.h"
// Original usings
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace btif_co_bta_av_co {
diff --git a/system/test/mock/mock_btif_co_bta_dm_co.cc b/system/test/mock/mock_btif_co_bta_dm_co.cc
index 656b94cda2..f33bcf4c68 100644
--- a/system/test/mock/mock_btif_co_bta_dm_co.cc
+++ b/system/test/mock/mock_btif_co_bta_dm_co.cc
@@ -24,14 +24,6 @@
#include "bta/sys/bta_sys.h"
#include "internal_include/bte_appl.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
tBTE_APPL_CFG bte_appl_cfg = {BTA_LE_AUTH_REQ_SC_MITM_BOND, // Authentication requirements
BTM_IO_CAP_UNKNOWN, BTM_BLE_INITIATOR_KEY_SIZE,
BTM_BLE_RESPONDER_KEY_SIZE, BTM_BLE_MAX_KEY_SIZE};
-
-bool bta_dm_co_get_compress_memory(tBTA_SYS_ID /* id */, uint8_t** /* memory_p */,
- uint32_t* /* memory_size */) {
- return true;
-}
diff --git a/system/test/mock/mock_btif_co_bta_hh_co.cc b/system/test/mock/mock_btif_co_bta_hh_co.cc
index 8f9a4ea739..f1a185d99e 100644
--- a/system/test/mock/mock_btif_co_bta_hh_co.cc
+++ b/system/test/mock/mock_btif_co_bta_hh_co.cc
@@ -27,9 +27,6 @@
#include "test/common/mock_functions.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
int bta_hh_co_write(int /* fd */, uint8_t* /* rpt */, uint16_t /* len */) {
inc_func_call_count(__func__);
return 0;
diff --git a/system/test/mock/mock_btif_config.cc b/system/test/mock/mock_btif_config.cc
index 549fe4bf44..72c91c04fc 100644
--- a/system/test/mock/mock_btif_config.cc
+++ b/system/test/mock/mock_btif_config.cc
@@ -27,15 +27,13 @@
#include <cstdint>
#include <string>
+#include "btif/include/btif_config.h"
#include "test/common/mock_functions.h"
#include "types/raw_address.h"
// Mocked compile conditionals, if any
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace btif_config {
diff --git a/system/test/mock/mock_btif_core.cc b/system/test/mock/mock_btif_core.cc
index 001c5b553f..0d601d2af1 100644
--- a/system/test/mock/mock_btif_core.cc
+++ b/system/test/mock/mock_btif_core.cc
@@ -24,14 +24,12 @@
#include <cstdint>
#include "bta/include/bta_api.h"
+#include "btif/include/btif_api.h"
#include "btif/include/btif_common.h"
#include "include/hardware/bluetooth.h"
#include "test/common/mock_functions.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
bool btif_is_dut_mode() {
inc_func_call_count(__func__);
return false;
diff --git a/system/test/mock/mock_btif_dm.cc b/system/test/mock/mock_btif_dm.cc
index cc3bf79edd..9d135c5530 100644
--- a/system/test/mock/mock_btif_dm.cc
+++ b/system/test/mock/mock_btif_dm.cc
@@ -23,6 +23,7 @@
#include "bta/include/bta_api.h"
#include "bta/include/bta_sec_api.h"
+#include "btif/include/btif_api.h"
#include "include/hardware/bluetooth.h"
#include "internal_include/bte_appl.h"
#include "stack/include/acl_api_types.h"
@@ -31,16 +32,13 @@
#include "types/bt_transport.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
struct uid_set_t;
bool btif_dm_pairing_is_busy() {
inc_func_call_count(__func__);
return false;
}
-bool check_cod_hid(const RawAddress& /* remote_bdaddr */) {
+bool btif_check_cod_hid(const RawAddress& /* remote_bdaddr */) {
inc_func_call_count(__func__);
return false;
}
@@ -71,19 +69,16 @@ void btif_ble_transmitter_test(uint8_t /* tx_freq */, uint8_t /* test_data_len *
inc_func_call_count(__func__);
}
void btif_debug_bond_event_dump(int /* fd */) { inc_func_call_count(__func__); }
-void btif_dm_ble_sec_req_evt(tBTA_DM_BLE_SEC_REQ* /* p_ble_req */, bool /* is_consent */) {
- inc_func_call_count(__func__);
-}
void btif_dm_cancel_bond(const RawAddress /* bd_addr */) { inc_func_call_count(__func__); }
void btif_dm_cancel_discovery(void) { inc_func_call_count(__func__); }
void btif_dm_cleanup(void) { inc_func_call_count(__func__); }
-void btif_dm_create_bond(const RawAddress /* bd_addr */, int /* transport */) {
+void btif_dm_create_bond(const RawAddress /* bd_addr */, tBT_TRANSPORT /* transport */) {
inc_func_call_count(__func__);
}
void btif_dm_create_bond_le(const RawAddress /* bd_addr */, tBLE_ADDR_TYPE /* addr_type */) {
inc_func_call_count(__func__);
}
-void btif_dm_create_bond_out_of_band(const RawAddress /* bd_addr */, int /* transport */,
+void btif_dm_create_bond_out_of_band(const RawAddress /* bd_addr */, tBT_TRANSPORT /* transport */,
const bt_oob_data_t /* p192_data */,
const bt_oob_data_t /* p256_data */) {
inc_func_call_count(__func__);
@@ -95,7 +90,7 @@ void btif_dm_get_ble_local_keys(tBTA_DM_BLE_LOCAL_KEY_MASK* /* p_key_mask */, Oc
tBTA_BLE_LOCAL_ID_KEYS* /* p_id_keys */) {
inc_func_call_count(__func__);
}
-void btif_dm_get_remote_services(RawAddress /* remote_addr */, const int /* transport */) {
+void btif_dm_get_remote_services(RawAddress /* remote_addr */, tBT_TRANSPORT /* transport */) {
inc_func_call_count(__func__);
}
void btif_dm_hh_open_failed(RawAddress* /* bdaddr */) { inc_func_call_count(__func__); }
@@ -118,7 +113,6 @@ void btif_dm_proc_io_rsp(const RawAddress& /* bd_addr */, tBTM_IO_CAP /* io_cap
inc_func_call_count(__func__);
}
void btif_dm_read_energy_info() { inc_func_call_count(__func__); }
-void btif_dm_remove_ble_bonding_keys(void) { inc_func_call_count(__func__); }
void btif_dm_remove_bond(const RawAddress /* bd_addr */) { inc_func_call_count(__func__); }
void btif_dm_set_oob_for_io_req(tBTM_OOB_DATA* /* p_has_oob_data */) {
inc_func_call_count(__func__);
diff --git a/system/test/mock/mock_btif_hf.cc b/system/test/mock/mock_btif_hf.cc
index b3d9b88d16..b8e9f5057a 100644
--- a/system/test/mock/mock_btif_hf.cc
+++ b/system/test/mock/mock_btif_hf.cc
@@ -23,15 +23,13 @@
// Mock include file to share data between tests and mock
#include "test/mock/mock_btif_hf.h"
+#include "btif/include/btif_hf.h"
#include "test/common/mock_functions.h"
// Original usings
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace btif_hf {
diff --git a/system/test/mock/mock_btif_profile_storage.cc b/system/test/mock/mock_btif_profile_storage.cc
index 51ab3f6e69..5095788e28 100644
--- a/system/test/mock/mock_btif_profile_storage.cc
+++ b/system/test/mock/mock_btif_profile_storage.cc
@@ -25,11 +25,10 @@
#include <cstdint>
+#include "btif/include/btif_profile_storage.h"
+#include "btif/include/btif_storage.h"
#include "test/common/mock_functions.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
// Original usings
using bluetooth::Uuid;
diff --git a/system/test/mock/mock_btif_sock_l2cap.cc b/system/test/mock/mock_btif_sock_l2cap.cc
index 41f19f8cd0..135cd47dac 100644
--- a/system/test/mock/mock_btif_sock_l2cap.cc
+++ b/system/test/mock/mock_btif_sock_l2cap.cc
@@ -25,11 +25,9 @@
#include <cstdint>
+#include "btif/include/btif_sock_l2cap.h"
#include "test/common/mock_functions.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
// Original usings
// Mocked internal structures, if any
diff --git a/system/test/mock/mock_btif_sock_rfc.cc b/system/test/mock/mock_btif_sock_rfc.cc
index 6ca7512418..c22a7bf860 100644
--- a/system/test/mock/mock_btif_sock_rfc.cc
+++ b/system/test/mock/mock_btif_sock_rfc.cc
@@ -24,11 +24,10 @@
#include <cstdint>
+#include "bta/include/bta_jv_co.h"
+#include "btif/include/btif_sock_rfc.h"
#include "test/common/mock_functions.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
// Original usings
using bluetooth::Uuid;
@@ -91,11 +90,14 @@ void btsock_rfc_cleanup(void) {
inc_func_call_count(__func__);
test::mock::btif_sock_rfc::btsock_rfc_cleanup();
}
-bt_status_t btsock_rfc_connect(const RawAddress* bd_addr, const Uuid* service_uuid, int channel,
- int* sock_fd, int flags, int app_uid) {
+bt_status_t btsock_rfc_connect(const RawAddress* bd_addr, const bluetooth::Uuid* uuid, int channel,
+ int* sock_fd, int flags, int app_uid, btsock_data_path_t data_path,
+ const char* socket_name, uint64_t hub_id, uint64_t endpoint_id,
+ int max_rx_packet_size) {
inc_func_call_count(__func__);
- return test::mock::btif_sock_rfc::btsock_rfc_connect(bd_addr, service_uuid, channel, sock_fd,
- flags, app_uid);
+ return test::mock::btif_sock_rfc::btsock_rfc_connect(bd_addr, uuid, channel, sock_fd, flags,
+ app_uid, data_path, socket_name, hub_id,
+ endpoint_id, max_rx_packet_size);
}
bt_status_t btsock_rfc_control_req(uint8_t dlci, const RawAddress& bd_addr, uint8_t modem_signal,
uint8_t break_signal, uint8_t discard_buffers,
@@ -113,10 +115,13 @@ bt_status_t btsock_rfc_init(int poll_thread_handle, uid_set_t* set) {
return test::mock::btif_sock_rfc::btsock_rfc_init(poll_thread_handle, set);
}
bt_status_t btsock_rfc_listen(const char* service_name, const Uuid* service_uuid, int channel,
- int* sock_fd, int flags, int app_uid) {
+ int* sock_fd, int flags, int app_uid, btsock_data_path_t data_path,
+ const char* socket_name, uint64_t hub_id, uint64_t endpoint_id,
+ int max_rx_packet_size) {
inc_func_call_count(__func__);
return test::mock::btif_sock_rfc::btsock_rfc_listen(service_name, service_uuid, channel, sock_fd,
- flags, app_uid);
+ flags, app_uid, data_path, socket_name,
+ hub_id, endpoint_id, max_rx_packet_size);
}
void btsock_rfc_signaled(int fd, int flags, uint32_t id) {
inc_func_call_count(__func__);
diff --git a/system/test/mock/mock_btif_sock_rfc.h b/system/test/mock/mock_btif_sock_rfc.h
index 59f296f016..a0d14cb9bc 100644
--- a/system/test/mock/mock_btif_sock_rfc.h
+++ b/system/test/mock/mock_btif_sock_rfc.h
@@ -30,6 +30,7 @@
#include <functional>
#include "btif/include/btif_uid.h"
+#include "hardware/bt_sock.h"
#include "stack/include/bt_hdr.h"
#include "types/bluetooth/uuid.h"
#include "types/raw_address.h"
@@ -91,14 +92,21 @@ extern struct btsock_rfc_cleanup btsock_rfc_cleanup;
// int* sock_fd, int flags, int app_uid Return: bt_status_t
struct btsock_rfc_connect {
static bt_status_t return_value;
- std::function<bt_status_t(const RawAddress* bd_addr, const Uuid* service_uuid, int channel,
- int* sock_fd, int flags, int app_uid)>
- body{[](const RawAddress* /* bd_addr */, const Uuid* /* service_uuid */,
- int /* channel */, int* /* sock_fd */, int /* flags */,
- int /* app_uid */) { return return_value; }};
- bt_status_t operator()(const RawAddress* bd_addr, const Uuid* service_uuid, int channel,
- int* sock_fd, int flags, int app_uid) {
- return body(bd_addr, service_uuid, channel, sock_fd, flags, app_uid);
+ std::function<bt_status_t(const RawAddress* bd_addr, const bluetooth::Uuid* uuid, int channel,
+ int* sock_fd, int flags, int app_uid, btsock_data_path_t data_path,
+ const char* socket_name, uint64_t hub_id, uint64_t endpoint_id,
+ int max_rx_packet_size)>
+ body{[](const RawAddress* /*bd_addr*/, const bluetooth::Uuid* /*uuid*/, int /*channel*/,
+ int* /*sock_fd*/, int /*flags*/, int /*app_uid*/,
+ btsock_data_path_t /*data_path*/, const char* /*socket_name*/,
+ uint64_t /*hub_id*/, uint64_t /*endpoint_id*/,
+ int /*max_rx_packet_size*/) { return return_value; }};
+ bt_status_t operator()(const RawAddress* bd_addr, const bluetooth::Uuid* uuid, int channel,
+ int* sock_fd, int flags, int app_uid, btsock_data_path_t data_path,
+ const char* socket_name, uint64_t hub_id, uint64_t endpoint_id,
+ int max_rx_packet_size) {
+ return body(bd_addr, uuid, channel, sock_fd, flags, app_uid, data_path, socket_name, hub_id,
+ endpoint_id, max_rx_packet_size);
}
};
extern struct btsock_rfc_connect btsock_rfc_connect;
@@ -153,12 +161,20 @@ extern struct btsock_rfc_init btsock_rfc_init;
struct btsock_rfc_listen {
static bt_status_t return_value;
std::function<bt_status_t(const char* service_name, const Uuid* service_uuid, int channel,
- int* sock_fd, int flags, int app_uid)>
+ int* sock_fd, int flags, int app_uid, btsock_data_path_t data_path,
+ const char* socket_name, uint64_t hub_id, uint64_t endpoint_id,
+ int max_rx_packet_size)>
body{[](const char* /* service_name */, const Uuid* /* service_uuid */, int /* channel */,
- int* /* sock_fd */, int /* flags */, int /* app_uid */) { return return_value; }};
+ int* /* sock_fd */, int /* flags */, int /* app_uid */,
+ btsock_data_path_t /*data_path*/, const char* /*socket_name*/,
+ uint64_t /*hub_id*/, uint64_t /*endpoint_id*/,
+ int /*max_rx_packet_size*/) { return return_value; }};
bt_status_t operator()(const char* service_name, const Uuid* service_uuid, int channel,
- int* sock_fd, int flags, int app_uid) {
- return body(service_name, service_uuid, channel, sock_fd, flags, app_uid);
+ int* sock_fd, int flags, int app_uid, btsock_data_path_t data_path,
+ const char* socket_name, uint64_t hub_id, uint64_t endpoint_id,
+ int max_rx_packet_size) {
+ return body(service_name, service_uuid, channel, sock_fd, flags, app_uid, data_path,
+ socket_name, hub_id, endpoint_id, max_rx_packet_size);
}
};
extern struct btsock_rfc_listen btsock_rfc_listen;
diff --git a/system/test/mock/mock_btif_stack_manager.cc b/system/test/mock/mock_btif_stack_manager.cc
index bdc4150ca9..e334b911dd 100644
--- a/system/test/mock/mock_btif_stack_manager.cc
+++ b/system/test/mock/mock_btif_stack_manager.cc
@@ -19,12 +19,10 @@
*/
#include "btif/include/core_callbacks.h"
+#include "btif/include/stack_manager_t.h"
#include "osi/include/future.h"
#include "test/common/core_interface.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
static future_t* hack_future;
future_t* stack_manager_get_hack_future() { return hack_future; }
diff --git a/system/test/mock/mock_btif_storage.cc b/system/test/mock/mock_btif_storage.cc
index 427dd20a54..f8b9ab5ff3 100644
--- a/system/test/mock/mock_btif_storage.cc
+++ b/system/test/mock/mock_btif_storage.cc
@@ -25,11 +25,10 @@
#include <cstdint>
+#include "btif/include/btif_api.h"
+#include "btif/include/btif_storage.h"
#include "test/common/mock_functions.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
// Original usings
using bluetooth::Uuid;
@@ -41,7 +40,6 @@ namespace btif_storage {
// Function state capture and return values, if needed
struct btif_debug_linkkey_type_dump btif_debug_linkkey_type_dump;
-struct btif_has_ble_keys btif_has_ble_keys;
struct btif_in_fetch_bonded_ble_device btif_in_fetch_bonded_ble_device;
struct btif_in_fetch_bonded_device btif_in_fetch_bonded_device;
struct btif_split_uuids_string btif_split_uuids_string;
@@ -49,7 +47,6 @@ struct btif_storage_add_ble_bonding_key btif_storage_add_ble_bonding_key;
struct btif_storage_add_ble_local_key btif_storage_add_ble_local_key;
struct btif_storage_add_bonded_device btif_storage_add_bonded_device;
struct btif_storage_add_remote_device btif_storage_add_remote_device;
-struct btif_storage_get_adapter_prop btif_storage_get_adapter_prop;
struct btif_storage_get_adapter_property btif_storage_get_adapter_property;
struct btif_storage_get_ble_bonding_key btif_storage_get_ble_bonding_key;
struct btif_storage_get_ble_local_key btif_storage_get_ble_local_key;
@@ -57,11 +54,9 @@ struct btif_storage_get_gatt_cl_db_hash btif_storage_get_gatt_cl_db_hash;
struct btif_storage_get_gatt_cl_supp_feat btif_storage_get_gatt_cl_supp_feat;
struct btif_storage_get_remote_addr_type btif_storage_get_remote_addr_type;
struct btif_storage_get_remote_device_property btif_storage_get_remote_device_property;
-struct btif_storage_get_remote_prop btif_storage_get_remote_prop;
struct btif_storage_get_sr_supp_feat btif_storage_get_sr_supp_feat;
struct btif_storage_get_stored_remote_name btif_storage_get_stored_remote_name;
struct btif_storage_get_cod btif_storage_get_cod;
-struct btif_storage_invoke_addr_type_update btif_storage_invoke_addr_type_update;
struct btif_storage_is_restricted_device btif_storage_is_restricted_device;
struct btif_storage_load_bonded_devices btif_storage_load_bonded_devices;
struct btif_storage_load_le_devices btif_storage_load_le_devices;
@@ -86,7 +81,6 @@ namespace test {
namespace mock {
namespace btif_storage {
-bool btif_has_ble_keys::return_value = false;
bt_status_t btif_in_fetch_bonded_ble_device::return_value = BT_STATUS_SUCCESS;
bt_status_t btif_in_fetch_bonded_device::return_value = BT_STATUS_SUCCESS;
size_t btif_split_uuids_string::return_value = 0;
@@ -94,7 +88,6 @@ bt_status_t btif_storage_add_ble_bonding_key::return_value = BT_STATUS_SUCCESS;
bt_status_t btif_storage_add_ble_local_key::return_value = BT_STATUS_SUCCESS;
bt_status_t btif_storage_add_bonded_device::return_value = BT_STATUS_SUCCESS;
bt_status_t btif_storage_add_remote_device::return_value = BT_STATUS_SUCCESS;
-bt_status_t btif_storage_get_adapter_prop::return_value = BT_STATUS_SUCCESS;
bt_status_t btif_storage_get_adapter_property::return_value = BT_STATUS_SUCCESS;
bt_status_t btif_storage_get_ble_bonding_key::return_value = BT_STATUS_SUCCESS;
bt_status_t btif_storage_get_ble_local_key::return_value = BT_STATUS_SUCCESS;
@@ -102,7 +95,6 @@ Octet16 btif_storage_get_gatt_cl_db_hash::return_value = {};
uint8_t btif_storage_get_gatt_cl_supp_feat::return_value = 0;
bt_status_t btif_storage_get_remote_addr_type::return_value = BT_STATUS_SUCCESS;
bt_status_t btif_storage_get_remote_device_property::return_value = BT_STATUS_SUCCESS;
-bt_status_t btif_storage_get_remote_prop::return_value = BT_STATUS_SUCCESS;
uint8_t btif_storage_get_sr_supp_feat::return_value = 0;
bool btif_storage_get_stored_remote_name::return_value = false;
bool btif_storage_get_cod::return_value = false;
@@ -124,10 +116,6 @@ void btif_debug_linkkey_type_dump(int fd) {
inc_func_call_count(__func__);
test::mock::btif_storage::btif_debug_linkkey_type_dump(fd);
}
-bool btif_has_ble_keys(const std::string& bdstr) {
- inc_func_call_count(__func__);
- return test::mock::btif_storage::btif_has_ble_keys(bdstr);
-}
bt_status_t btif_in_fetch_bonded_ble_device(const std::string& remote_bd_addr, int add,
btif_bonded_devices_t* p_bonded_devices) {
inc_func_call_count(__func__);
@@ -164,11 +152,6 @@ bt_status_t btif_storage_add_remote_device(const RawAddress* remote_bd_addr,
return test::mock::btif_storage::btif_storage_add_remote_device(remote_bd_addr, num_properties,
properties);
}
-bt_status_t btif_storage_get_adapter_prop(bt_property_type_t type, void* buf, int size,
- bt_property_t* property) {
- inc_func_call_count(__func__);
- return test::mock::btif_storage::btif_storage_get_adapter_prop(type, buf, size, property);
-}
bt_status_t btif_storage_get_adapter_property(bt_property_t* property) {
inc_func_call_count(__func__);
return test::mock::btif_storage::btif_storage_get_adapter_property(property);
@@ -202,12 +185,6 @@ bt_status_t btif_storage_get_remote_device_property(const RawAddress* remote_bd_
return test::mock::btif_storage::btif_storage_get_remote_device_property(remote_bd_addr,
property);
}
-bt_status_t btif_storage_get_remote_prop(RawAddress* remote_addr, bt_property_type_t type,
- void* buf, int size, bt_property_t* property) {
- inc_func_call_count(__func__);
- return test::mock::btif_storage::btif_storage_get_remote_prop(remote_addr, type, buf, size,
- property);
-}
uint8_t btif_storage_get_sr_supp_feat(const RawAddress& bd_addr) {
inc_func_call_count(__func__);
return test::mock::btif_storage::btif_storage_get_sr_supp_feat(bd_addr);
@@ -220,11 +197,6 @@ bool btif_storage_get_cod(const RawAddress& bd_addr, uint32_t* cod) {
inc_func_call_count(__func__);
return test::mock::btif_storage::btif_storage_get_cod(bd_addr, cod);
}
-void btif_storage_invoke_addr_type_update(const RawAddress& remote_bd_addr,
- const tBLE_ADDR_TYPE& addr_type) {
- inc_func_call_count(__func__);
- test::mock::btif_storage::btif_storage_invoke_addr_type_update(remote_bd_addr, addr_type);
-}
bool btif_storage_is_restricted_device(const RawAddress* remote_bd_addr) {
inc_func_call_count(__func__);
return test::mock::btif_storage::btif_storage_is_restricted_device(remote_bd_addr);
diff --git a/system/test/mock/mock_btif_storage.h b/system/test/mock/mock_btif_storage.h
index 2df8d149e5..6be7f1200a 100644
--- a/system/test/mock/mock_btif_storage.h
+++ b/system/test/mock/mock_btif_storage.h
@@ -55,17 +55,6 @@ struct btif_debug_linkkey_type_dump {
};
extern struct btif_debug_linkkey_type_dump btif_debug_linkkey_type_dump;
-// Name: btif_has_ble_keys
-// Params: const std::string& bdstr
-// Return: bool
-struct btif_has_ble_keys {
- static bool return_value;
- std::function<bool(const std::string& bdstr)> body{
- [](const std::string& /* bdstr */) { return return_value; }};
- bool operator()(const std::string& bdstr) { return body(bdstr); }
-};
-extern struct btif_has_ble_keys btif_has_ble_keys;
-
// Name: btif_in_fetch_bonded_ble_device
// Params: const std::string& remote_bd_addr, int add, btif_bonded_devices_t*
// p_bonded_devices Return: bt_status_t
@@ -169,20 +158,6 @@ struct btif_storage_add_remote_device {
};
extern struct btif_storage_add_remote_device btif_storage_add_remote_device;
-// Name: btif_storage_get_adapter_prop
-// Params: bt_property_type_t type, void* buf, int size, bt_property_t* property
-// Return: bt_status_t
-struct btif_storage_get_adapter_prop {
- static bt_status_t return_value;
- std::function<bt_status_t(bt_property_type_t type, void* buf, int size, bt_property_t* property)>
- body{[](bt_property_type_t /* type */, void* /* buf */, int /* size */,
- bt_property_t* /* property */) { return return_value; }};
- bt_status_t operator()(bt_property_type_t type, void* buf, int size, bt_property_t* property) {
- return body(type, buf, size, property);
- }
-};
-extern struct btif_storage_get_adapter_prop btif_storage_get_adapter_prop;
-
// Name: btif_storage_get_adapter_property
// Params: bt_property_t* property
// Return: bt_status_t
@@ -272,22 +247,6 @@ struct btif_storage_get_remote_device_property {
};
extern struct btif_storage_get_remote_device_property btif_storage_get_remote_device_property;
-// Name: btif_storage_get_remote_prop
-// Params: RawAddress* remote_addr, bt_property_type_t type, void* buf, int
-// size, bt_property_t* property Return: bt_status_t
-struct btif_storage_get_remote_prop {
- static bt_status_t return_value;
- std::function<bt_status_t(RawAddress* remote_addr, bt_property_type_t type, void* buf, int size,
- bt_property_t* property)>
- body{[](RawAddress* /* remote_addr */, bt_property_type_t /* type */, void* /* buf */,
- int /* size */, bt_property_t* /* property */) { return return_value; }};
- bt_status_t operator()(RawAddress* remote_addr, bt_property_type_t type, void* buf, int size,
- bt_property_t* property) {
- return body(remote_addr, type, buf, size, property);
- }
-};
-extern struct btif_storage_get_remote_prop btif_storage_get_remote_prop;
-
// Name: btif_storage_get_sr_supp_feat
// Params: const RawAddress& bd_addr
// Return: uint8_t
@@ -321,18 +280,6 @@ struct btif_storage_get_cod {
};
extern struct btif_storage_get_cod btif_storage_get_cod;
-// Name: btif_storage_invoke_addr_type_update
-// Params: const RawAddress& remote_bd_addr, const tBLE_ADDR_TYPE& addr_type
-// Return: void
-struct btif_storage_invoke_addr_type_update {
- std::function<void(const RawAddress& remote_bd_addr, const tBLE_ADDR_TYPE& addr_type)> body{
- [](const RawAddress& /* remote_bd_addr */, const tBLE_ADDR_TYPE& /* addr_type */) {}};
- void operator()(const RawAddress& remote_bd_addr, const tBLE_ADDR_TYPE& addr_type) {
- body(remote_bd_addr, addr_type);
- }
-};
-extern struct btif_storage_invoke_addr_type_update btif_storage_invoke_addr_type_update;
-
// Name: btif_storage_is_restricted_device
// Params: const RawAddress* remote_bd_addr
// Return: bool
diff --git a/system/test/mock/mock_btif_util.cc b/system/test/mock/mock_btif_util.cc
index 662fa3fcbc..bfb192409f 100644
--- a/system/test/mock/mock_btif_util.cc
+++ b/system/test/mock/mock_btif_util.cc
@@ -24,15 +24,13 @@
#include <cstdint>
+#include "btif/include/btif_util.h"
#include "test/common/mock_functions.h"
// Original usings
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace btif_util {
@@ -67,20 +65,20 @@ namespace btif_util {
int ascii_2_hex::return_value = 0;
uint32_t devclass2uint::return_value = 0;
-const char* dump_adapter_scan_mode::return_value = nullptr;
-const char* dump_av_audio_state::return_value = nullptr;
-const char* dump_av_conn_state::return_value = nullptr;
-const char* dump_bt_status::return_value = nullptr;
-const char* dump_dm_event::return_value = nullptr;
-const char* dump_dm_search_event::return_value = nullptr;
-const char* dump_hd_event::return_value = nullptr;
-const char* dump_hf_client_event::return_value = nullptr;
-const char* dump_hf_event::return_value = nullptr;
-const char* dump_property_type::return_value = nullptr;
-const char* dump_rc_event::return_value = nullptr;
-const char* dump_rc_notification_event_id::return_value = nullptr;
-const char* dump_rc_pdu::return_value = nullptr;
-const char* dump_thread_evt::return_value = nullptr;
+std::string dump_adapter_scan_mode::return_value = "";
+std::string dump_av_audio_state::return_value = "";
+std::string dump_av_conn_state::return_value = "";
+std::string dump_bt_status::return_value = "";
+std::string dump_dm_event::return_value = "";
+std::string dump_dm_search_event::return_value = "";
+std::string dump_hd_event::return_value = "";
+std::string dump_hf_client_event::return_value = "";
+std::string dump_hf_event::return_value = "";
+std::string dump_property_type::return_value = "";
+std::string dump_rc_event::return_value = "";
+std::string dump_rc_notification_event_id::return_value = "";
+std::string dump_rc_pdu::return_value = "";
+std::string dump_thread_evt::return_value = "";
} // namespace btif_util
} // namespace mock
@@ -95,59 +93,59 @@ uint32_t devclass2uint(const DEV_CLASS dev_class) {
inc_func_call_count(__func__);
return test::mock::btif_util::devclass2uint(dev_class);
}
-const char* dump_adapter_scan_mode(bt_scan_mode_t mode) {
+std::string dump_adapter_scan_mode(bt_scan_mode_t mode) {
inc_func_call_count(__func__);
return test::mock::btif_util::dump_adapter_scan_mode(mode);
}
-const char* dump_av_audio_state(uint16_t event) {
+std::string dump_av_audio_state(uint16_t event) {
inc_func_call_count(__func__);
return test::mock::btif_util::dump_av_audio_state(event);
}
-const char* dump_av_conn_state(uint16_t event) {
+std::string dump_av_conn_state(uint16_t event) {
inc_func_call_count(__func__);
return test::mock::btif_util::dump_av_conn_state(event);
}
-const char* dump_bt_status(bt_status_t status) {
+std::string dump_bt_status(bt_status_t status) {
inc_func_call_count(__func__);
return test::mock::btif_util::dump_bt_status(status);
}
-const char* dump_dm_event(uint16_t event) {
+std::string dump_dm_event(uint16_t event) {
inc_func_call_count(__func__);
return test::mock::btif_util::dump_dm_event(event);
}
-const char* dump_dm_search_event(uint16_t event) {
+std::string dump_dm_search_event(uint16_t event) {
inc_func_call_count(__func__);
return test::mock::btif_util::dump_dm_search_event(event);
}
-const char* dump_hd_event(uint16_t event) {
+std::string dump_hd_event(uint16_t event) {
inc_func_call_count(__func__);
return test::mock::btif_util::dump_hd_event(event);
}
-const char* dump_hf_client_event(uint16_t event) {
+std::string dump_hf_client_event(uint16_t event) {
inc_func_call_count(__func__);
return test::mock::btif_util::dump_hf_client_event(event);
}
-const char* dump_hf_event(uint16_t event) {
+std::string dump_hf_event(uint16_t event) {
inc_func_call_count(__func__);
return test::mock::btif_util::dump_hf_event(event);
}
-const char* dump_property_type(bt_property_type_t type) {
+std::string dump_property_type(bt_property_type_t type) {
inc_func_call_count(__func__);
return test::mock::btif_util::dump_property_type(type);
}
-const char* dump_rc_event(uint8_t event) {
+std::string dump_rc_event(uint8_t event) {
inc_func_call_count(__func__);
return test::mock::btif_util::dump_rc_event(event);
}
-const char* dump_rc_notification_event_id(uint8_t event_id) {
+std::string dump_rc_notification_event_id(uint8_t event_id) {
inc_func_call_count(__func__);
return test::mock::btif_util::dump_rc_notification_event_id(event_id);
}
-const char* dump_rc_pdu(uint8_t pdu) {
+std::string dump_rc_pdu(uint8_t pdu) {
inc_func_call_count(__func__);
return test::mock::btif_util::dump_rc_pdu(pdu);
}
-const char* dump_thread_evt(bt_cb_thread_evt evt) {
+std::string dump_thread_evt(bt_cb_thread_evt evt) {
inc_func_call_count(__func__);
return test::mock::btif_util::dump_thread_evt(evt);
}
diff --git a/system/test/mock/mock_btif_util.h b/system/test/mock/mock_btif_util.h
index 7dd4188ce0..bd775a8062 100644
--- a/system/test/mock/mock_btif_util.h
+++ b/system/test/mock/mock_btif_util.h
@@ -66,152 +66,152 @@ extern struct devclass2uint devclass2uint;
// Name: dump_adapter_scan_mode
// Params: bt_scan_mode_t mode
-// Return: const char*
+// Return: std::string
struct dump_adapter_scan_mode {
- static const char* return_value;
- std::function<const char*(bt_scan_mode_t mode)> body{
+ static std::string return_value;
+ std::function<std::string(bt_scan_mode_t mode)> body{
[](bt_scan_mode_t /* mode */) { return return_value; }};
- const char* operator()(bt_scan_mode_t mode) { return body(mode); }
+ std::string operator()(bt_scan_mode_t mode) { return body(mode); }
};
extern struct dump_adapter_scan_mode dump_adapter_scan_mode;
// Name: dump_av_audio_state
// Params: uint16_t event
-// Return: const char*
+// Return: std::string
struct dump_av_audio_state {
- static const char* return_value;
- std::function<const char*(uint16_t event)> body{
+ static std::string return_value;
+ std::function<std::string(uint16_t event)> body{
[](uint16_t /* event */) { return return_value; }};
- const char* operator()(uint16_t event) { return body(event); }
+ std::string operator()(uint16_t event) { return body(event); }
};
extern struct dump_av_audio_state dump_av_audio_state;
// Name: dump_av_conn_state
// Params: uint16_t event
-// Return: const char*
+// Return: std::string
struct dump_av_conn_state {
- static const char* return_value;
- std::function<const char*(uint16_t event)> body{
+ static std::string return_value;
+ std::function<std::string(uint16_t event)> body{
[](uint16_t /* event */) { return return_value; }};
- const char* operator()(uint16_t event) { return body(event); }
+ std::string operator()(uint16_t event) { return body(event); }
};
extern struct dump_av_conn_state dump_av_conn_state;
// Name: dump_bt_status
// Params: bt_status_t status
-// Return: const char*
+// Return: std::string
struct dump_bt_status {
- static const char* return_value;
- std::function<const char*(bt_status_t status)> body{
+ static std::string return_value;
+ std::function<std::string(bt_status_t status)> body{
[](bt_status_t /* status */) { return return_value; }};
- const char* operator()(bt_status_t status) { return body(status); }
+ std::string operator()(bt_status_t status) { return body(status); }
};
extern struct dump_bt_status dump_bt_status;
// Name: dump_dm_event
// Params: uint16_t event
-// Return: const char*
+// Return: std::string
struct dump_dm_event {
- static const char* return_value;
- std::function<const char*(uint16_t event)> body{
+ static std::string return_value;
+ std::function<std::string(uint16_t event)> body{
[](uint16_t /* event */) { return return_value; }};
- const char* operator()(uint16_t event) { return body(event); }
+ std::string operator()(uint16_t event) { return body(event); }
};
extern struct dump_dm_event dump_dm_event;
// Name: dump_dm_search_event
// Params: uint16_t event
-// Return: const char*
+// Return: std::string
struct dump_dm_search_event {
- static const char* return_value;
- std::function<const char*(uint16_t event)> body{
+ static std::string return_value;
+ std::function<std::string(uint16_t event)> body{
[](uint16_t /* event */) { return return_value; }};
- const char* operator()(uint16_t event) { return body(event); }
+ std::string operator()(uint16_t event) { return body(event); }
};
extern struct dump_dm_search_event dump_dm_search_event;
// Name: dump_hd_event
// Params: uint16_t event
-// Return: const char*
+// Return: std::string
struct dump_hd_event {
- static const char* return_value;
- std::function<const char*(uint16_t event)> body{
+ static std::string return_value;
+ std::function<std::string(uint16_t event)> body{
[](uint16_t /* event */) { return return_value; }};
- const char* operator()(uint16_t event) { return body(event); }
+ std::string operator()(uint16_t event) { return body(event); }
};
extern struct dump_hd_event dump_hd_event;
// Name: dump_hf_client_event
// Params: uint16_t event
-// Return: const char*
+// Return: std::string
struct dump_hf_client_event {
- static const char* return_value;
- std::function<const char*(uint16_t event)> body{
+ static std::string return_value;
+ std::function<std::string(uint16_t event)> body{
[](uint16_t /* event */) { return return_value; }};
- const char* operator()(uint16_t event) { return body(event); }
+ std::string operator()(uint16_t event) { return body(event); }
};
extern struct dump_hf_client_event dump_hf_client_event;
// Name: dump_hf_event
// Params: uint16_t event
-// Return: const char*
+// Return: std::string
struct dump_hf_event {
- static const char* return_value;
- std::function<const char*(uint16_t event)> body{
+ static std::string return_value;
+ std::function<std::string(uint16_t event)> body{
[](uint16_t /* event */) { return return_value; }};
- const char* operator()(uint16_t event) { return body(event); }
+ std::string operator()(uint16_t event) { return body(event); }
};
// Name: dump_property_type
// Params: bt_property_type_t type
-// Return: const char*
+// Return: std::string
struct dump_property_type {
- static const char* return_value;
- std::function<const char*(bt_property_type_t type)> body{
+ static std::string return_value;
+ std::function<std::string(bt_property_type_t type)> body{
[](bt_property_type_t /* type */) { return return_value; }};
- const char* operator()(bt_property_type_t type) { return body(type); }
+ std::string operator()(bt_property_type_t type) { return body(type); }
};
extern struct dump_property_type dump_property_type;
// Name: dump_rc_event
// Params: uint8_t event
-// Return: const char*
+// Return: std::string
struct dump_rc_event {
- static const char* return_value;
- std::function<const char*(uint8_t event)> body{[](uint8_t /* event */) { return return_value; }};
- const char* operator()(uint8_t event) { return body(event); }
+ static std::string return_value;
+ std::function<std::string(uint8_t event)> body{[](uint8_t /* event */) { return return_value; }};
+ std::string operator()(uint8_t event) { return body(event); }
};
extern struct dump_rc_event dump_rc_event;
// Name: dump_rc_notification_event_id
// Params: uint8_t event_id
-// Return: const char*
+// Return: std::string
struct dump_rc_notification_event_id {
- static const char* return_value;
- std::function<const char*(uint8_t event_id)> body{
+ static std::string return_value;
+ std::function<std::string(uint8_t event_id)> body{
[](uint8_t /* event_id */) { return return_value; }};
- const char* operator()(uint8_t event_id) { return body(event_id); }
+ std::string operator()(uint8_t event_id) { return body(event_id); }
};
extern struct dump_rc_notification_event_id dump_rc_notification_event_id;
// Name: dump_rc_pdu
// Params: uint8_t pdu
-// Return: const char*
+// Return: std::string
struct dump_rc_pdu {
- static const char* return_value;
- std::function<const char*(uint8_t pdu)> body{[](uint8_t /* pdu */) { return return_value; }};
- const char* operator()(uint8_t pdu) { return body(pdu); }
+ static std::string return_value;
+ std::function<std::string(uint8_t pdu)> body{[](uint8_t /* pdu */) { return return_value; }};
+ std::string operator()(uint8_t pdu) { return body(pdu); }
};
extern struct dump_rc_pdu dump_rc_pdu;
// Name: dump_thread_evt
// Params: bt_cb_thread_evt evt
-// Return: const char*
+// Return: std::string
struct dump_thread_evt {
- static const char* return_value;
- std::function<const char*(bt_cb_thread_evt evt)> body{
+ static std::string return_value;
+ std::function<std::string(bt_cb_thread_evt evt)> body{
[](bt_cb_thread_evt /* evt */) { return return_value; }};
- const char* operator()(bt_cb_thread_evt evt) { return body(evt); }
+ std::string operator()(bt_cb_thread_evt evt) { return body(evt); }
};
extern struct dump_thread_evt dump_thread_evt;
diff --git a/system/test/mock/mock_device_esco_parameters.cc b/system/test/mock/mock_device_esco_parameters.cc
index 5a9a3ad263..c38d546de8 100644
--- a/system/test/mock/mock_device_esco_parameters.cc
+++ b/system/test/mock/mock_device_esco_parameters.cc
@@ -23,13 +23,11 @@
// Mock include file to share data between tests and mock
#include "test/mock/mock_device_esco_parameters.h"
+#include "device/include/esco_parameters.h"
#include "test/common/mock_functions.h"
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace device_esco_parameters {
@@ -42,14 +40,9 @@ struct esco_parameters_for_codec esco_parameters_for_codec;
} // namespace test
// Mocked functions, if any
-enh_esco_params_t esco_parameters_for_codec(esco_codec_t codec) {
- inc_func_call_count(__func__);
- return test::mock::device_esco_parameters::esco_parameters_for_codec(codec);
-}
-
-enh_esco_params_t esco_parameters_for_codec(esco_codec_t codec, bool /* b */) {
+enh_esco_params_t esco_parameters_for_codec(esco_codec_t codec, bool offload) {
inc_func_call_count(__func__);
- return test::mock::device_esco_parameters::esco_parameters_for_codec(codec);
+ return test::mock::device_esco_parameters::esco_parameters_for_codec(codec, offload);
}
// Mocked functions complete
// END mockcify generation
diff --git a/system/test/mock/mock_device_esco_parameters.h b/system/test/mock/mock_device_esco_parameters.h
index 92e5ad085d..327f2ddc92 100644
--- a/system/test/mock/mock_device_esco_parameters.h
+++ b/system/test/mock/mock_device_esco_parameters.h
@@ -38,9 +38,9 @@ namespace device_esco_parameters {
// Return: enh_esco_params_t
struct esco_parameters_for_codec {
enh_esco_params_t return_value{};
- std::function<enh_esco_params_t(esco_codec_t codec)> body{
- [this](esco_codec_t /* codec */) { return return_value; }};
- enh_esco_params_t operator()(esco_codec_t codec) { return body(codec); }
+ std::function<enh_esco_params_t(esco_codec_t codec, bool offload)> body{
+ [this](esco_codec_t /* codec */, bool /* offload */) { return return_value; }};
+ enh_esco_params_t operator()(esco_codec_t codec, bool offload) { return body(codec, offload); }
};
extern struct esco_parameters_for_codec esco_parameters_for_codec;
diff --git a/system/test/mock/mock_device_interop.cc b/system/test/mock/mock_device_interop.cc
index 0f7a0a27e5..ae65e50634 100644
--- a/system/test/mock/mock_device_interop.cc
+++ b/system/test/mock/mock_device_interop.cc
@@ -25,15 +25,13 @@
#include <cstdint>
#include "device/include/interop.h"
+#include "device/include/interop_config.h"
#include "test/common/mock_functions.h"
// Original usings
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace device_interop {
@@ -70,7 +68,6 @@ struct interop_match_addr_or_name interop_match_addr_or_name;
struct interop_match_manufacturer interop_match_manufacturer;
struct interop_match_name interop_match_name;
struct interop_match_vendor_product_ids interop_match_vendor_product_ids;
-struct token_to_ul token_to_ul;
} // namespace device_interop
} // namespace mock
@@ -103,7 +100,6 @@ bool interop_match_addr_or_name::return_value = false;
bool interop_match_manufacturer::return_value = false;
bool interop_match_name::return_value = false;
bool interop_match_vendor_product_ids::return_value = false;
-bool token_to_ul::return_value = false;
} // namespace device_interop
} // namespace mock
@@ -257,9 +253,5 @@ bool interop_match_vendor_product_ids(const interop_feature_t feature, uint16_t
return test::mock::device_interop::interop_match_vendor_product_ids(feature, vendor_id,
product_id);
}
-bool token_to_ul(char* token, uint16_t* ul) {
- inc_func_call_count(__func__);
- return test::mock::device_interop::token_to_ul(token, ul);
-}
// Mocked functions complete
// END mockcify generation
diff --git a/system/test/mock/mock_device_interop.h b/system/test/mock/mock_device_interop.h
index ecb08d79fb..79193f3525 100644
--- a/system/test/mock/mock_device_interop.h
+++ b/system/test/mock/mock_device_interop.h
@@ -460,17 +460,6 @@ struct interop_match_vendor_product_ids {
};
extern struct interop_match_vendor_product_ids interop_match_vendor_product_ids;
-// Name: token_to_ul
-// Params: char* token, uint16_t* ul
-// Return: bool
-struct token_to_ul {
- static bool return_value;
- std::function<bool(char* token, uint16_t* ul)> body{
- [](char* /* token */, uint16_t* /* ul */) { return return_value; }};
- bool operator()(char* token, uint16_t* ul) { return body(token, ul); }
-};
-extern struct token_to_ul token_to_ul;
-
} // namespace device_interop
} // namespace mock
} // namespace test
diff --git a/system/test/mock/mock_device_iot_config.cc b/system/test/mock/mock_device_iot_config.cc
index 61308a883a..9f01127d48 100644
--- a/system/test/mock/mock_device_iot_config.cc
+++ b/system/test/mock/mock_device_iot_config.cc
@@ -19,11 +19,9 @@
#include <cstdint>
#include <string>
+#include "device/include/device_iot_config.h"
#include "test/common/mock_functions.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace device_iot_config {
diff --git a/system/test/mock/mock_jni_thread.cc b/system/test/mock/mock_jni_thread.cc
index 2a9365b748..afc1a28570 100644
--- a/system/test/mock/mock_jni_thread.cc
+++ b/system/test/mock/mock_jni_thread.cc
@@ -28,9 +28,6 @@
#include "test/common/jni_thread.h"
#include "test/common/mock_functions.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
bool is_on_jni_thread() {
inc_func_call_count(__func__);
return false;
diff --git a/system/test/mock/mock_main_shim_acl.cc b/system/test/mock/mock_main_shim_acl.cc
index 14bc02eb49..a98e809ad0 100644
--- a/system/test/mock/mock_main_shim_acl.cc
+++ b/system/test/mock/mock_main_shim_acl.cc
@@ -33,13 +33,8 @@
#include "test/common/mock_functions.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
using namespace bluetooth;
-void DumpsysL2cap(int /* fd */) { inc_func_call_count(__func__); }
-
void DumpsysAcl(int /* fd */) { inc_func_call_count(__func__); }
void DumpsysNeighbor(int /* fd */) { inc_func_call_count(__func__); }
diff --git a/system/test/mock/mock_main_shim_acl_interface.cc b/system/test/mock/mock_main_shim_acl_interface.cc
index 2ba6014443..b2f1d47af4 100644
--- a/system/test/mock/mock_main_shim_acl_interface.cc
+++ b/system/test/mock/mock_main_shim_acl_interface.cc
@@ -16,14 +16,10 @@
#include "main/shim/acl_interface.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace bluetooth {
namespace shim {
-namespace legacy {
-acl_interface_t acl_interface_ = {
+static acl_interface_t acl_interface_ = {
.on_send_data_upwards = nullptr,
.on_packets_completed = nullptr,
@@ -72,6 +68,5 @@ acl_interface_t acl_interface_ = {
const acl_interface_t& GetAclInterface() { return acl_interface_; }
-} // namespace legacy
} // namespace shim
} // namespace bluetooth
diff --git a/system/test/mock/mock_main_shim_hci_layer.cc b/system/test/mock/mock_main_shim_hci_layer.cc
index c02f009333..97d6c6e801 100644
--- a/system/test/mock/mock_main_shim_hci_layer.cc
+++ b/system/test/mock/mock_main_shim_hci_layer.cc
@@ -31,9 +31,6 @@
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace bluetooth::shim {
namespace testing {
const hci_t* test_interface = nullptr;
@@ -48,8 +45,6 @@ namespace mock {
namespace main_shim_hci_layer {
// Function state capture and return values, if needed
-struct OnTransmitPacketCommandComplete OnTransmitPacketCommandComplete;
-struct OnTransmitPacketStatus OnTransmitPacketStatus;
struct hci_on_reset_complete hci_on_reset_complete;
struct hci_on_shutting_down hci_on_shutting_down;
@@ -64,23 +59,6 @@ namespace main_shim_hci_layer {} // namespace main_shim_hci_layer
} // namespace mock
} // namespace test
-// Mocked functions, if any
-namespace cpp {
-void OnTransmitPacketCommandComplete(command_complete_cb complete_callback, void* context,
- bluetooth::hci::CommandCompleteView view) {
- inc_func_call_count(__func__);
- test::mock::main_shim_hci_layer::OnTransmitPacketCommandComplete(complete_callback, context,
- view);
-}
-void OnTransmitPacketStatus(command_status_cb status_callback, void* context,
- std::unique_ptr<OsiObject> command,
- bluetooth::hci::CommandStatusView view) {
- inc_func_call_count(__func__);
- test::mock::main_shim_hci_layer::OnTransmitPacketStatus(status_callback, context,
- std::move(command), view);
-}
-} // namespace cpp
-
void bluetooth::shim::hci_on_reset_complete() {
inc_func_call_count(__func__);
test::mock::main_shim_hci_layer::hci_on_reset_complete();
diff --git a/system/test/mock/mock_main_shim_hci_layer.h b/system/test/mock/mock_main_shim_hci_layer.h
index 7973bece5d..b46e525a9c 100644
--- a/system/test/mock/mock_main_shim_hci_layer.h
+++ b/system/test/mock/mock_main_shim_hci_layer.h
@@ -54,39 +54,6 @@ namespace test {
namespace mock {
namespace main_shim_hci_layer {
-// Shared state between mocked functions and tests
-// Name: OnTransmitPacketCommandComplete
-// Params: command_complete_cb complete_callback, void* context,
-// bluetooth::hci::CommandCompleteView view Return: void
-struct OnTransmitPacketCommandComplete {
- std::function<void(command_complete_cb complete_callback, void* context,
- bluetooth::hci::CommandCompleteView view)>
- body{[](command_complete_cb /* complete_callback */, void* /* context */,
- bluetooth::hci::CommandCompleteView /* view */) {}};
- void operator()(command_complete_cb complete_callback, void* context,
- bluetooth::hci::CommandCompleteView view) {
- body(complete_callback, context, view);
- }
-};
-extern struct OnTransmitPacketCommandComplete OnTransmitPacketCommandComplete;
-
-// Name: OnTransmitPacketStatus
-// Params: command_status_cb status_callback, void* context,
-// std::unique_ptr<OsiObject> command, bluetooth::hci::CommandStatusView view
-// Return: void
-struct OnTransmitPacketStatus {
- std::function<void(command_status_cb status_callback, void* context,
- std::unique_ptr<OsiObject> command, bluetooth::hci::CommandStatusView view)>
- body{[](command_status_cb /* status_callback */, void* /* context */,
- std::unique_ptr<OsiObject> /* command */,
- bluetooth::hci::CommandStatusView /* view */) {}};
- void operator()(command_status_cb status_callback, void* context,
- std::unique_ptr<OsiObject> command, bluetooth::hci::CommandStatusView view) {
- body(status_callback, context, std::move(command), view);
- }
-};
-extern struct OnTransmitPacketStatus OnTransmitPacketStatus;
-
// Name: hci_layer_get_interface
// Params:
// Return: const hci_t*
diff --git a/system/test/mock/mock_osi_future.cc b/system/test/mock/mock_osi_future.cc
index c7c98a3ac7..d1b5e1b946 100644
--- a/system/test/mock/mock_osi_future.cc
+++ b/system/test/mock/mock_osi_future.cc
@@ -27,9 +27,6 @@
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace osi_future {
@@ -37,7 +34,6 @@ namespace osi_future {
// Function state capture and return values, if needed
struct future_await future_await;
struct future_new future_new;
-struct future_new_named future_new_named;
struct future_new_immediate future_new_immediate;
struct future_ready future_ready;
@@ -54,10 +50,6 @@ future_t* future_new(void) {
inc_func_call_count(__func__);
return test::mock::osi_future::future_new();
}
-future_t* future_new_named(const char* name) {
- inc_func_call_count(__func__);
- return test::mock::osi_future::future_new_named(name);
-}
future_t* future_new_immediate(void* value) {
inc_func_call_count(__func__);
return test::mock::osi_future::future_new_immediate(value);
diff --git a/system/test/mock/mock_osi_future.h b/system/test/mock/mock_osi_future.h
index bb4ab1f610..e2fa5aad9b 100644
--- a/system/test/mock/mock_osi_future.h
+++ b/system/test/mock/mock_osi_future.h
@@ -57,17 +57,6 @@ struct future_new {
};
extern struct future_new future_new;
-// Name: future_new_named
-// Params: const char* name
-// Return: future_t*
-struct future_new_named {
- future_t* return_value{0};
- std::function<future_t*(const char* name)> body{
- [this](const char* /* name */) { return return_value; }};
- future_t* operator()(const char* name) { return body(name); }
-};
-extern struct future_new_named future_new_named;
-
// Name: future_new_immediate
// Params: void* value
// Return: future_t*
diff --git a/system/test/mock/mock_osi_list.cc b/system/test/mock/mock_osi_list.cc
index 2aa2bfd462..c081aa5fd3 100644
--- a/system/test/mock/mock_osi_list.cc
+++ b/system/test/mock/mock_osi_list.cc
@@ -27,9 +27,6 @@
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace osi_list {
@@ -49,7 +46,6 @@ struct list_insert_after list_insert_after;
struct list_is_empty list_is_empty;
struct list_length list_length;
struct list_new list_new;
-struct list_new_internal list_new_internal;
struct list_next list_next;
struct list_node list_node;
struct list_prepend list_prepend;
@@ -116,10 +112,6 @@ list_t* list_new(list_free_cb callback) {
inc_func_call_count(__func__);
return test::mock::osi_list::list_new(callback);
}
-list_t* list_new_internal(list_free_cb callback, const allocator_t* zeroed_allocator) {
- inc_func_call_count(__func__);
- return test::mock::osi_list::list_new_internal(callback, zeroed_allocator);
-}
list_node_t* list_next(const list_node_t* node) {
inc_func_call_count(__func__);
return test::mock::osi_list::list_next(node);
diff --git a/system/test/mock/mock_osi_list.h b/system/test/mock/mock_osi_list.h
index 86813a8adc..6f727953b4 100644
--- a/system/test/mock/mock_osi_list.h
+++ b/system/test/mock/mock_osi_list.h
@@ -193,21 +193,6 @@ struct list_new {
};
extern struct list_new list_new;
-// Name: list_new_internal
-// Params: list_free_cb callback, const allocator_t* zeroed_allocator
-// Return: list_t*
-struct list_new_internal {
- list_t* return_value{0};
- std::function<list_t*(list_free_cb callback, const allocator_t* zeroed_allocator)> body{
- [this](list_free_cb /* callback */, const allocator_t* /* zeroed_allocator */) {
- return return_value;
- }};
- list_t* operator()(list_free_cb callback, const allocator_t* zeroed_allocator) {
- return body(callback, zeroed_allocator);
- }
-};
-extern struct list_new_internal list_new_internal;
-
// Name: list_next
// Params: const list_node_t* node
// Return: list_node_t*
diff --git a/system/test/mock/mock_osi_mutex.cc b/system/test/mock/mock_osi_mutex.cc
index ff8aa0afb2..e7e1db9ef8 100644
--- a/system/test/mock/mock_osi_mutex.cc
+++ b/system/test/mock/mock_osi_mutex.cc
@@ -23,13 +23,11 @@
// Mock include file to share data between tests and mock
#include "test/mock/mock_osi_mutex.h"
+#include "osi/include/mutex.h"
#include "test/common/mock_functions.h"
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace osi_mutex {
diff --git a/system/test/mock/mock_osi_properties.cc b/system/test/mock/mock_osi_properties.cc
index f22b3e0e1d..28c0891f7c 100644
--- a/system/test/mock/mock_osi_properties.cc
+++ b/system/test/mock/mock_osi_properties.cc
@@ -26,13 +26,11 @@
#include <cstdint>
#include <vector>
+#include "osi/include/properties.h"
#include "test/common/mock_functions.h"
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace osi_properties {
diff --git a/system/test/mock/mock_osi_properties.h b/system/test/mock/mock_osi_properties.h
index ad1c29c8d3..bbdeb61474 100644
--- a/system/test/mock/mock_osi_properties.h
+++ b/system/test/mock/mock_osi_properties.h
@@ -24,9 +24,6 @@
#include <cstdint>
#include <functional>
-// Original included files, if any
-#include <cutils/properties.h>
-
// Mocked compile conditionals, if any
namespace test {
diff --git a/system/test/mock/mock_osi_socket.cc b/system/test/mock/mock_osi_socket.cc
index 7daa32c5e2..e605356954 100644
--- a/system/test/mock/mock_osi_socket.cc
+++ b/system/test/mock/mock_osi_socket.cc
@@ -23,13 +23,11 @@
// Mock include file to share data between tests and mock
#include "test/mock/mock_osi_socket.h"
+#include "osi/include/socket_utils/sockets.h"
#include "test/common/mock_functions.h"
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace osi_socket {
diff --git a/system/test/mock/mock_osi_thread_scheduler.cc b/system/test/mock/mock_osi_thread_scheduler.cc
deleted file mode 100644
index a248efc327..0000000000
--- a/system/test/mock/mock_osi_thread_scheduler.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Generated mock file from original source file
- * Functions generated:2
- *
- * mockcify.pl ver 0.3.0
- */
-// Mock include file to share data between tests and mock
-#include "test/mock/mock_osi_thread_scheduler.h"
-
-#include "test/common/mock_functions.h"
-
-// Mocked internal structures, if any
-
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
-namespace test {
-namespace mock {
-namespace osi_thread_scheduler {
-
-// Function state capture and return values, if needed
-struct thread_scheduler_enable_real_time thread_scheduler_enable_real_time;
-struct thread_scheduler_get_priority_range thread_scheduler_get_priority_range;
-
-} // namespace osi_thread_scheduler
-} // namespace mock
-} // namespace test
-
-// Mocked functions, if any
-bool thread_scheduler_enable_real_time(pid_t linux_tid) {
- inc_func_call_count(__func__);
- return test::mock::osi_thread_scheduler::thread_scheduler_enable_real_time(linux_tid);
-}
-bool thread_scheduler_get_priority_range(int& min, int& max) {
- inc_func_call_count(__func__);
- return test::mock::osi_thread_scheduler::thread_scheduler_get_priority_range(min, max);
-}
-// Mocked functions complete
-// END mockcify generation
diff --git a/system/test/mock/mock_osi_thread_scheduler.h b/system/test/mock/mock_osi_thread_scheduler.h
deleted file mode 100644
index f80f84b069..0000000000
--- a/system/test/mock/mock_osi_thread_scheduler.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Generated mock file from original source file
- * Functions generated:2
- *
- * mockcify.pl ver 0.3.0
- */
-
-#include <sys/types.h>
-
-#include <functional>
-
-// Original included files, if any
-
-// Mocked compile conditionals, if any
-
-namespace test {
-namespace mock {
-namespace osi_thread_scheduler {
-
-// Shared state between mocked functions and tests
-// Name: osi_enable_real_time_scheduling
-// Params: pid_t linux_tid
-// Return: bool
-struct thread_scheduler_enable_real_time {
- bool return_value{false};
- std::function<bool(pid_t linux_tid)> body{[this](pid_t /* linux_tid */) { return return_value; }};
- bool operator()(pid_t linux_tid) { return body(linux_tid); }
-};
-extern struct thread_scheduler_enable_real_time thread_scheduler_enable_real_time;
-
-// Name: osi_fifo_scheduing_priority_range
-// Params: int& min, int& max
-// Return: bool
-struct thread_scheduler_get_priority_range {
- bool return_value{false};
- std::function<bool(int& min, int& max)> body{
- [this](int& /* min */, int& /* max */) { return return_value; }};
- bool operator()(int& min, int& max) { return body(min, max); }
-};
-extern struct thread_scheduler_get_priority_range thread_scheduler_get_priority_range;
-
-} // namespace osi_thread_scheduler
-} // namespace mock
-} // namespace test
-
-// END mockcify generation
diff --git a/system/test/mock/mock_osi_wakelock.cc b/system/test/mock/mock_osi_wakelock.cc
index b2805a7cba..5a5759a16e 100644
--- a/system/test/mock/mock_osi_wakelock.cc
+++ b/system/test/mock/mock_osi_wakelock.cc
@@ -23,13 +23,11 @@
// Mock include file to share data between tests and mock
#include "test/mock/mock_osi_wakelock.h"
+#include "osi/include/wakelock.h"
#include "test/common/mock_functions.h"
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace osi_wakelock {
diff --git a/system/test/mock/mock_stack_a2dp_sbc.cc b/system/test/mock/mock_stack_a2dp_sbc.cc
index 7423ae79cb..71c0dd24ff 100644
--- a/system/test/mock/mock_stack_a2dp_sbc.cc
+++ b/system/test/mock/mock_stack_a2dp_sbc.cc
@@ -25,15 +25,13 @@
#include <cstdint>
#include <string>
+#include "stack/include/a2dp_sbc.h"
#include "test/common/mock_functions.h"
// Original usings
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace stack_a2dp_sbc {
diff --git a/system/test/mock/mock_stack_avrc_apt.cc b/system/test/mock/mock_stack_avrc_apt.cc
index 2380d1756e..6922da47cf 100644
--- a/system/test/mock/mock_stack_avrc_apt.cc
+++ b/system/test/mock/mock_stack_avrc_apt.cc
@@ -24,15 +24,13 @@
#include <cstdint>
+#include "stack/include/avrc_api.h"
#include "test/common/mock_functions.h"
// Original usings
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace stack_avrc_apt {
diff --git a/system/test/mock/mock_stack_avrc_utils.cc b/system/test/mock/mock_stack_avrc_utils.cc
index b4eca59731..6953823feb 100644
--- a/system/test/mock/mock_stack_avrc_utils.cc
+++ b/system/test/mock/mock_stack_avrc_utils.cc
@@ -24,15 +24,14 @@
#include <cstdint>
+#include "stack/avrc/avrc_int.h"
+#include "stack/include/avrc_api.h"
#include "test/common/mock_functions.h"
// Original usings
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace stack_avrc_utils {
diff --git a/system/test/mock/mock_stack_btm_ble.cc b/system/test/mock/mock_stack_btm_ble.cc
index 620b9e252c..f9dcac4673 100644
--- a/system/test/mock/mock_stack_btm_ble.cc
+++ b/system/test/mock/mock_stack_btm_ble.cc
@@ -25,7 +25,10 @@
#include <cstdint>
#include <optional>
+#include "stack/btm/btm_ble_int.h"
#include "stack/include/btm_api_types.h"
+#include "stack/include/btm_ble_api.h"
+#include "stack/include/btm_ble_sec_api.h"
#include "stack/include/btm_status.h"
#include "test/common/mock_functions.h"
@@ -33,9 +36,6 @@
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace stack_btm_ble {
@@ -70,10 +70,6 @@ struct btm_ble_ltk_request_reply btm_ble_ltk_request_reply;
struct btm_ble_read_sec_key_size btm_ble_read_sec_key_size;
struct btm_ble_reset_id btm_ble_reset_id;
struct btm_ble_set_encryption btm_ble_set_encryption;
-struct btm_ble_set_keep_rfu_in_auth_req btm_ble_set_keep_rfu_in_auth_req;
-struct btm_ble_set_no_disc_if_pair_fail btm_ble_set_no_disc_if_pair_fail;
-struct btm_ble_set_test_local_sign_cntr_value btm_ble_set_test_local_sign_cntr_value;
-struct btm_ble_set_test_mac_value btm_ble_set_test_mac_value;
struct btm_ble_start_encrypt btm_ble_start_encrypt;
struct btm_ble_start_sec_check btm_ble_start_sec_check;
struct btm_ble_test_command_complete btm_ble_test_command_complete;
@@ -243,22 +239,6 @@ tBTM_STATUS btm_ble_set_encryption(const RawAddress& bd_addr, tBTM_BLE_SEC_ACT s
inc_func_call_count(__func__);
return test::mock::stack_btm_ble::btm_ble_set_encryption(bd_addr, sec_act, link_role);
}
-void btm_ble_set_keep_rfu_in_auth_req(bool keep_rfu) {
- inc_func_call_count(__func__);
- test::mock::stack_btm_ble::btm_ble_set_keep_rfu_in_auth_req(keep_rfu);
-}
-void btm_ble_set_no_disc_if_pair_fail(bool disable_disc) {
- inc_func_call_count(__func__);
- test::mock::stack_btm_ble::btm_ble_set_no_disc_if_pair_fail(disable_disc);
-}
-void btm_ble_set_test_local_sign_cntr_value(bool enable, uint32_t test_local_sign_cntr) {
- inc_func_call_count(__func__);
- test::mock::stack_btm_ble::btm_ble_set_test_local_sign_cntr_value(enable, test_local_sign_cntr);
-}
-void btm_ble_set_test_mac_value(bool enable, uint8_t* p_test_mac_val) {
- inc_func_call_count(__func__);
- test::mock::stack_btm_ble::btm_ble_set_test_mac_value(enable, p_test_mac_val);
-}
tBTM_STATUS btm_ble_start_encrypt(const RawAddress& bda, bool use_stk, Octet16* p_stk) {
inc_func_call_count(__func__);
return test::mock::stack_btm_ble::btm_ble_start_encrypt(bda, use_stk, p_stk);
diff --git a/system/test/mock/mock_stack_btm_ble.h b/system/test/mock/mock_stack_btm_ble.h
index 9c1b14d014..aed50358e2 100644
--- a/system/test/mock/mock_stack_btm_ble.h
+++ b/system/test/mock/mock_stack_btm_ble.h
@@ -414,46 +414,6 @@ struct btm_ble_set_encryption {
};
extern struct btm_ble_set_encryption btm_ble_set_encryption;
-// Name: btm_ble_set_keep_rfu_in_auth_req
-// Params: bool keep_rfu
-// Return: void
-struct btm_ble_set_keep_rfu_in_auth_req {
- std::function<void(bool)> body{[](bool /* keep_rfu */) {}};
- void operator()(bool keep_rfu) { body(keep_rfu); }
-};
-extern struct btm_ble_set_keep_rfu_in_auth_req btm_ble_set_keep_rfu_in_auth_req;
-
-// Name: btm_ble_set_no_disc_if_pair_fail
-// Params: bool disable_disc
-// Return: void
-struct btm_ble_set_no_disc_if_pair_fail {
- std::function<void(bool)> body{[](bool /* disable_disc */) {}};
- void operator()(bool disable_disc) { body(disable_disc); }
-};
-extern struct btm_ble_set_no_disc_if_pair_fail btm_ble_set_no_disc_if_pair_fail;
-
-// Name: btm_ble_set_test_local_sign_cntr_value
-// Params: bool enable, uint32_t test_local_sign_cntr
-// Return: void
-struct btm_ble_set_test_local_sign_cntr_value {
- std::function<void(bool enable, uint32_t test_local_sign_cntr)> body{
- [](bool /* enable */, uint32_t /* test_local_sign_cntr */) {}};
- void operator()(bool enable, uint32_t test_local_sign_cntr) {
- body(enable, test_local_sign_cntr);
- }
-};
-extern struct btm_ble_set_test_local_sign_cntr_value btm_ble_set_test_local_sign_cntr_value;
-
-// Name: btm_ble_set_test_mac_value
-// Params: bool enable, uint8_t* p_test_mac_val
-// Return: void
-struct btm_ble_set_test_mac_value {
- std::function<void(bool enable, uint8_t* p_test_mac_val)> body{
- [](bool /* enable */, uint8_t* /* p_test_mac_val */) {}};
- void operator()(bool enable, uint8_t* p_test_mac_val) { body(enable, p_test_mac_val); }
-};
-extern struct btm_ble_set_test_mac_value btm_ble_set_test_mac_value;
-
// Name: btm_ble_start_encrypt
// Params: const RawAddress& bda, bool use_stk, Octet16* p_stk
// Return: tBTM_STATUS
diff --git a/system/test/mock/mock_stack_btm_ble_addr.cc b/system/test/mock/mock_stack_btm_ble_addr.cc
index 2a52fb57ea..5f7998d1fc 100644
--- a/system/test/mock/mock_stack_btm_ble_addr.cc
+++ b/system/test/mock/mock_stack_btm_ble_addr.cc
@@ -25,6 +25,9 @@
// Original included files, if any
+#include "stack/btm/btm_ble_int.h"
+#include "stack/include/btm_ble_addr.h"
+#include "stack/include/btm_ble_privacy.h"
#include "test/common/mock_functions.h"
#include "types/ble_address_with_type.h"
#include "types/raw_address.h"
@@ -32,9 +35,6 @@
// Mocked compile conditionals, if any
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace stack_btm_ble_addr {
diff --git a/system/test/mock/mock_stack_btm_ble_gap.cc b/system/test/mock/mock_stack_btm_ble_gap.cc
index e14ad5116b..1eafc5f416 100644
--- a/system/test/mock/mock_stack_btm_ble_gap.cc
+++ b/system/test/mock/mock_stack_btm_ble_gap.cc
@@ -27,6 +27,7 @@
#include "stack/btm/btm_ble_int.h"
#include "stack/btm/btm_ble_int_types.h"
#include "stack/include/bt_dev_class.h"
+#include "stack/include/btm_ble_api.h"
#include "stack/include/btm_status.h"
#include "stack/include/hci_error_code.h"
#include "stack/include/rnr_interface.h"
@@ -34,9 +35,6 @@
#include "types/ble_address_with_type.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
using StartSyncCb = base::Callback<void(
uint8_t /*status*/, uint16_t /*sync_handle*/, uint8_t /*advertising_sid*/,
uint8_t /*address_type*/, RawAddress /*address*/, uint8_t /*phy*/, uint16_t /*interval*/)>;
@@ -104,10 +102,6 @@ void BTM_BleGetDynamicAudioBuffer(
void BTM_BleGetVendorCapabilities(tBTM_BLE_VSC_CB* /* p_cmn_vsc_cb */) {
inc_func_call_count(__func__);
}
-void BTM_BleSetScanParams(uint32_t /* scan_interval */, uint32_t /* scan_window */,
- tBLE_SCAN_MODE /* scan_mode */, base::Callback<void(uint8_t)> /* cb */) {
- inc_func_call_count(__func__);
-}
void btm_ble_decrement_link_topology_mask(uint8_t /* link_role */) {
inc_func_call_count(__func__);
}
@@ -150,7 +144,8 @@ void btm_ble_write_adv_enable_complete(uint8_t* /* p */, uint16_t /* evt_len */)
}
void btm_send_hci_set_scan_params(uint8_t /* scan_type */, uint16_t /* scan_int_1m */,
uint16_t /* scan_win_1m */, uint16_t /* scan_int_coded */,
- uint16_t /* scan_win_coded */, tBLE_ADDR_TYPE /* addr_type_own */,
+ uint16_t /* scan_win_coded */, uint8_t /* scan_phy */,
+ tBLE_ADDR_TYPE /* addr_type_own */,
uint8_t /* scan_filter_policy */) {
inc_func_call_count(__func__);
}
diff --git a/system/test/mock/mock_stack_btm_ble_privacy.cc b/system/test/mock/mock_stack_btm_ble_privacy.cc
index 7781d9cc75..4c523b12e8 100644
--- a/system/test/mock/mock_stack_btm_ble_privacy.cc
+++ b/system/test/mock/mock_stack_btm_ble_privacy.cc
@@ -25,14 +25,13 @@
// Original included files, if any
+#include "stack/include/ble_hci_link_interface.h"
+#include "stack/include/btm_ble_privacy.h"
#include "test/common/mock_functions.h"
// Mocked compile conditionals, if any
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace stack_btm_ble_privacy {
@@ -42,8 +41,6 @@ struct btm_ble_clear_resolving_list_complete btm_ble_clear_resolving_list_comple
struct btm_ble_add_resolving_list_entry_complete btm_ble_add_resolving_list_entry_complete;
struct btm_ble_remove_resolving_list_entry_complete btm_ble_remove_resolving_list_entry_complete;
struct btm_ble_read_resolving_list_entry_complete btm_ble_read_resolving_list_entry_complete;
-struct btm_ble_remove_resolving_list_entry btm_ble_remove_resolving_list_entry;
-struct btm_ble_clear_resolving_list btm_ble_clear_resolving_list;
struct btm_ble_read_resolving_list_entry btm_ble_read_resolving_list_entry;
struct btm_ble_resolving_list_load_dev btm_ble_resolving_list_load_dev;
struct btm_ble_resolving_list_remove_dev btm_ble_resolving_list_remove_dev;
@@ -70,14 +67,6 @@ void btm_ble_read_resolving_list_entry_complete(const uint8_t* p, uint16_t evt_l
inc_func_call_count(__func__);
test::mock::stack_btm_ble_privacy::btm_ble_read_resolving_list_entry_complete(p, evt_len);
}
-tBTM_STATUS btm_ble_remove_resolving_list_entry(tBTM_SEC_DEV_REC* p_dev_rec) {
- inc_func_call_count(__func__);
- return test::mock::stack_btm_ble_privacy::btm_ble_remove_resolving_list_entry(p_dev_rec);
-}
-void btm_ble_clear_resolving_list(void) {
- inc_func_call_count(__func__);
- test::mock::stack_btm_ble_privacy::btm_ble_clear_resolving_list();
-}
bool btm_ble_read_resolving_list_entry(tBTM_SEC_DEV_REC* p_dev_rec) {
inc_func_call_count(__func__);
return test::mock::stack_btm_ble_privacy::btm_ble_read_resolving_list_entry(p_dev_rec);
diff --git a/system/test/mock/mock_stack_btm_ble_privacy.h b/system/test/mock/mock_stack_btm_ble_privacy.h
index 357e7adf3d..2cc88fac60 100644
--- a/system/test/mock/mock_stack_btm_ble_privacy.h
+++ b/system/test/mock/mock_stack_btm_ble_privacy.h
@@ -71,23 +71,6 @@ struct btm_ble_read_resolving_list_entry_complete {
void operator()(const uint8_t* p, uint16_t evt_len) { body(p, evt_len); }
};
extern struct btm_ble_read_resolving_list_entry_complete btm_ble_read_resolving_list_entry_complete;
-// Name: btm_ble_remove_resolving_list_entry
-// Params: tBTM_SEC_DEV_REC* p_dev_rec
-// Returns: tBTM_STATUS
-struct btm_ble_remove_resolving_list_entry {
- std::function<tBTM_STATUS(tBTM_SEC_DEV_REC* p_dev_rec)> body{
- [](tBTM_SEC_DEV_REC* /* p_dev_rec */) { return tBTM_STATUS::BTM_SUCCESS; }};
- tBTM_STATUS operator()(tBTM_SEC_DEV_REC* p_dev_rec) { return body(p_dev_rec); }
-};
-extern struct btm_ble_remove_resolving_list_entry btm_ble_remove_resolving_list_entry;
-// Name: btm_ble_clear_resolving_list
-// Params: void
-// Returns: void
-struct btm_ble_clear_resolving_list {
- std::function<void(void)> body{[](void) {}};
- void operator()(void) { body(); }
-};
-extern struct btm_ble_clear_resolving_list btm_ble_clear_resolving_list;
// Name: btm_ble_read_resolving_list_entry
// Params: tBTM_SEC_DEV_REC* p_dev_rec
// Returns: bool
diff --git a/system/test/mock/mock_stack_btm_dev.cc b/system/test/mock/mock_stack_btm_dev.cc
index 60f88b0d6e..779d482219 100644
--- a/system/test/mock/mock_stack_btm_dev.cc
+++ b/system/test/mock/mock_stack_btm_dev.cc
@@ -28,13 +28,12 @@
#include "stack/btm/btm_dev.h"
#include "stack/include/bt_octets.h"
+#include "stack/include/btm_ble_addr.h"
#include "stack/include/btm_client_interface.h"
+#include "stack/include/btm_sec_api.h"
#include "test/common/mock_functions.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace stack_btm_dev {
@@ -96,8 +95,6 @@ void btm_consolidate_dev(tBTM_SEC_DEV_REC* /* p_target_rec */) { inc_func_call_c
void btm_dev_consolidate_existing_connections(const RawAddress& /* bd_addr */) {
inc_func_call_count(__func__);
}
-void BTM_SecDump(const std::string& /* label */) { inc_func_call_count(__func__); }
-void BTM_SecDumpDev(const RawAddress& /* bd_addr */) { inc_func_call_count(__func__); }
std::vector<tBTM_SEC_DEV_REC*> btm_get_sec_dev_rec() {
inc_func_call_count(__func__);
return {};
diff --git a/system/test/mock/mock_stack_btm_devctl.cc b/system/test/mock/mock_stack_btm_devctl.cc
index da8d8b2053..82a7f3f275 100644
--- a/system/test/mock/mock_stack_btm_devctl.cc
+++ b/system/test/mock/mock_stack_btm_devctl.cc
@@ -23,15 +23,15 @@
#include <stddef.h>
#include <stdlib.h>
+#include "stack/btm/internal/btm_api.h"
#include "stack/include/bt_dev_class.h"
#include "stack/include/btm_api_types.h"
+#include "stack/include/btm_sec_api.h"
#include "stack/include/btm_status.h"
+#include "stack/include/dev_hci_link_interface.h"
#include "test/common/mock_functions.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
tBTM_STATUS BTM_DeleteStoredLinkKey(const RawAddress* /* bd_addr */, tBTM_CMPL_CB* /* p_cb */) {
inc_func_call_count(__func__);
return tBTM_STATUS::BTM_SUCCESS;
diff --git a/system/test/mock/mock_stack_btm_hfp_lc3_encoder.cc b/system/test/mock/mock_stack_btm_hfp_lc3_encoder.cc
index d2ed992484..ef5d533dcc 100644
--- a/system/test/mock/mock_stack_btm_hfp_lc3_encoder.cc
+++ b/system/test/mock/mock_stack_btm_hfp_lc3_encoder.cc
@@ -26,15 +26,13 @@
#ifndef __clang_analyzer__
+#include "stack/include/hfp_lc3_encoder.h"
#include "test/common/mock_functions.h"
// Original usings
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace stack_btm_hfp_lc3_encoder {
diff --git a/system/test/mock/mock_stack_btm_hfp_msbc_decoder.cc b/system/test/mock/mock_stack_btm_hfp_msbc_decoder.cc
index dea537f621..92ef9ec1ef 100644
--- a/system/test/mock/mock_stack_btm_hfp_msbc_decoder.cc
+++ b/system/test/mock/mock_stack_btm_hfp_msbc_decoder.cc
@@ -24,15 +24,13 @@
#include <cstdint>
+#include "stack/include/hfp_msbc_decoder.h"
#include "test/common/mock_functions.h"
// Original usings
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace stack_btm_hfp_msbc_decoder {
diff --git a/system/test/mock/mock_stack_btm_hfp_msbc_encoder.cc b/system/test/mock/mock_stack_btm_hfp_msbc_encoder.cc
index 3c38e66754..f963bf9691 100644
--- a/system/test/mock/mock_stack_btm_hfp_msbc_encoder.cc
+++ b/system/test/mock/mock_stack_btm_hfp_msbc_encoder.cc
@@ -27,15 +27,13 @@
#ifndef __clang_analyzer__
+#include "stack/include/hfp_msbc_encoder.h"
#include "test/common/mock_functions.h"
// Original usings
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace stack_btm_hfp_msbc_encoder {
diff --git a/system/test/mock/mock_stack_btm_inq.cc b/system/test/mock/mock_stack_btm_inq.cc
index ed99d05e6f..4c1f49a7e2 100644
--- a/system/test/mock/mock_stack_btm_inq.cc
+++ b/system/test/mock/mock_stack_btm_inq.cc
@@ -24,16 +24,16 @@
#include <cstdint>
+#include "stack/btm/internal/btm_api.h"
+#include "stack/include/btm_inq.h"
#include "stack/include/btm_status.h"
+#include "stack/include/inq_hci_link_interface.h"
#include "test/common/mock_functions.h"
// Original usings
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace stack_btm_inq {
@@ -48,7 +48,6 @@ struct BTM_SetConnectability BTM_SetConnectability;
struct BTM_SetDiscoverability BTM_SetDiscoverability;
struct BTM_SetInquiryMode BTM_SetInquiryMode;
struct BTM_StartInquiry BTM_StartInquiry;
-struct btm_clr_inq_db btm_clr_inq_db;
struct btm_clr_inq_result_flt btm_clr_inq_result_flt;
struct btm_inq_db_find btm_inq_db_find;
struct btm_inq_db_new btm_inq_db_new;
@@ -116,10 +115,6 @@ tBTM_STATUS BTM_StartInquiry(tBTM_INQ_RESULTS_CB* p_results_cb, tBTM_CMPL_CB* p_
inc_func_call_count(__func__);
return test::mock::stack_btm_inq::BTM_StartInquiry(p_results_cb, p_cmpl_cb);
}
-void btm_clr_inq_db(const RawAddress* p_bda) {
- inc_func_call_count(__func__);
- test::mock::stack_btm_inq::btm_clr_inq_db(p_bda);
-}
void btm_clr_inq_result_flt(void) {
inc_func_call_count(__func__);
test::mock::stack_btm_inq::btm_clr_inq_result_flt();
diff --git a/system/test/mock/mock_stack_btm_inq.h b/system/test/mock/mock_stack_btm_inq.h
index 4c0acd08a4..68b9665dff 100644
--- a/system/test/mock/mock_stack_btm_inq.h
+++ b/system/test/mock/mock_stack_btm_inq.h
@@ -143,15 +143,6 @@ struct BTM_StartInquiry {
};
extern struct BTM_StartInquiry BTM_StartInquiry;
-// Name: btm_clr_inq_db
-// Params: const RawAddress* p_bda
-// Return: void
-struct btm_clr_inq_db {
- std::function<void(const RawAddress* p_bda)> body{[](const RawAddress* /* p_bda */) {}};
- void operator()(const RawAddress* p_bda) { body(p_bda); }
-};
-extern struct btm_clr_inq_db btm_clr_inq_db;
-
// Name: btm_clr_inq_result_flt
// Params: void
// Return: void
diff --git a/system/test/mock/mock_stack_btm_interface.cc b/system/test/mock/mock_stack_btm_interface.cc
index 2361ce1307..44c542081d 100644
--- a/system/test/mock/mock_stack_btm_interface.cc
+++ b/system/test/mock/mock_stack_btm_interface.cc
@@ -18,6 +18,9 @@
* Generated mock file from original source file
*/
+#include "mock_stack_btm_interface.h"
+
+#include "stack/include/btm_ble_api.h"
#include "stack/include/btm_ble_api_types.h"
#include "stack/include/btm_ble_sec_api_types.h"
#include "stack/include/btm_client_interface.h"
@@ -26,9 +29,6 @@
#include "types/bt_transport.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
// Test accessible feature page
uint8_t hci_feature_bytes_per_page[HCI_FEATURE_BYTES_PER_PAGE] = {};
diff --git a/system/test/mock/mock_stack_btm_main.cc b/system/test/mock/mock_stack_btm_main.cc
index e188d0d89c..3dce60a6f4 100644
--- a/system/test/mock/mock_stack_btm_main.cc
+++ b/system/test/mock/mock_stack_btm_main.cc
@@ -21,13 +21,12 @@
#include <string>
+#include "stack/include/btm_client_interface.h"
+#include "stack/include/btm_log_history.h"
#include "test/common/mock_functions.h"
#include "types/ble_address_with_type.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
void BTM_LogHistory(const std::string& /* tag */, const RawAddress& /* bd_addr */,
const std::string& /* msg */) {
inc_func_call_count(__func__);
diff --git a/system/test/mock/mock_stack_btm_sco.cc b/system/test/mock/mock_stack_btm_sco.cc
index 0128227349..7012a3cfa3 100644
--- a/system/test/mock/mock_stack_btm_sco.cc
+++ b/system/test/mock/mock_stack_btm_sco.cc
@@ -24,15 +24,14 @@
#include "device/include/esco_parameters.h"
#include "hci/class_of_device.h"
#include "stack/btm/btm_sco.h"
+#include "stack/btm/internal/btm_api.h"
#include "stack/include/btm_api_types.h"
#include "stack/include/btm_status.h"
#include "stack/include/hci_error_code.h"
+#include "stack/include/sco_hci_link_interface.h"
#include "test/common/mock_functions.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
const RawAddress* BTM_ReadScoBdAddr(uint16_t /* sco_inx */) {
inc_func_call_count(__func__);
return nullptr;
diff --git a/system/test/mock/mock_stack_btm_sec.cc b/system/test/mock/mock_stack_btm_sec.cc
index 4ca3189b30..ca943498fe 100644
--- a/system/test/mock/mock_stack_btm_sec.cc
+++ b/system/test/mock/mock_stack_btm_sec.cc
@@ -25,6 +25,8 @@
#include <cstdint>
#include <string>
+#include "stack/btm/btm_sec.h"
+#include "stack/include/btm_ble_sec_api.h"
#include "stack/include/btm_sec_api_types.h"
#include "stack/include/btm_status.h"
#include "test/common/mock_functions.h"
@@ -34,9 +36,6 @@
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace stack_btm_sec {
@@ -74,7 +73,6 @@ struct btm_rem_oob_req btm_rem_oob_req;
struct btm_sec_abort_access_req btm_sec_abort_access_req;
struct btm_sec_auth_complete btm_sec_auth_complete;
struct btm_sec_bond_by_transport btm_sec_bond_by_transport;
-struct btm_sec_check_pending_reqs btm_sec_check_pending_reqs;
struct btm_sec_clear_ble_keys btm_sec_clear_ble_keys;
struct btm_sec_conn_req btm_sec_conn_req;
struct btm_sec_connected btm_sec_connected;
@@ -124,7 +122,7 @@ bool BTM_SecIsLeSecurityPending::return_value = false;
bool BTM_SecRegister::return_value = false;
tBTM_STATUS BTM_SetEncryption::return_value = tBTM_STATUS::BTM_SUCCESS;
bool BTM_SetSecurityLevel::return_value = false;
-const DEV_CLASS btm_get_dev_class::return_value = kDevClassEmpty;
+DEV_CLASS btm_get_dev_class::return_value = kDevClassEmpty;
tBTM_STATUS btm_sec_bond_by_transport::return_value = tBTM_STATUS::BTM_SUCCESS;
tBTM_STATUS btm_sec_disconnect::return_value = tBTM_STATUS::BTM_SUCCESS;
bool btm_sec_is_a_bonded_dev::return_value = false;
@@ -238,7 +236,7 @@ void btm_create_conn_cancel_complete(uint8_t status, const RawAddress bd_addr) {
inc_func_call_count(__func__);
test::mock::stack_btm_sec::btm_create_conn_cancel_complete(status, bd_addr);
}
-const DEV_CLASS btm_get_dev_class(const RawAddress& bda) {
+DEV_CLASS btm_get_dev_class(const RawAddress& bda) {
inc_func_call_count(__func__);
return test::mock::stack_btm_sec::btm_get_dev_class(bda);
}
@@ -275,10 +273,6 @@ tBTM_STATUS btm_sec_bond_by_transport(const RawAddress& bd_addr, tBLE_ADDR_TYPE
inc_func_call_count(__func__);
return test::mock::stack_btm_sec::btm_sec_bond_by_transport(bd_addr, addr_type, transport);
}
-void btm_sec_check_pending_reqs(void) {
- inc_func_call_count(__func__);
- test::mock::stack_btm_sec::btm_sec_check_pending_reqs();
-}
void btm_sec_clear_ble_keys(tBTM_SEC_DEV_REC* p_dev_rec) {
inc_func_call_count(__func__);
test::mock::stack_btm_sec::btm_sec_clear_ble_keys(p_dev_rec);
diff --git a/system/test/mock/mock_stack_btm_sec.h b/system/test/mock/mock_stack_btm_sec.h
index 688ab5dca1..a54782c9fb 100644
--- a/system/test/mock/mock_stack_btm_sec.h
+++ b/system/test/mock/mock_stack_btm_sec.h
@@ -345,10 +345,10 @@ extern struct btm_create_conn_cancel_complete btm_create_conn_cancel_complete;
// Params: const RawAddress& bda
// Return: DEV_CLASS
struct btm_get_dev_class {
- static const DEV_CLASS return_value;
- std::function<const DEV_CLASS(const RawAddress& bda)> body{
+ static DEV_CLASS return_value;
+ std::function<DEV_CLASS(const RawAddress& bda)> body{
[](const RawAddress& /* bda */) { return return_value; }};
- const DEV_CLASS operator()(const RawAddress& bda) { return body(bda); }
+ DEV_CLASS operator()(const RawAddress& bda) { return body(bda); }
};
extern struct btm_get_dev_class btm_get_dev_class;
@@ -439,15 +439,6 @@ struct btm_sec_bond_by_transport {
};
extern struct btm_sec_bond_by_transport btm_sec_bond_by_transport;
-// Name: btm_sec_check_pending_reqs
-// Params: void
-// Return: void
-struct btm_sec_check_pending_reqs {
- std::function<void(void)> body{[](void) {}};
- void operator()(void) { body(); }
-};
-extern struct btm_sec_check_pending_reqs btm_sec_check_pending_reqs;
-
// Name: btm_sec_clear_ble_keys
// Params: tBTM_SEC_DEV_REC* p_dev_rec
// Return: void
diff --git a/system/test/mock/mock_stack_hcic_hciblecmds.cc b/system/test/mock/mock_stack_hcic_hciblecmds.cc
index b44bbff0a4..0a130b2024 100644
--- a/system/test/mock/mock_stack_hcic_hciblecmds.cc
+++ b/system/test/mock/mock_stack_hcic_hciblecmds.cc
@@ -28,9 +28,6 @@
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace stack_hcic_hciblecmds {
@@ -69,7 +66,6 @@ struct btsnd_hcic_ble_set_periodic_advertising_receive_enable
btsnd_hcic_ble_set_periodic_advertising_receive_enable;
struct btsnd_hcic_ble_set_periodic_advertising_sync_transfer_params
btsnd_hcic_ble_set_periodic_advertising_sync_transfer_params;
-struct btsnd_hcic_ble_set_privacy_mode btsnd_hcic_ble_set_privacy_mode;
struct btsnd_hcic_ble_set_rand_priv_addr_timeout btsnd_hcic_ble_set_rand_priv_addr_timeout;
struct btsnd_hcic_ble_set_scan_enable btsnd_hcic_ble_set_scan_enable;
struct btsnd_hcic_ble_set_scan_params btsnd_hcic_ble_set_scan_params;
@@ -227,12 +223,6 @@ void btsnd_hcic_ble_set_periodic_advertising_sync_transfer_params(
test::mock::stack_hcic_hciblecmds::btsnd_hcic_ble_set_periodic_advertising_sync_transfer_params(
conn_handle, mode, skip, sync_timeout, cte_type, std::move(cb));
}
-void btsnd_hcic_ble_set_privacy_mode(uint8_t addr_type_peer, const RawAddress& bda_peer,
- uint8_t privacy_type) {
- inc_func_call_count(__func__);
- test::mock::stack_hcic_hciblecmds::btsnd_hcic_ble_set_privacy_mode(addr_type_peer, bda_peer,
- privacy_type);
-}
void btsnd_hcic_ble_set_rand_priv_addr_timeout(uint16_t rpa_timeout) {
inc_func_call_count(__func__);
test::mock::stack_hcic_hciblecmds::btsnd_hcic_ble_set_rand_priv_addr_timeout(rpa_timeout);
diff --git a/system/test/mock/mock_stack_hcic_hciblecmds.h b/system/test/mock/mock_stack_hcic_hciblecmds.h
index c9855165f1..cbecbc4aee 100644
--- a/system/test/mock/mock_stack_hcic_hciblecmds.h
+++ b/system/test/mock/mock_stack_hcic_hciblecmds.h
@@ -371,19 +371,6 @@ struct btsnd_hcic_ble_set_periodic_advertising_sync_transfer_params {
extern struct btsnd_hcic_ble_set_periodic_advertising_sync_transfer_params
btsnd_hcic_ble_set_periodic_advertising_sync_transfer_params;
-// Name: btsnd_hcic_ble_set_privacy_mode
-// Params: uint8_t addr_type_peer, const RawAddress& bda_peer, uint8_t
-// privacy_type Return: void
-struct btsnd_hcic_ble_set_privacy_mode {
- std::function<void(uint8_t addr_type_peer, const RawAddress& bda_peer, uint8_t privacy_type)>
- body{[](uint8_t /* addr_type_peer */, const RawAddress& /* bda_peer */,
- uint8_t /* privacy_type */) {}};
- void operator()(uint8_t addr_type_peer, const RawAddress& bda_peer, uint8_t privacy_type) {
- body(addr_type_peer, bda_peer, privacy_type);
- }
-};
-extern struct btsnd_hcic_ble_set_privacy_mode btsnd_hcic_ble_set_privacy_mode;
-
// Name: btsnd_hcic_ble_set_rand_priv_addr_timeout
// Params: uint16_t rpa_timeout
// Return: void
diff --git a/system/test/mock/mock_stack_l2cap_api.cc b/system/test/mock/mock_stack_l2cap_api.cc
index de117f06a9..2d81fdeca3 100644
--- a/system/test/mock/mock_stack_l2cap_api.cc
+++ b/system/test/mock/mock_stack_l2cap_api.cc
@@ -24,14 +24,13 @@
// Original included files, if any
+#include "stack/include/l2cap_module.h"
+#include "stack/l2cap/internal/l2c_api.h"
#include "test/common/mock_functions.h"
// Mocked compile conditionals, if any
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace stack_l2cap_api {
diff --git a/system/test/mock/mock_stack_l2cap_ble.cc b/system/test/mock/mock_stack_l2cap_ble.cc
index 6224446eb0..0ddc91c917 100644
--- a/system/test/mock/mock_stack_l2cap_ble.cc
+++ b/system/test/mock/mock_stack_l2cap_ble.cc
@@ -25,15 +25,14 @@
// Original included files, if any
+#include "stack/include/l2cap_controller_interface.h"
+#include "stack/include/l2cap_hci_link_interface.h"
#include "test/common/mock_functions.h"
#include "types/raw_address.h"
// Mocked compile conditionals, if any
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace stack_l2cap_ble {
diff --git a/system/test/mock/mock_stack_l2cap_main.cc b/system/test/mock/mock_stack_l2cap_main.cc
index 606551fb98..8f6dcae4b3 100644
--- a/system/test/mock/mock_stack_l2cap_main.cc
+++ b/system/test/mock/mock_stack_l2cap_main.cc
@@ -20,12 +20,11 @@
*/
#include "stack/include/bt_hdr.h"
+#include "stack/include/l2cap_acl_interface.h"
+#include "stack/include/l2cap_module.h"
#include "stack/l2cap/l2c_int.h"
#include "test/common/mock_functions.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
tL2CAP_DW_RESULT l2c_data_write(uint16_t /* cid */, BT_HDR* /* p_data */, uint16_t /* flags */) {
inc_func_call_count(__func__);
return tL2CAP_DW_RESULT::FAILED;
diff --git a/system/test/mock/mock_stack_l2cap_utils.cc b/system/test/mock/mock_stack_l2cap_utils.cc
index f485c111e4..cca521601e 100644
--- a/system/test/mock/mock_stack_l2cap_utils.cc
+++ b/system/test/mock/mock_stack_l2cap_utils.cc
@@ -22,13 +22,13 @@
#include <cstdint>
#include "stack/include/bt_hdr.h"
+#include "stack/include/l2cap_controller_interface.h"
+#include "stack/include/l2cap_hci_link_interface.h"
+#include "stack/include/l2cap_security_interface.h"
#include "stack/l2cap/l2c_int.h"
#include "test/common/mock_functions.h"
#include "types/raw_address.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
bool l2c_is_cmd_rejected(uint8_t /* cmd_code */, uint8_t /* signal_id */, tL2C_LCB* /* p_lcb */) {
inc_func_call_count(__func__);
return false;
@@ -37,10 +37,6 @@ bool l2cu_create_conn_le(tL2C_LCB* /* p_lcb */) {
inc_func_call_count(__func__);
return false;
}
-bool l2cu_create_conn_le(tL2C_LCB* /* p_lcb */, uint8_t /* initiating_phys */) {
- inc_func_call_count(__func__);
- return false;
-}
bool l2cu_initialize_fixed_ccb(tL2C_LCB* /* p_lcb */, uint16_t /* fixed_cid */) {
inc_func_call_count(__func__);
return false;
@@ -201,7 +197,7 @@ void l2cu_send_peer_config_rsp(tL2C_CCB* /* p_ccb */, tL2CAP_CFG_INFO* /* p_cfg
inc_func_call_count(__func__);
}
void l2cu_send_peer_connect_req(tL2C_CCB* /* p_ccb */) { inc_func_call_count(__func__); }
-void l2cu_send_peer_connect_rsp(tL2C_CCB* /* p_ccb */, uint16_t /* result */,
+void l2cu_send_peer_connect_rsp(tL2C_CCB* /* p_ccb */, tL2CAP_CONN /* result */,
uint16_t /* status */) {
inc_func_call_count(__func__);
}
@@ -230,7 +226,7 @@ void l2cu_send_peer_info_rsp(tL2C_LCB* /* p_lcb */, uint8_t /* remote_id */,
void l2cu_set_acl_hci_header(BT_HDR* /* p_buf */, tL2C_CCB* /* p_ccb */) {
inc_func_call_count(__func__);
}
-void l2cu_set_lcb_handle(struct t_l2c_linkcb& /* p_lcb */, uint16_t /* handle */) {
+void l2cu_set_lcb_handle(tL2C_LCB& /* p_lcb */, uint16_t /* handle */) {
inc_func_call_count(__func__);
}
void l2cu_set_non_flushable_pbf(bool /* is_supported */) { inc_func_call_count(__func__); }
diff --git a/system/test/mock/mock_stack_metrics_logging.cc b/system/test/mock/mock_stack_metrics_logging.cc
index 751fcc3794..ff2cee4472 100644
--- a/system/test/mock/mock_stack_metrics_logging.cc
+++ b/system/test/mock/mock_stack_metrics_logging.cc
@@ -29,15 +29,13 @@
#include <frameworks/proto_logging/stats/enums/bluetooth/enums.pb.h>
#include <frameworks/proto_logging/stats/enums/bluetooth/hci/enums.pb.h>
+#include "stack/include/stack_metrics_logging.h"
#include "test/common/mock_functions.h"
#include "types/raw_address.h"
// Mocked compile conditionals, if any
// Mocked internal structures, if any
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace test {
namespace mock {
namespace stack_metrics_logging {
@@ -56,13 +54,6 @@ struct log_le_connection_status log_le_connection_status;
struct log_le_device_in_accept_list log_le_device_in_accept_list;
struct log_le_connection_lifecycle log_le_connection_lifecycle;
struct log_le_connection_completion log_le_connection_completion;
-struct log_le_connection_rejected log_le_connection_rejected;
-struct log_hfp_ag_version log_hfp_ag_version;
-struct log_hfp_hf_version log_hfp_hf_version;
-struct log_hfp_rfcomm_channel_fail log_hfp_rfcomm_channel_fail;
-struct log_hfp_rfcomm_collision_fail log_hfp_rfcomm_collision_fail;
-struct log_hfp_rfcomm_ag_open_fail log_hfp_rfcomm_ag_open_fail;
-struct log_hfp_slc_fail log_hfp_slc_fail;
} // namespace stack_metrics_logging
} // namespace mock
@@ -105,16 +96,6 @@ void log_sdp_attribute(const RawAddress& address, uint16_t protocol_uuid, uint16
attribute_size, attribute_value);
}
void log_manufacturer_info(const RawAddress& address,
- android::bluetooth::DeviceInfoSrcEnum source_type,
- const std::string& source_name, const std::string& manufacturer,
- const std::string& model, const std::string& hardware_version,
- const std::string& software_version) {
- inc_func_call_count(__func__);
- test::mock::stack_metrics_logging::log_manufacturer_info(address, source_type, source_name,
- manufacturer, model, hardware_version,
- software_version);
-}
-void log_manufacturer_info(const RawAddress& address,
android::bluetooth::AddressTypeEnum address_type,
android::bluetooth::DeviceInfoSrcEnum source_type,
const std::string& source_name, const std::string& manufacturer,
@@ -167,39 +148,4 @@ void log_le_connection_completion(bluetooth::hci::Address address, bluetooth::hc
test::mock::stack_metrics_logging::log_le_connection_completion(address, reason,
is_locally_initiated);
}
-
-void log_le_connection_rejected(bluetooth::hci::Address address) {
- inc_func_call_count(__func__);
- test::mock::stack_metrics_logging::log_le_connection_rejected(address);
-}
-
-void log_hfp_ag_version(bluetooth::hci::Address address, uint16_t version) {
- inc_func_call_count(__func__);
- test::mock::stack_metrics_logging::log_hfp_ag_version(address, version);
-}
-
-void log_hfp_hf_version(bluetooth::hci::Address address, uint16_t version) {
- inc_func_call_count(__func__);
- test::mock::stack_metrics_logging::log_hfp_hf_version(address, version);
-}
-
-void log_hfp_rfcomm_channel_fail(bluetooth::hci::Address address) {
- inc_func_call_count(__func__);
- test::mock::stack_metrics_logging::log_hfp_rfcomm_channel_fail(address);
-}
-
-void log_hfp_rfcomm_collision_fail(bluetooth::hci::Address address) {
- inc_func_call_count(__func__);
- test::mock::stack_metrics_logging::log_hfp_rfcomm_collision_fail(address);
-}
-
-void log_hfp_rfcomm_ag_open_fail(bluetooth::hci::Address address) {
- inc_func_call_count(__func__);
- test::mock::stack_metrics_logging::log_hfp_rfcomm_ag_open_fail(address);
-}
-
-void log_hfp_slc_fail(bluetooth::hci::Address address) {
- inc_func_call_count(__func__);
- test::mock::stack_metrics_logging::log_hfp_slc_fail(address);
-}
// END mockcify generation
diff --git a/system/test/mock/mock_stack_metrics_logging.h b/system/test/mock/mock_stack_metrics_logging.h
index d807c1f761..40212e60ea 100644
--- a/system/test/mock/mock_stack_metrics_logging.h
+++ b/system/test/mock/mock_stack_metrics_logging.h
@@ -247,58 +247,6 @@ struct log_le_connection_completion {
};
extern struct log_le_connection_completion log_le_connection_completion;
-// Name: log_le_connection_rejected
-struct log_le_connection_rejected {
- std::function<void(bluetooth::hci::Address)> body{[](bluetooth::hci::Address /* address */) {}};
- void operator()(bluetooth::hci::Address address) { body(address); }
-};
-
-extern struct log_le_connection_rejected log_le_connection_rejected;
-
-// Name: log_hfp_ag_version
-struct log_hfp_ag_version {
- std::function<void(bluetooth::hci::Address, uint16_t)> body{
- [](bluetooth::hci::Address /* address */, uint16_t /* version */) {}};
- void operator()(bluetooth::hci::Address address, uint16_t version) { body(address, version); }
-};
-extern struct log_hfp_ag_version log_hfp_ag_version;
-
-// Name: log_hfp_hf_version
-struct log_hfp_hf_version {
- std::function<void(bluetooth::hci::Address, uint16_t)> body{
- [](bluetooth::hci::Address /* address */, uint16_t /* version */) {}};
- void operator()(bluetooth::hci::Address address, uint16_t version) { body(address, version); }
-};
-extern struct log_hfp_hf_version log_hfp_hf_version;
-
-// Name: log_hfp_rfcomm_channel_fail
-struct log_hfp_rfcomm_channel_fail {
- std::function<void(bluetooth::hci::Address)> body{[](bluetooth::hci::Address /* address */) {}};
- void operator()(bluetooth::hci::Address address) { body(address); }
-};
-extern struct log_hfp_rfcomm_channel_fail log_hfp_rfcomm_channel_fail;
-
-// Name: log_hfp_rfcomm_collision_fail
-struct log_hfp_rfcomm_collision_fail {
- std::function<void(bluetooth::hci::Address)> body{[](bluetooth::hci::Address /* address */) {}};
- void operator()(bluetooth::hci::Address address) { body(address); }
-};
-extern struct log_hfp_rfcomm_collision_fail log_hfp_rfcomm_collision_fail;
-
-// Name: log_hfp_rfcomm_ag_open_fail
-struct log_hfp_rfcomm_ag_open_fail {
- std::function<void(bluetooth::hci::Address)> body{[](bluetooth::hci::Address /* address */) {}};
- void operator()(bluetooth::hci::Address address) { body(address); }
-};
-extern struct log_hfp_rfcomm_ag_open_fail log_hfp_rfcomm_ag_open_fail;
-
-// Name: log_hfp_slc_fail
-struct log_hfp_slc_fail {
- std::function<void(bluetooth::hci::Address)> body{[](bluetooth::hci::Address /* address */) {}};
- void operator()(bluetooth::hci::Address address) { body(address); }
-};
-extern struct log_hfp_slc_fail log_hfp_slc_fail;
-
} // namespace stack_metrics_logging
} // namespace mock
} // namespace test
diff --git a/system/test/mock/mock_stack_security_client_interface.cc b/system/test/mock/mock_stack_security_client_interface.cc
index 5ccb5e31df..3930c1a281 100644
--- a/system/test/mock/mock_stack_security_client_interface.cc
+++ b/system/test/mock/mock_stack_security_client_interface.cc
@@ -19,9 +19,6 @@
#include "stack/include/security_client_callbacks.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
namespace {
// Initialize the working btm client interface to the default
@@ -42,6 +39,6 @@ const SecurityClientInterface& get_security_client_interface() {
return *mock_security_client_interface;
}
-void set_security_client_interface(SecurityClientInterface* interface) {
- mock_security_client_interface = interface;
+void set_security_client_interface(SecurityClientInterface& interface) {
+ mock_security_client_interface = &interface;
}
diff --git a/system/test/mock/mock_udrv_ulinux_uipc.cc b/system/test/mock/mock_udrv_ulinux_uipc.cc
index daa7cc7f7c..6ecd0bdd1f 100644
--- a/system/test/mock/mock_udrv_ulinux_uipc.cc
+++ b/system/test/mock/mock_udrv_ulinux_uipc.cc
@@ -24,9 +24,6 @@
#include "test/common/mock_functions.h"
#include "udrv/include/uipc.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
-
std::unique_ptr<tUIPC_STATE> mock_uipc_init_ret;
uint32_t mock_uipc_read_ret;
bool mock_uipc_send_ret;
@@ -41,10 +38,6 @@ bool UIPC_Send(tUIPC_STATE& /* uipc */, tUIPC_CH_ID /* ch_id */, uint16_t /* msg
inc_func_call_count(__func__);
return mock_uipc_send_ret;
}
-int uipc_start_main_server_thread(tUIPC_STATE& /* uipc */) {
- inc_func_call_count(__func__);
- return 0;
-}
std::unique_ptr<tUIPC_STATE> UIPC_Init() {
inc_func_call_count(__func__);
return std::move(mock_uipc_init_ret);
@@ -64,8 +57,3 @@ bool UIPC_Ioctl(tUIPC_STATE& /* uipc */, tUIPC_CH_ID /* ch_id */, uint32_t /* re
return false;
}
void UIPC_Close(tUIPC_STATE& /* uipc */, tUIPC_CH_ID /* ch_id */) { inc_func_call_count(__func__); }
-void uipc_close_locked(tUIPC_STATE& /* uipc */, tUIPC_CH_ID /* ch_id */) {
- inc_func_call_count(__func__);
-}
-void uipc_main_cleanup(tUIPC_STATE& /* uipc */) { inc_func_call_count(__func__); }
-void uipc_stop_main_server_thread(tUIPC_STATE& /* uipc */) { inc_func_call_count(__func__); }
diff --git a/system/test/stub/osi.cc b/system/test/stub/osi.cc
index c087497528..5177f86803 100644
--- a/system/test/stub/osi.cc
+++ b/system/test/stub/osi.cc
@@ -34,17 +34,19 @@
#include "osi/include/future.h"
#include "osi/include/hash_map_utils.h"
#include "osi/include/list.h"
+#include "osi/include/mutex.h"
+#include "osi/include/properties.h"
#include "osi/include/reactor.h"
#include "osi/include/ringbuffer.h"
#include "osi/include/socket.h"
+#include "osi/include/socket_utils/socket_local.h"
+#include "osi/include/socket_utils/sockets.h"
#include "osi/include/thread.h"
#include "osi/include/wakelock.h"
#include "osi/src/compat.cc" // For strlcpy
#include "test/common/fake_osi.h"
#include "test/common/mock_functions.h"
-// TODO(b/369381361) Enfore -Wmissing-prototypes
-#pragma GCC diagnostic ignored "-Wmissing-prototypes"
#pragma GCC diagnostic ignored "-Wunused-parameter"
OsiObject::OsiObject(void* ptr) : ptr_(ptr) {}
@@ -511,10 +513,6 @@ list_t* list_new(list_free_cb callback) {
inc_func_call_count(__func__);
return nullptr;
}
-list_t* list_new_internal(list_free_cb callback, const allocator_t* zeroed_allocator) {
- inc_func_call_count(__func__);
- return nullptr;
-}
size_t list_length(const list_t* list) {
inc_func_call_count(__func__);
return 0;