OSDN Git Service

Add various function declarations
authorChris Manton <cmanton@google.com>
Tue, 8 Sep 2020 05:50:08 +0000 (22:50 -0700)
committerChris Manton <cmanton@google.com>
Mon, 14 Sep 2020 00:10:03 +0000 (00:10 +0000)
Towards readable code

Bug: 163134718
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ib65e0d1947b94fb94abea6f1e40946b253e77741

btif/src/stack_manager.cc
stack/btm/btm_ble.cc
stack/btm/btm_ble_connection_establishment.cc
stack/btm/btm_ble_int.h
stack/btm/btm_devctl.cc
stack/btm/btm_main.cc
stack/btu/btu_task.cc
stack/l2cap/l2c_ble.cc
stack/l2cap/l2c_link.cc

index f3d7294..26ced7a 100644 (file)
@@ -74,6 +74,8 @@ void main_thread_shut_down();
 void main_thread_start_up();
 void BTA_dm_on_hw_on();
 void BTA_dm_on_hw_off();
+extern void btm_init(void);
+extern void btm_free(void);
 
 using bluetooth::common::MessageLoopThread;
 
index a2ebd9d..2fe1fd8 100644 (file)
@@ -45,6 +45,8 @@
 
 extern tBTM_CB btm_cb;
 
+extern bool btm_ble_init_pseudo_addr(tBTM_SEC_DEV_REC* p_dev_rec,
+                                     const RawAddress& new_pseudo_addr);
 extern void gatt_notify_phy_updated(uint8_t status, uint16_t handle,
                                     uint8_t tx_phy, uint8_t rx_phy);
 
index 9920562..c490810 100644 (file)
@@ -31,6 +31,8 @@
 extern void btm_ble_advertiser_notify_terminated_legacy(
     uint8_t status, uint16_t connection_handle);
 
+extern bool btm_ble_init_pseudo_addr(tBTM_SEC_DEV_REC* p_dev_rec,
+                                     const RawAddress& new_pseudo_addr);
 void btm_send_hci_create_connection(
     uint16_t scan_int, uint16_t scan_win, uint8_t init_filter_policy,
     uint8_t addr_type_peer, const RawAddress& bda_peer, uint8_t addr_type_own,
index a8ca146..df5822d 100644 (file)
@@ -144,6 +144,14 @@ extern void btm_ble_refresh_peer_resolvable_private_addr(
     tBTM_SEC_BLE::tADDRESS_TYPE type);
 extern void btm_ble_read_resolving_list_entry_complete(uint8_t* p,
                                                        uint16_t evt_len);
+extern bool btm_ble_read_resolving_list_entry(tBTM_SEC_DEV_REC* p_dev_rec);
+
+extern void btm_ble_create_conn_cancel_complete(uint8_t* p);
+extern bool btm_ble_addr_resolvable(const RawAddress& rpa,
+                                    tBTM_SEC_DEV_REC* p_dev_rec);
+
+extern bool btm_ble_resolving_list_load_dev(tBTM_SEC_DEV_REC* p_dev_rec);
+extern void btm_ble_resolving_list_remove_dev(tBTM_SEC_DEV_REC* p_dev_rec);
 extern void btm_ble_remove_resolving_list_entry_complete(uint8_t* p,
                                                          uint16_t evt_len);
 extern void btm_ble_add_resolving_list_entry_complete(uint8_t* p,
index 6b854ad..df5f43e 100644 (file)
@@ -47,6 +47,9 @@
 #include "main/shim/controller.h"
 #include "main/shim/shim.h"
 
+extern void btm_inq_db_reset(void);
+extern void btm_pm_reset(void);
+
 /******************************************************************************/
 /*               L O C A L    D A T A    D E F I N I T I O N S                */
 /******************************************************************************/
index bb19440..b637d75 100644 (file)
 */
 tBTM_CB btm_cb;
 
-void btm_acl_init(void);
+extern void btm_acl_init(void);
+extern void btm_dev_init(void);
+extern void btm_inq_db_init(void);
+extern void btm_sco_init(void);
+extern void wipe_secrets_and_remove(tBTM_SEC_DEV_REC* p_dev_rec);
 
 /*******************************************************************************
  *
index d52d647..73416b1 100644 (file)
@@ -42,6 +42,8 @@
 using bluetooth::common::MessageLoopThread;
 using bluetooth::hci::IsoManager;
 
+void btm_route_sco_data(BT_HDR* p_msg);
+
 /* Define BTU storage area */
 uint8_t btu_trace_level = HCI_INITIAL_TRACE_LEVEL;
 
index 476beb4..dc7e207 100644 (file)
 
 using base::StringPrintf;
 
+tL2CAP_LE_RESULT_CODE btm_ble_start_sec_check(const RawAddress& bd_addr,
+                                              uint16_t psm, bool is_originator,
+                                              tBTM_SEC_CALLBACK* p_callback,
+                                              void* p_ref_data);
+
 static void l2cble_start_conn_update(tL2C_LCB* p_lcb);
 
 /*******************************************************************************
index f1916ef..3543881 100644 (file)
@@ -36,6 +36,8 @@
 #include "types/bt_transport.h"
 #include "types/raw_address.h"
 
+void btm_sco_acl_removed(const RawAddress* bda);
+
 static void l2c_link_send_to_lower(tL2C_LCB* p_lcb, BT_HDR* p_buf,
                                    tL2C_TX_COMPLETE_CB_INFO* p_cbi);
 static BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* p_lcb,