OSDN Git Service

Re-include stack/btu/btu_hcif
authorChris Manton <cmanton@google.com>
Wed, 26 Aug 2020 22:08:25 +0000 (15:08 -0700)
committerChris Manton <cmanton@google.com>
Wed, 26 Aug 2020 22:55:51 +0000 (15:55 -0700)
Towards readable code

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working

Change-Id: I503a60a4bc6693ddd1a4a177eff3e1fd4926d5b3

stack/btu/btu_hcif.cc
stack/include/acl_api.h
stack/include/acl_hci_link_interface.h

index df95b70..111eb15 100644 (file)
 #define LOG_TAG "bt_btu_hcif"
 
 #include <base/bind.h>
-#include <base/callback.h>
 #include <base/location.h>
-#include <base/logging.h>
-#include <base/threading/thread.h>
-#include <frameworks/base/core/proto/android/bluetooth/enums.pb.h>
-#include <frameworks/base/core/proto/android/bluetooth/hci/enums.pb.h>
-#include <log/log.h>
-#include <statslog.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "bt_common.h"
-#include "bt_types.h"
-#include "bt_utils.h"
-#include "bta/sys/bta_sys.h"
-#include "btif_config.h"
-#include "btm_api.h"
-#include "btm_int.h"
-#include "btm_iso_api.h"
-#include "btu.h"
+#include <cstdint>
+
+#include "btif/include/btif_config.h"
 #include "common/metrics.h"
 #include "device/include/controller.h"
-#include "hci_evt_length.h"
-#include "hci_layer.h"
-#include "hcimsgs.h"
 #include "osi/include/log.h"
-#include "osi/include/osi.h"
-#include "stack/include/acl_api.h"
+#include "stack/btm/btm_ble_int.h"
+#include "stack/btm/btm_int.h"
 #include "stack/include/acl_hci_link_interface.h"
+#include "stack/include/btm_iso_api.h"
+#include "stack/include/btu.h"
+#include "stack/include/hci_evt_length.h"
+#include "stack/include/hcidefs.h"
 #include "stack/include/l2cap_hci_link_interface.h"
 #include "stack/include/sec_hci_link_interface.h"
 
 using base::Location;
 using bluetooth::hci::IsoManager;
 
-extern void btm_process_cancel_complete(uint8_t status, uint8_t mode);
-extern void btm_process_inq_results2(uint8_t* p, uint8_t inq_res_mode);
-extern void btm_ble_test_command_complete(uint8_t* p);
-extern void smp_cancel_start_encryption_attempt();
+bool l2c_link_hci_disc_comp(uint16_t handle, uint8_t reason);  // TODO remove
+bool BTM_BLE_IS_RESOLVE_BDA(const RawAddress& x);              // TODO remove
+void BTA_sys_signal_hw_error();                                // TODO remove
+void smp_cancel_start_encryption_attempt();                    // TODO remove
 
 /******************************************************************************/
 /*            L O C A L    F U N C T I O N     P R O T O T Y P E S            */
index ef6447b..322c11d 100644 (file)
@@ -209,21 +209,6 @@ tBTM_STATUS BTM_ReadTxPower(const RawAddress& remote_bda,
  ******************************************************************************/
 uint16_t BTM_GetNumAclLinks(void);
 
-/*******************************************************************************
- *
- * Function         btm_acl_role_changed
- *
- * Description      This function is called whan a link's master/slave role
- *                  change event or command status event (with error) is
- *                  received. It updates the link control block, and calls the
- *                  registered callback with status and role (if registered).
- *
- * Returns          void
- *
- ******************************************************************************/
-void btm_acl_role_changed(uint8_t hci_status, const RawAddress& bd_addr,
-                          uint8_t new_role);
-
 void btm_set_packet_types_from_address(const RawAddress& bda,
                                        tBT_TRANSPORT transport,
                                        uint16_t pkt_types);
index 5036d79..0bd4786 100644 (file)
@@ -26,6 +26,8 @@ void btm_acl_connected(const RawAddress& bda, uint16_t handle, uint8_t status,
                        uint8_t enc_mode);
 void btm_acl_encrypt_change(uint16_t handle, uint8_t status,
                             uint8_t encr_enable);
+void btm_acl_role_changed(uint8_t hci_status, const RawAddress& bd_addr,
+                          uint8_t new_role);
 void btm_blacklist_role_change_device(const RawAddress& bd_addr,
                                       uint8_t hci_status);
 void btm_pm_proc_cmd_status(uint8_t status);