• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2021 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  * Generated mock file from original source file
19  *   Functions generated:51
20  */
21 
22 #include <cstdint>
23 #include <map>
24 #include <string>
25 
26 #include "bta/include/bta_api.h"
27 #include "include/hardware/bluetooth.h"
28 #include "internal_include/bte_appl.h"
29 #include "test/common/mock_functions.h"
30 #include "types/bt_transport.h"
31 #include "types/raw_address.h"
32 
33 struct uid_set_t;
34 
35 #ifndef UNUSED_ATTR
36 #define UNUSED_ATTR
37 #endif
38 
btif_dm_pairing_is_busy()39 bool btif_dm_pairing_is_busy() {
40   inc_func_call_count(__func__);
41   return false;
42 }
check_cod(const RawAddress * remote_bdaddr,uint32_t cod)43 bool check_cod(const RawAddress* remote_bdaddr, uint32_t cod) {
44   inc_func_call_count(__func__);
45   return false;
46 }
check_cod_hid(const RawAddress * remote_bdaddr)47 bool check_cod_hid(const RawAddress* remote_bdaddr) {
48   inc_func_call_count(__func__);
49   return false;
50 }
check_cod_hid(const RawAddress & remote_bdaddr)51 bool check_cod_hid(const RawAddress& remote_bdaddr) {
52   inc_func_call_count(__func__);
53   return false;
54 }
is_device_le_audio_capable(const RawAddress bd_addr)55 bool is_device_le_audio_capable(const RawAddress bd_addr) {
56   inc_func_call_count(__func__);
57   return false;
58 }
btif_dm_get_connection_state(const RawAddress * bd_addr)59 uint16_t btif_dm_get_connection_state(const RawAddress* bd_addr) {
60   inc_func_call_count(__func__);
61   return 0;
62 }
BTIF_dm_disable()63 void BTIF_dm_disable() { inc_func_call_count(__func__); }
BTIF_dm_enable()64 void BTIF_dm_enable() { inc_func_call_count(__func__); }
BTIF_dm_on_hw_error()65 void BTIF_dm_on_hw_error() { inc_func_call_count(__func__); }
BTIF_dm_report_inquiry_status_change(uint8_t status)66 void BTIF_dm_report_inquiry_status_change(uint8_t status) {
67   inc_func_call_count(__func__);
68 }
bte_dm_evt(tBTA_DM_SEC_EVT event,tBTA_DM_SEC * p_data)69 void bte_dm_evt(tBTA_DM_SEC_EVT event, tBTA_DM_SEC* p_data) {
70   inc_func_call_count(__func__);
71 }
btif_debug_bond_event_dump(int fd)72 void btif_debug_bond_event_dump(int fd) { inc_func_call_count(__func__); }
btif_dm_ble_sec_req_evt(tBTA_DM_BLE_SEC_REQ * p_ble_req,bool is_consent)73 void btif_dm_ble_sec_req_evt(tBTA_DM_BLE_SEC_REQ* p_ble_req, bool is_consent) {
74   inc_func_call_count(__func__);
75 }
btif_dm_cancel_bond(const RawAddress bd_addr)76 void btif_dm_cancel_bond(const RawAddress bd_addr) {
77   inc_func_call_count(__func__);
78 }
btif_dm_cancel_discovery(void)79 void btif_dm_cancel_discovery(void) { inc_func_call_count(__func__); }
btif_dm_cleanup(void)80 void btif_dm_cleanup(void) { inc_func_call_count(__func__); }
btif_dm_create_bond(const RawAddress bd_addr,int transport)81 void btif_dm_create_bond(const RawAddress bd_addr, int transport) {
82   inc_func_call_count(__func__);
83 }
btif_dm_create_bond_le(const RawAddress bd_addr,tBLE_ADDR_TYPE addr_type)84 void btif_dm_create_bond_le(const RawAddress bd_addr,
85                             tBLE_ADDR_TYPE addr_type) {
86   inc_func_call_count(__func__);
87 }
btif_dm_create_bond_out_of_band(const RawAddress bd_addr,int transport,const bt_oob_data_t p192_data,const bt_oob_data_t p256_data)88 void btif_dm_create_bond_out_of_band(const RawAddress bd_addr, int transport,
89                                      const bt_oob_data_t p192_data,
90                                      const bt_oob_data_t p256_data) {
91   inc_func_call_count(__func__);
92 }
btif_dm_enable_service(tBTA_SERVICE_ID service_id,bool enable)93 void btif_dm_enable_service(tBTA_SERVICE_ID service_id, bool enable) {
94   inc_func_call_count(__func__);
95 }
btif_dm_get_ble_local_keys(tBTA_DM_BLE_LOCAL_KEY_MASK * p_key_mask,Octet16 * p_er,tBTA_BLE_LOCAL_ID_KEYS * p_id_keys)96 void btif_dm_get_ble_local_keys(tBTA_DM_BLE_LOCAL_KEY_MASK* p_key_mask,
97                                 Octet16* p_er,
98                                 tBTA_BLE_LOCAL_ID_KEYS* p_id_keys) {
99   inc_func_call_count(__func__);
100 }
btif_dm_get_remote_services(RawAddress remote_addr,const int transport)101 void btif_dm_get_remote_services(RawAddress remote_addr, const int transport) {
102   inc_func_call_count(__func__);
103 }
btif_dm_hh_open_failed(RawAddress * bdaddr)104 void btif_dm_hh_open_failed(RawAddress* bdaddr) {
105   inc_func_call_count(__func__);
106 }
btif_dm_init(uid_set_t * set)107 void btif_dm_init(uid_set_t* set) { inc_func_call_count(__func__); }
btif_dm_get_local_class_of_device(DEV_CLASS device_class)108 void btif_dm_get_local_class_of_device(DEV_CLASS device_class) {
109   inc_func_call_count(__func__);
110 }
btif_dm_load_ble_local_keys(void)111 void btif_dm_load_ble_local_keys(void) { inc_func_call_count(__func__); }
btif_dm_on_disable()112 void btif_dm_on_disable() { inc_func_call_count(__func__); }
btif_dm_pin_reply(const RawAddress bd_addr,uint8_t accept,uint8_t pin_len,bt_pin_code_t pin_code)113 void btif_dm_pin_reply(const RawAddress bd_addr, uint8_t accept,
114                        uint8_t pin_len, bt_pin_code_t pin_code) {
115   inc_func_call_count(__func__);
116 }
btif_dm_proc_io_req(tBTM_AUTH_REQ * p_auth_req,bool is_orig)117 void btif_dm_proc_io_req(tBTM_AUTH_REQ* p_auth_req, bool is_orig) {
118   inc_func_call_count(__func__);
119 }
btif_dm_proc_io_rsp(UNUSED_ATTR const RawAddress & bd_addr,tBTM_IO_CAP io_cap,UNUSED_ATTR tBTM_OOB_DATA oob_data,tBTM_AUTH_REQ auth_req)120 void btif_dm_proc_io_rsp(UNUSED_ATTR const RawAddress& bd_addr,
121                          tBTM_IO_CAP io_cap, UNUSED_ATTR tBTM_OOB_DATA oob_data,
122                          tBTM_AUTH_REQ auth_req) {
123   inc_func_call_count(__func__);
124 }
btif_dm_read_energy_info()125 void btif_dm_read_energy_info() { inc_func_call_count(__func__); }
btif_dm_remove_ble_bonding_keys(void)126 void btif_dm_remove_ble_bonding_keys(void) { inc_func_call_count(__func__); }
btif_dm_remove_bond(const RawAddress bd_addr)127 void btif_dm_remove_bond(const RawAddress bd_addr) {
128   inc_func_call_count(__func__);
129 }
btif_dm_set_oob_for_io_req(tBTM_OOB_DATA * p_has_oob_data)130 void btif_dm_set_oob_for_io_req(tBTM_OOB_DATA* p_has_oob_data) {
131   inc_func_call_count(__func__);
132 }
btif_dm_set_oob_for_le_io_req(const RawAddress & bd_addr,tBTM_OOB_DATA * p_has_oob_data,tBTM_LE_AUTH_REQ * p_auth_req)133 void btif_dm_set_oob_for_le_io_req(const RawAddress& bd_addr,
134                                    tBTM_OOB_DATA* p_has_oob_data,
135                                    tBTM_LE_AUTH_REQ* p_auth_req) {
136   inc_func_call_count(__func__);
137 }
btif_dm_ssp_reply(const RawAddress bd_addr,bt_ssp_variant_t variant,uint8_t accept)138 void btif_dm_ssp_reply(const RawAddress bd_addr, bt_ssp_variant_t variant,
139                        uint8_t accept) {
140   inc_func_call_count(__func__);
141 }
btif_dm_start_discovery(void)142 void btif_dm_start_discovery(void) { inc_func_call_count(__func__); }
btif_dm_update_ble_remote_properties(const RawAddress & bd_addr,BD_NAME bd_name,DEV_CLASS dev_class,tBT_DEVICE_TYPE dev_type)143 void btif_dm_update_ble_remote_properties(const RawAddress& bd_addr,
144                                           BD_NAME bd_name, DEV_CLASS dev_class,
145                                           tBT_DEVICE_TYPE dev_type) {
146   inc_func_call_count(__func__);
147 }
148 
btif_dm_get_smp_config(tBTE_APPL_CFG * p_cfg)149 bool btif_dm_get_smp_config(tBTE_APPL_CFG* p_cfg) {
150   inc_func_call_count(__func__);
151   return true;
152 }
153 
btif_dm_proc_rmt_oob(const RawAddress & bd_addr,Octet16 * p_c,Octet16 * p_r)154 bool btif_dm_proc_rmt_oob(const RawAddress& bd_addr, Octet16* p_c,
155                           Octet16* p_r) {
156   inc_func_call_count(__func__);
157   return false;
158 }
159 
btif_dm_proc_loc_oob(tBT_TRANSPORT transport,bool is_valid,const Octet16 & c,const Octet16 & r)160 void btif_dm_proc_loc_oob(tBT_TRANSPORT transport, bool is_valid,
161                           const Octet16& c, const Octet16& r) {
162   inc_func_call_count(__func__);
163 }
btif_get_device_type(const RawAddress & bda,int * p_device_type)164 bool btif_get_device_type(const RawAddress& bda, int* p_device_type) {
165   inc_func_call_count(__func__);
166   return false;
167 }
btif_get_address_type(const RawAddress & bda,tBLE_ADDR_TYPE * p_addr_type)168 bool btif_get_address_type(const RawAddress& bda, tBLE_ADDR_TYPE* p_addr_type) {
169   inc_func_call_count(__func__);
170   return false;
171 }
172