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

Commit acf90b73 authored by Chris Manton's avatar Chris Manton Committed by Myles Watson
Browse files

Move decls to ble_hci interface

From: stack/btm/btm_ble_int

Towards readable code

Bug: 163134718
Tag: #refactor
Test: acts -tc BleCocTest
Test: ble paired 2 phones
Change-Id: I8b3c9cd43fe3cc34a2c41c53252d5f58990b2dbf
parent ad2d83e1
Loading
Loading
Loading
Loading
+0 −21
Original line number Diff line number Diff line
@@ -53,11 +53,9 @@ extern void btm_ble_connected_from_address_with_type(
    const tBLE_BD_ADDR& address_with_type, uint16_t handle, uint8_t enc_mode,
    uint8_t role, bool addr_matched);

extern void btm_ble_write_adv_enable_complete(uint8_t* p);
extern tBTM_STATUS btm_ble_start_adv(void);
extern tBTM_STATUS btm_ble_stop_adv(void);
extern tBTM_STATUS btm_ble_start_scan(void);
extern void btm_ble_create_ll_conn_complete(uint8_t status);

/* LE security function from btm_sec.cc */
extern void btm_ble_link_sec_check(const RawAddress& bd_addr,
@@ -70,8 +68,6 @@ extern uint8_t btm_proc_smp_cback(tSMP_EVT event, const RawAddress& bd_addr,
extern tBTM_STATUS btm_ble_set_encryption(const RawAddress& bd_addr,
                                          tBTM_BLE_SEC_ACT sec_act,
                                          uint8_t link_role);
extern void btm_ble_ltk_request(uint16_t handle, uint8_t rand[8],
                                uint16_t ediv);
extern tBTM_STATUS btm_ble_start_encrypt(const RawAddress& bda, bool use_stk,
                                         Octet16* p_stk);
extern void btm_ble_link_encrypted(const RawAddress& bd_addr,
@@ -87,10 +83,6 @@ extern bool btm_get_local_div(const RawAddress& bd_addr, uint16_t* p_div);
extern bool btm_ble_get_enc_key_type(const RawAddress& bd_addr,
                                     uint8_t* p_key_types);

extern void btm_ble_test_command_complete(uint8_t* p);
extern void btm_ble_rand_enc_complete(uint8_t* p, uint16_t op_code,
                                      tBTM_RAND_ENC_CB* p_enc_cplt_cback);

extern void btm_sec_save_le_key(const RawAddress& bd_addr,
                                tBTM_LE_KEY_TYPE key_type,
                                tBTM_LE_KEY_VALUE* p_keys,
@@ -122,31 +114,18 @@ extern uint64_t btm_get_next_private_addrress_interval_ms();

/*  privacy function */
/* BLE address mapping with CS feature */
extern bool btm_identity_addr_to_random_pseudo(RawAddress* bd_addr,
                                               uint8_t* p_addr_type,
                                               bool refresh);
extern bool btm_identity_addr_to_random_pseudo_from_address_with_type(
    tBLE_BD_ADDR* address_with_type, bool refresh);
extern bool btm_random_pseudo_to_identity_addr(RawAddress* random_pseudo,
                                               uint8_t* p_identity_addr_type);
extern void btm_ble_refresh_peer_resolvable_private_addr(
    const RawAddress& pseudo_bda, const RawAddress& rra,
    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,
                                                      uint16_t evt_len);
extern void btm_ble_clear_resolving_list_complete(uint8_t* p, uint16_t evt_len);
extern void btm_ble_enable_resolving_list(uint8_t);
extern bool btm_ble_disable_resolving_list(uint8_t rl_mask, bool to_resume);
extern void btm_ble_enable_resolving_list_for_platform(uint8_t rl_mask);
+20 −0
Original line number Diff line number Diff line
@@ -27,3 +27,23 @@ void btm_ble_process_ext_adv_pkt(uint8_t len, uint8_t* p);
void btm_ble_process_phy_update_pkt(uint8_t len, uint8_t* p);
void btm_ble_read_remote_features_complete(uint8_t* p);
void btm_le_on_advertising_set_terminated(uint8_t* p, uint16_t length);
extern void btm_ble_write_adv_enable_complete(uint8_t* p);
extern void btm_ble_create_ll_conn_complete(uint8_t status);
extern void btm_ble_ltk_request(uint16_t handle, uint8_t rand[8],
                                uint16_t ediv);
extern void btm_ble_test_command_complete(uint8_t* p);
extern void btm_ble_rand_enc_complete(uint8_t* p, uint16_t op_code,
                                      tBTM_RAND_ENC_CB* p_enc_cplt_cback);
extern bool btm_identity_addr_to_random_pseudo(RawAddress* bd_addr,
                                               uint8_t* p_addr_type,
                                               bool refresh);
extern bool btm_identity_addr_to_random_pseudo_from_address_with_type(
    tBLE_BD_ADDR* address_with_type, bool refresh);
extern void btm_ble_read_resolving_list_entry_complete(uint8_t* p,
                                                       uint16_t evt_len);
extern void btm_ble_create_conn_cancel_complete(uint8_t* p);
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,
                                                      uint16_t evt_len);
extern void btm_ble_clear_resolving_list_complete(uint8_t* p, uint16_t evt_len);