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 <cstdint> 21 22 #include "osi/include/osi.h" // UNUSED_ATTR 23 #include "types/ble_address_with_type.h" 24 #include "types/raw_address.h" 25 26 // This header contains functions for HCI-ble to invoke 27 void btm_ble_process_adv_pkt(uint8_t len, const uint8_t* p); 28 void btm_ble_process_ext_adv_pkt(uint8_t len, const uint8_t* p); 29 void btm_ble_process_phy_update_pkt(uint8_t len, uint8_t* p); 30 void btm_ble_read_remote_features_complete(uint8_t* p, uint8_t length); 31 void btm_le_on_advertising_set_terminated(uint8_t* p, uint16_t length); 32 void btm_ble_write_adv_enable_complete(uint8_t* p, uint16_t evt_len); 33 void btm_ble_create_ll_conn_complete(tHCI_STATUS status); 34 void btm_ble_ltk_request(uint16_t handle, uint8_t rand[8], uint16_t ediv); 35 void btm_ble_test_command_complete(uint8_t* p); 36 void btm_ble_rand_enc_complete(uint8_t* p, uint16_t evt_len, uint16_t op_code, 37 tBTM_RAND_ENC_CB* p_enc_cplt_cback); 38 bool btm_identity_addr_to_random_pseudo(RawAddress* bd_addr, 39 tBLE_ADDR_TYPE* p_addr_type, 40 bool refresh); 41 bool btm_identity_addr_to_random_pseudo_from_address_with_type( 42 tBLE_BD_ADDR* address_with_type, bool refresh); 43 void btm_ble_read_resolving_list_entry_complete(const uint8_t* p, 44 uint16_t evt_len); 45 void btm_ble_remove_resolving_list_entry_complete(uint8_t* p, uint16_t evt_len); 46 void btm_ble_add_resolving_list_entry_complete(uint8_t* p, uint16_t evt_len); 47 void btm_ble_clear_resolving_list_complete(uint8_t* p, uint16_t evt_len); 48 void btm_ble_process_periodic_adv_pkt(uint8_t len, const uint8_t* p); 49 void btm_ble_process_periodic_adv_sync_est_evt(uint8_t len, const uint8_t* p); 50 void btm_ble_process_periodic_adv_sync_lost_evt(uint8_t len, uint8_t* p); 51