summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chris Manton <cmanton@google.com> 2024-05-24 17:21:45 -0700
committer Chris Manton <cmanton@google.com> 2024-08-19 19:30:58 +0000
commitf6061bd3d90350bbd393bd7d89c459c4caa52c8a (patch)
tree6ca7845a0fa0c3cba0dd29b600ba628a84255802
parent290117824ab140cf0dc391a3deb11733509706ed (diff)
stack::btm Hide btm_api.h use get_btm_interface
Bug: 360551730 Test: m . Flag: EXEMPT, Mechanical Refactor Change-Id: Ib4928a94330ac811b1d7d2eac98ab38811785364
-rw-r--r--system/bta/ag/bta_ag_sco.cc1
-rw-r--r--system/bta/dm/bta_dm_api.cc1
-rw-r--r--system/bta/hf_client/bta_hf_client_sco.cc1
-rw-r--r--system/bta/test/common/btm_api_mock.cc1
-rw-r--r--system/bta/test/common/btm_api_mock.h4
-rw-r--r--system/btif/src/btif_sock_sco.cc1
-rw-r--r--system/stack/btm/ble_scanner_hci_interface.cc1
-rw-r--r--system/stack/btm/btm_ble_sec.cc1
-rw-r--r--system/stack/btm/btm_client_interface.cc1
-rw-r--r--system/stack/btm/btm_dev.cc1
-rw-r--r--system/stack/btm/btm_devctl.cc1
-rw-r--r--system/stack/btm/btm_sco.cc1
-rw-r--r--system/stack/btm/btm_sec.cc1
-rw-r--r--system/stack/btm/internal/btm_api.h (renamed from system/stack/include/btm_api.h)0
-rw-r--r--system/stack/include/btm_ble_api.h1
-rw-r--r--system/stack/include/btm_client_interface.h2
-rw-r--r--system/stack/include/gap_api.h1
-rw-r--r--system/test/headless/dumpsys/dumpsys.cc8
-rw-r--r--system/test/mock/mock_btif_profile_storage.h1
-rw-r--r--system/test/mock/mock_stack_btm_dev.cc2
20 files changed, 6 insertions, 25 deletions
diff --git a/system/bta/ag/bta_ag_sco.cc b/system/bta/ag/bta_ag_sco.cc
index d789470456..4a7369fca3 100644
--- a/system/bta/ag/bta_ag_sco.cc
+++ b/system/bta/ag/bta_ag_sco.cc
@@ -39,7 +39,6 @@
#include "stack/btm/btm_int_types.h"
#include "stack/btm/btm_sco.h"
#include "stack/btm/btm_sco_hfp_hal.h"
-#include "stack/include/btm_api.h"
#include "stack/include/btm_client_interface.h"
#include "stack/include/btm_status.h"
#include "stack/include/main_thread.h"
diff --git a/system/bta/dm/bta_dm_api.cc b/system/bta/dm/bta_dm_api.cc
index 79cd93252a..89ce30b5bc 100644
--- a/system/bta/dm/bta_dm_api.cc
+++ b/system/bta/dm/bta_dm_api.cc
@@ -34,7 +34,6 @@
#include "bta/dm/bta_dm_sec_int.h"
#include "hci/le_rand_callback.h"
#include "stack/include/bt_uuid16.h"
-#include "stack/include/btm_api.h"
#include "stack/include/btm_client_interface.h"
#include "stack/include/main_thread.h"
#include "stack/include/sdp_api.h"
diff --git a/system/bta/hf_client/bta_hf_client_sco.cc b/system/bta/hf_client/bta_hf_client_sco.cc
index a09df00d75..f22077a48c 100644
--- a/system/bta/hf_client/bta_hf_client_sco.cc
+++ b/system/bta/hf_client/bta_hf_client_sco.cc
@@ -24,7 +24,6 @@
#include "bta/hf_client/bta_hf_client_int.h"
#include "osi/include/allocator.h"
#include "stack/include/bt_hdr.h"
-#include "stack/include/btm_api.h"
#include "stack/include/btm_client_interface.h"
#include "stack/include/btm_status.h"
diff --git a/system/bta/test/common/btm_api_mock.cc b/system/bta/test/common/btm_api_mock.cc
index ff2cd27fb2..d32e40ebc5 100644
--- a/system/bta/test/common/btm_api_mock.cc
+++ b/system/bta/test/common/btm_api_mock.cc
@@ -22,7 +22,6 @@
#include <optional>
#include "bt_octets.h"
-#include "btm_api.h"
#include "stack/include/btm_ble_sec_api.h"
#include "test/mock/mock_stack_btm_interface.h"
#include "types/raw_address.h"
diff --git a/system/bta/test/common/btm_api_mock.h b/system/bta/test/common/btm_api_mock.h
index 2d92647363..6f746a66ac 100644
--- a/system/bta/test/common/btm_api_mock.h
+++ b/system/bta/test/common/btm_api_mock.h
@@ -18,12 +18,14 @@
#include <gmock/gmock.h>
+#include <cstdint>
#include <optional>
#include "bt_octets.h"
-#include "btm_api.h"
+#include "stack/btm/neighbor_inquiry.h"
#include "stack/btm/security_device_record.h"
#include "types/ble_address_with_type.h"
+#include "types/bt_transport.h"
#include "types/raw_address.h"
namespace bluetooth {
diff --git a/system/btif/src/btif_sock_sco.cc b/system/btif/src/btif_sock_sco.cc
index 5035757a38..a7e08cc2f2 100644
--- a/system/btif/src/btif_sock_sco.cc
+++ b/system/btif/src/btif_sock_sco.cc
@@ -32,7 +32,6 @@
#include "osi/include/osi.h" // INVALID_FD
#include "osi/include/socket.h"
#include "osi/include/thread.h"
-#include "stack/include/btm_api.h"
#include "stack/include/btm_client_interface.h"
#include "stack/include/btm_status.h"
#include "types/raw_address.h"
diff --git a/system/stack/btm/ble_scanner_hci_interface.cc b/system/stack/btm/ble_scanner_hci_interface.cc
index 9756caa164..5258aea37f 100644
--- a/system/stack/btm/ble_scanner_hci_interface.cc
+++ b/system/stack/btm/ble_scanner_hci_interface.cc
@@ -20,7 +20,6 @@
#include <base/functional/bind.h>
#include <bluetooth/log.h>
-#include "btm_api.h"
#include "hci/controller_interface.h"
#include "main/shim/entry.h"
#include "stack/include/bt_types.h"
diff --git a/system/stack/btm/btm_ble_sec.cc b/system/stack/btm/btm_ble_sec.cc
index 2149f8823a..ad6c3a2f14 100644
--- a/system/stack/btm/btm_ble_sec.cc
+++ b/system/stack/btm/btm_ble_sec.cc
@@ -48,7 +48,6 @@
#include "stack/include/bt_name.h"
#include "stack/include/bt_octets.h"
#include "stack/include/bt_types.h"
-#include "stack/include/btm_api.h"
#include "stack/include/btm_ble_addr.h"
#include "stack/include/btm_ble_privacy.h"
#include "stack/include/btm_ble_sec_api.h"
diff --git a/system/stack/btm/btm_client_interface.cc b/system/stack/btm/btm_client_interface.cc
index 2b8736ec1c..24a14d97fb 100644
--- a/system/stack/btm/btm_client_interface.cc
+++ b/system/stack/btm/btm_client_interface.cc
@@ -20,7 +20,6 @@
#include "security_client_callbacks.h"
#include "stack/btm/btm_ble_int.h"
#include "stack/include/acl_api.h"
-#include "stack/include/btm_api.h"
#include "stack/include/btm_ble_api.h"
struct btm_client_interface_t btm_client_interface = {
diff --git a/system/stack/btm/btm_dev.cc b/system/stack/btm/btm_dev.cc
index e8cb624aff..aaf16a3bf8 100644
--- a/system/stack/btm/btm_dev.cc
+++ b/system/stack/btm/btm_dev.cc
@@ -32,7 +32,6 @@
#include <string>
#include "btif/include/btif_storage.h"
-#include "btm_api.h"
#include "btm_int_types.h"
#include "btm_sec_api.h"
#include "btm_sec_cb.h"
diff --git a/system/stack/btm/btm_devctl.cc b/system/stack/btm/btm_devctl.cc
index 4f2fe4ac6f..4a65bc6d76 100644
--- a/system/stack/btm/btm_devctl.cc
+++ b/system/stack/btm/btm_devctl.cc
@@ -42,7 +42,6 @@
#include "stack/include/acl_api.h"
#include "stack/include/acl_api_types.h"
#include "stack/include/bt_types.h"
-#include "stack/include/btm_api.h"
#include "stack/include/btm_ble_privacy.h"
#include "stack/include/btm_inq.h"
#include "stack/include/btm_status.h"
diff --git a/system/stack/btm/btm_sco.cc b/system/stack/btm/btm_sco.cc
index 6b24d40e5e..b85bd11f0b 100644
--- a/system/stack/btm/btm_sco.cc
+++ b/system/stack/btm/btm_sco.cc
@@ -52,7 +52,6 @@
#include "stack/btm/btm_sec.h"
#include "stack/include/acl_api.h"
#include "stack/include/bt_dev_class.h"
-#include "stack/include/btm_api.h"
#include "stack/include/btm_api_types.h"
#include "stack/include/btm_client_interface.h"
#include "stack/include/btm_log_history.h"
diff --git a/system/stack/btm/btm_sec.cc b/system/stack/btm/btm_sec.cc
index 320e216794..57a8417dfc 100644
--- a/system/stack/btm/btm_sec.cc
+++ b/system/stack/btm/btm_sec.cc
@@ -59,7 +59,6 @@
#include "stack/include/bt_dev_class.h"
#include "stack/include/bt_psm_types.h"
#include "stack/include/bt_types.h"
-#include "stack/include/btm_api.h"
#include "stack/include/btm_ble_addr.h"
#include "stack/include/btm_ble_api.h"
#include "stack/include/btm_ble_privacy.h"
diff --git a/system/stack/include/btm_api.h b/system/stack/btm/internal/btm_api.h
index ccd48264e2..ccd48264e2 100644
--- a/system/stack/include/btm_api.h
+++ b/system/stack/btm/internal/btm_api.h
diff --git a/system/stack/include/btm_ble_api.h b/system/stack/include/btm_ble_api.h
index 689c8f9be3..ea1a297a30 100644
--- a/system/stack/include/btm_ble_api.h
+++ b/system/stack/include/btm_ble_api.h
@@ -31,7 +31,6 @@
#include <cstdint>
#include <memory>
-#include "btm_api.h"
#include "btm_ble_api_types.h"
#include "stack/btm/neighbor_inquiry.h"
#include "types/bt_transport.h"
diff --git a/system/stack/include/btm_client_interface.h b/system/stack/include/btm_client_interface.h
index 0de83ffac6..c38285eccd 100644
--- a/system/stack/include/btm_client_interface.h
+++ b/system/stack/include/btm_client_interface.h
@@ -19,11 +19,11 @@
#include <cstdint>
#include "device/include/esco_parameters.h"
+#include "stack/btm/internal/btm_api.h"
#include "stack/btm/neighbor_inquiry.h"
#include "stack/btm/power_mode.h"
#include "stack/include/acl_client_callbacks.h"
#include "stack/include/bt_hdr.h"
-#include "stack/include/btm_api.h"
#include "stack/include/btm_api_types.h"
#include "stack/include/btm_ble_api_types.h"
#include "stack/include/btm_status.h"
diff --git a/system/stack/include/gap_api.h b/system/stack/include/gap_api.h
index ccc22b9305..6657f71439 100644
--- a/system/stack/include/gap_api.h
+++ b/system/stack/include/gap_api.h
@@ -21,7 +21,6 @@
#include <cstdint>
-#include "btm_api.h"
#include "l2c_api.h"
#include "l2cdefs.h"
#include "profiles_api.h"
diff --git a/system/test/headless/dumpsys/dumpsys.cc b/system/test/headless/dumpsys/dumpsys.cc
index b89f8f82a6..0e7503304b 100644
--- a/system/test/headless/dumpsys/dumpsys.cc
+++ b/system/test/headless/dumpsys/dumpsys.cc
@@ -18,15 +18,7 @@
#include "test/headless/dumpsys/dumpsys.h"
-#include <future>
-
-#include "os/log.h" // android log only
-#include "stack/include/btm_api.h"
-#include "stack/include/btm_api_types.h"
-#include "stack/include/hci_error_code.h"
-#include "test/headless/get_options.h"
#include "test/headless/headless.h"
-#include "types/raw_address.h"
int bluetooth::test::headless::Dumpsys::Run() {
return RunOnHeadlessStack<int>([this]() {
diff --git a/system/test/mock/mock_btif_profile_storage.h b/system/test/mock/mock_btif_profile_storage.h
index 46cd07fed4..7d322e543d 100644
--- a/system/test/mock/mock_btif_profile_storage.h
+++ b/system/test/mock/mock_btif_profile_storage.h
@@ -37,6 +37,7 @@
#include <vector>
#include "bta/include/bta_hearing_aid_api.h"
+#include "types/ble_address_with_type.h"
#include "types/bluetooth/uuid.h"
#include "types/raw_address.h"
diff --git a/system/test/mock/mock_stack_btm_dev.cc b/system/test/mock/mock_stack_btm_dev.cc
index 888576c5f2..19869a25c1 100644
--- a/system/test/mock/mock_stack_btm_dev.cc
+++ b/system/test/mock/mock_stack_btm_dev.cc
@@ -28,7 +28,7 @@
#include "stack/btm/btm_dev.h"
#include "stack/include/bt_octets.h"
-#include "stack/include/btm_api.h"
+#include "stack/include/btm_client_interface.h"
#include "test/common/mock_functions.h"
#include "types/raw_address.h"