• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 extern void btm_ble_write_adv_enable_complete(uint8_t* p, uint16_t evt_len);
33 extern void btm_ble_create_ll_conn_complete(tHCI_STATUS status);
34 extern void btm_ble_ltk_request(uint16_t handle, uint8_t rand[8],
35                                 uint16_t ediv);
36 extern void btm_ble_test_command_complete(uint8_t* p);
37 extern void btm_ble_rand_enc_complete(uint8_t* p, uint16_t evt_len,
38                                       uint16_t op_code,
39                                       tBTM_RAND_ENC_CB* p_enc_cplt_cback);
40 extern bool btm_identity_addr_to_random_pseudo(RawAddress* bd_addr,
41                                                tBLE_ADDR_TYPE* p_addr_type,
42                                                bool refresh);
43 extern bool btm_identity_addr_to_random_pseudo_from_address_with_type(
44     tBLE_BD_ADDR* address_with_type, bool refresh);
45 extern void btm_ble_read_resolving_list_entry_complete(const uint8_t* p,
46                                                        uint16_t evt_len);
47 extern void btm_ble_create_conn_cancel_complete(uint8_t* p);
48 extern void btm_ble_remove_resolving_list_entry_complete(uint8_t* p,
49                                                          uint16_t evt_len);
50 extern void btm_ble_add_resolving_list_entry_complete(uint8_t* p,
51                                                       uint16_t evt_len);
52 extern void btm_ble_clear_resolving_list_complete(uint8_t* p, uint16_t evt_len);
53 extern void btm_ble_process_periodic_adv_pkt(uint8_t len, const uint8_t* p);
54 extern void btm_ble_process_periodic_adv_sync_est_evt(uint8_t len,
55                                                       const uint8_t* p);
56 extern void btm_ble_process_periodic_adv_sync_lost_evt(uint8_t len, uint8_t* p);
57