1 /*
2  *  Copyright 2020 The Android Open Source Project
3  *
4  *  Licensed under the Apache License, Version 2.0 (the "License");
5  *  you may not use this file except in compliance with the License.
6  *  You may obtain a copy of the License at:
7  *
8  *  http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *  Unless required by applicable law or agreed to in writing, software
11  *  distributed under the License is distributed on an "AS IS" BASIS,
12  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *  See the License for the specific language governing permissions and
14  *  limitations under the License.
15  *
16  */
17 
18 #pragma once
19 
20 #include "bt_common.h"
21 
22 // This header contains functions for HCI-ble to invoke
23 void btm_ble_conn_complete(uint8_t* p, UNUSED_ATTR uint16_t evt_len,
24                            bool enhanced);
25 void btm_ble_process_adv_pkt(uint8_t len, uint8_t* p);
26 void btm_ble_process_ext_adv_pkt(uint8_t len, uint8_t* p);
27 void btm_ble_process_phy_update_pkt(uint8_t len, uint8_t* p);
28 void btm_ble_read_remote_features_complete(uint8_t* p);
29 void btm_le_on_advertising_set_terminated(uint8_t* p, uint16_t length);
30 extern void btm_ble_write_adv_enable_complete(uint8_t* p);
31 extern void btm_ble_create_ll_conn_complete(tHCI_STATUS status);
32 extern void btm_ble_ltk_request(uint16_t handle, uint8_t rand[8],
33                                 uint16_t ediv);
34 extern void btm_ble_test_command_complete(uint8_t* p);
35 extern void btm_ble_rand_enc_complete(uint8_t* p, uint16_t op_code,
36                                       tBTM_RAND_ENC_CB* p_enc_cplt_cback);
37 extern bool btm_identity_addr_to_random_pseudo(RawAddress* bd_addr,
38                                                uint8_t* p_addr_type,
39                                                bool refresh);
40 extern bool btm_identity_addr_to_random_pseudo_from_address_with_type(
41     tBLE_BD_ADDR* address_with_type, bool refresh);
42 extern void btm_ble_read_resolving_list_entry_complete(uint8_t* p,
43                                                        uint16_t evt_len);
44 extern void btm_ble_create_conn_cancel_complete(uint8_t* p);
45 extern void btm_ble_remove_resolving_list_entry_complete(uint8_t* p,
46                                                          uint16_t evt_len);
47 extern void btm_ble_add_resolving_list_entry_complete(uint8_t* p,
48                                                       uint16_t evt_len);
49 extern void btm_ble_clear_resolving_list_complete(uint8_t* p, uint16_t evt_len);
50 extern void btm_ble_process_periodic_adv_pkt(uint8_t len, uint8_t* p);
51 extern void btm_ble_process_periodic_adv_sync_est_evt(uint8_t len, uint8_t* p);
52 extern void btm_ble_process_periodic_adv_sync_lost_evt(uint8_t len, uint8_t* p);
53