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  * Generated mock file from original source file
19  *   Functions generated:85
20  */
21 
22 #include <map>
23 #include <string>
24 
25 extern std::map<std::string, int> mock_function_count_map;
26 
27 #include <base/callback.h>
28 #include <mutex>
29 #include "common/metric_id_allocator.h"
30 #include "common/time_util.h"
31 #include "device/include/controller.h"
32 #include "main/shim/btm_api.h"
33 #include "main/shim/controller.h"
34 #include "main/shim/link_policy.h"
35 #include "main/shim/shim.h"
36 #include "stack/btm/btm_int_types.h"
37 #include "types/raw_address.h"
38 
39 #ifndef UNUSED_ATTR
40 #define UNUSED_ATTR
41 #endif
42 
43 Octet16 octet16;
44 
BTM_BleDataSignature(const RawAddress & bd_addr,uint8_t * p_text,uint16_t len,BLE_SIGNATURE signature)45 bool bluetooth::shim::BTM_BleDataSignature(const RawAddress& bd_addr,
46                                            uint8_t* p_text, uint16_t len,
47                                            BLE_SIGNATURE signature) {
48   mock_function_count_map[__func__]++;
49   return false;
50 }
BTM_BleLocalPrivacyEnabled(void)51 bool bluetooth::shim::BTM_BleLocalPrivacyEnabled(void) {
52   mock_function_count_map[__func__]++;
53   return false;
54 }
BTM_BleSecurityProcedureIsRunning(const RawAddress & bd_addr)55 bool bluetooth::shim::BTM_BleSecurityProcedureIsRunning(
56     const RawAddress& bd_addr) {
57   mock_function_count_map[__func__]++;
58   return false;
59 }
BTM_BleVerifySignature(const RawAddress & bd_addr,uint8_t * p_orig,uint16_t len,uint32_t counter,uint8_t * p_comp)60 bool bluetooth::shim::BTM_BleVerifySignature(const RawAddress& bd_addr,
61                                              uint8_t* p_orig, uint16_t len,
62                                              uint32_t counter,
63                                              uint8_t* p_comp) {
64   mock_function_count_map[__func__]++;
65   return false;
66 }
BTM_GetLeSecurityState(const RawAddress & bd_addr,uint8_t * p_le_dev_sec_flags,uint8_t * p_le_key_size)67 bool bluetooth::shim::BTM_GetLeSecurityState(const RawAddress& bd_addr,
68                                              uint8_t* p_le_dev_sec_flags,
69                                              uint8_t* p_le_key_size) {
70   mock_function_count_map[__func__]++;
71   return false;
72 }
BTM_HasEirService(const uint32_t * p_eir_uuid,uint16_t uuid16)73 bool bluetooth::shim::BTM_HasEirService(const uint32_t* p_eir_uuid,
74                                         uint16_t uuid16) {
75   mock_function_count_map[__func__]++;
76   return false;
77 }
BTM_ReadConnectedTransportAddress(RawAddress * remote_bda,tBT_TRANSPORT transport)78 bool bluetooth::shim::BTM_ReadConnectedTransportAddress(
79     RawAddress* remote_bda, tBT_TRANSPORT transport) {
80   mock_function_count_map[__func__]++;
81   return false;
82 }
BTM_ReadRemoteConnectionAddr(const RawAddress & pseudo_addr,RawAddress & conn_addr,tBLE_ADDR_TYPE * p_addr_type)83 bool bluetooth::shim::BTM_ReadRemoteConnectionAddr(
84     const RawAddress& pseudo_addr, RawAddress& conn_addr,
85     tBLE_ADDR_TYPE* p_addr_type) {
86   mock_function_count_map[__func__]++;
87   return false;
88 }
BTM_SecAddDevice(const RawAddress & bd_addr,DEV_CLASS dev_class,BD_NAME bd_name,uint8_t * features,LinkKey * link_key,uint8_t key_type,uint8_t pin_length)89 bool bluetooth::shim::BTM_SecAddDevice(const RawAddress& bd_addr,
90                                        DEV_CLASS dev_class, BD_NAME bd_name,
91                                        uint8_t* features, LinkKey* link_key,
92                                        uint8_t key_type, uint8_t pin_length) {
93   mock_function_count_map[__func__]++;
94   return false;
95 }
BTM_SecAddRmtNameNotifyCallback(tBTM_RMT_NAME_CALLBACK * p_callback)96 bool bluetooth::shim::BTM_SecAddRmtNameNotifyCallback(
97     tBTM_RMT_NAME_CALLBACK* p_callback) {
98   mock_function_count_map[__func__]++;
99   return false;
100 }
BTM_SecDeleteDevice(const RawAddress & bd_addr)101 bool bluetooth::shim::BTM_SecDeleteDevice(const RawAddress& bd_addr) {
102   mock_function_count_map[__func__]++;
103   return false;
104 }
BTM_SecDeleteRmtNameNotifyCallback(tBTM_RMT_NAME_CALLBACK * p_callback)105 bool bluetooth::shim::BTM_SecDeleteRmtNameNotifyCallback(
106     tBTM_RMT_NAME_CALLBACK* p_callback) {
107   mock_function_count_map[__func__]++;
108   return false;
109 }
BTM_SecRegister(const tBTM_APPL_INFO * bta_callbacks)110 bool bluetooth::shim::BTM_SecRegister(const tBTM_APPL_INFO* bta_callbacks) {
111   mock_function_count_map[__func__]++;
112   return false;
113 }
BTM_UseLeLink(const RawAddress & raw_address)114 bool bluetooth::shim::BTM_UseLeLink(const RawAddress& raw_address) {
115   mock_function_count_map[__func__]++;
116   return false;
117 }
BTM_SecReadDevName(const RawAddress & address)118 char* bluetooth::shim::BTM_SecReadDevName(const RawAddress& address) {
119   mock_function_count_map[__func__]++;
120   return nullptr;
121 }
BTM_GetDeviceEncRoot()122 const Octet16& bluetooth::shim::BTM_GetDeviceEncRoot() {
123   mock_function_count_map[__func__]++;
124   return octet16;
125 }
BTM_GetDeviceDHK()126 const Octet16& bluetooth::shim::BTM_GetDeviceDHK() {
127   mock_function_count_map[__func__]++;
128   return octet16;
129 }
BTM_GetDeviceIDRoot()130 const Octet16& bluetooth::shim::BTM_GetDeviceIDRoot() {
131   mock_function_count_map[__func__]++;
132   return octet16;
133 }
BTM_HasInquiryEirService(tBTM_INQ_RESULTS * p_results,uint16_t uuid16)134 tBTM_EIR_SEARCH_RESULT bluetooth::shim::BTM_HasInquiryEirService(
135     tBTM_INQ_RESULTS* p_results, uint16_t uuid16) {
136   mock_function_count_map[__func__]++;
137   return 0;
138 }
BTM_InqDbFirst(void)139 tBTM_INQ_INFO* bluetooth::shim::BTM_InqDbFirst(void) {
140   mock_function_count_map[__func__]++;
141   return nullptr;
142 }
BTM_InqDbNext(tBTM_INQ_INFO * p_cur)143 tBTM_INQ_INFO* bluetooth::shim::BTM_InqDbNext(tBTM_INQ_INFO* p_cur) {
144   mock_function_count_map[__func__]++;
145   return nullptr;
146 }
BTM_InqDbRead(const RawAddress & p_bda)147 tBTM_INQ_INFO* bluetooth::shim::BTM_InqDbRead(const RawAddress& p_bda) {
148   mock_function_count_map[__func__]++;
149   return nullptr;
150 }
BTM_BleObserve(bool start,uint8_t duration_sec,tBTM_INQ_RESULTS_CB * p_results_cb,tBTM_CMPL_CB * p_cmpl_cb)151 tBTM_STATUS bluetooth::shim::BTM_BleObserve(bool start, uint8_t duration_sec,
152                                             tBTM_INQ_RESULTS_CB* p_results_cb,
153                                             tBTM_CMPL_CB* p_cmpl_cb) {
154   mock_function_count_map[__func__]++;
155   return BTM_SUCCESS;
156 }
BTM_CancelRemoteDeviceName(void)157 tBTM_STATUS bluetooth::shim::BTM_CancelRemoteDeviceName(void) {
158   mock_function_count_map[__func__]++;
159   return BTM_SUCCESS;
160 }
BTM_ClearInqDb(const RawAddress * p_bda)161 tBTM_STATUS bluetooth::shim::BTM_ClearInqDb(const RawAddress* p_bda) {
162   mock_function_count_map[__func__]++;
163   return BTM_SUCCESS;
164 }
BTM_ReadRemoteDeviceName(const RawAddress & raw_address,tBTM_CMPL_CB * callback,tBT_TRANSPORT transport)165 tBTM_STATUS bluetooth::shim::BTM_ReadRemoteDeviceName(
166     const RawAddress& raw_address, tBTM_CMPL_CB* callback,
167     tBT_TRANSPORT transport) {
168   mock_function_count_map[__func__]++;
169   return BTM_SUCCESS;
170 }
BTM_SecBond(const RawAddress & bd_addr,tBLE_ADDR_TYPE addr_type,tBT_TRANSPORT transport,int device_type)171 tBTM_STATUS bluetooth::shim::BTM_SecBond(const RawAddress& bd_addr,
172                                          tBLE_ADDR_TYPE addr_type,
173                                          tBT_TRANSPORT transport,
174                                          int device_type) {
175   mock_function_count_map[__func__]++;
176   return BTM_SUCCESS;
177 }
BTM_SecBondCancel(const RawAddress & bd_addr)178 tBTM_STATUS bluetooth::shim::BTM_SecBondCancel(const RawAddress& bd_addr) {
179   mock_function_count_map[__func__]++;
180   return BTM_SUCCESS;
181 }
BTM_SetConnectability(uint16_t page_mode,uint16_t window,uint16_t interval)182 tBTM_STATUS bluetooth::shim::BTM_SetConnectability(uint16_t page_mode,
183                                                    uint16_t window,
184                                                    uint16_t interval) {
185   mock_function_count_map[__func__]++;
186   return BTM_SUCCESS;
187 }
BTM_SetDeviceClass(DEV_CLASS dev_class)188 tBTM_STATUS bluetooth::shim::BTM_SetDeviceClass(DEV_CLASS dev_class) {
189   mock_function_count_map[__func__]++;
190   return BTM_SUCCESS;
191 }
BTM_SetDiscoverability(uint16_t discoverable_mode,uint16_t window,uint16_t interval)192 tBTM_STATUS bluetooth::shim::BTM_SetDiscoverability(uint16_t discoverable_mode,
193                                                     uint16_t window,
194                                                     uint16_t interval) {
195   mock_function_count_map[__func__]++;
196   return BTM_SUCCESS;
197 }
BTM_SetEncryption(const RawAddress & bd_addr,tBT_TRANSPORT transport,tBTM_SEC_CALLBACK * p_callback,void * p_ref_data,tBTM_BLE_SEC_ACT sec_act)198 tBTM_STATUS bluetooth::shim::BTM_SetEncryption(const RawAddress& bd_addr,
199                                                tBT_TRANSPORT transport,
200                                                tBTM_SEC_CALLBACK* p_callback,
201                                                void* p_ref_data,
202                                                tBTM_BLE_SEC_ACT sec_act) {
203   mock_function_count_map[__func__]++;
204   return BTM_SUCCESS;
205 }
BTM_SetInquiryMode(uint8_t inquiry_mode)206 tBTM_STATUS bluetooth::shim::BTM_SetInquiryMode(uint8_t inquiry_mode) {
207   mock_function_count_map[__func__]++;
208   return BTM_SUCCESS;
209 }
BTM_StartInquiry(tBTM_INQ_RESULTS_CB * p_results_cb,tBTM_CMPL_CB * p_cmpl_cb)210 tBTM_STATUS bluetooth::shim::BTM_StartInquiry(tBTM_INQ_RESULTS_CB* p_results_cb,
211                                               tBTM_CMPL_CB* p_cmpl_cb) {
212   mock_function_count_map[__func__]++;
213   return BTM_SUCCESS;
214 }
BTM_WriteEIR(BT_HDR * p_buff)215 tBTM_STATUS bluetooth::shim::BTM_WriteEIR(BT_HDR* p_buff) {
216   mock_function_count_map[__func__]++;
217   return BTM_SUCCESS;
218 }
btm_sec_mx_access_request(const RawAddress & bd_addr,bool is_originator,uint16_t security_requirement,tBTM_SEC_CALLBACK * p_callback,void * p_ref_data)219 tBTM_STATUS bluetooth::shim::btm_sec_mx_access_request(
220     const RawAddress& bd_addr, bool is_originator,
221     uint16_t security_requirement, tBTM_SEC_CALLBACK* p_callback,
222     void* p_ref_data) {
223   mock_function_count_map[__func__]++;
224   return BTM_SUCCESS;
225 }
BTM_GetHCIConnHandle(const RawAddress & remote_bda,tBT_TRANSPORT transport)226 uint16_t bluetooth::shim::BTM_GetHCIConnHandle(const RawAddress& remote_bda,
227                                                tBT_TRANSPORT transport) {
228   mock_function_count_map[__func__]++;
229   return 0;
230 }
BTM_IsInquiryActive(void)231 uint16_t bluetooth::shim::BTM_IsInquiryActive(void) {
232   mock_function_count_map[__func__]++;
233   return 0;
234 }
BTM_BleGetSupportedKeySize(const RawAddress & bd_addr)235 uint8_t bluetooth::shim::BTM_BleGetSupportedKeySize(const RawAddress& bd_addr) {
236   mock_function_count_map[__func__]++;
237   return 0;
238 }
BTM_BleMaxMultiAdvInstanceCount()239 uint8_t bluetooth::shim::BTM_BleMaxMultiAdvInstanceCount() {
240   mock_function_count_map[__func__]++;
241   return 0;
242 }
BTM_GetEirSupportedServices(uint32_t * p_eir_uuid,uint8_t ** p,uint8_t max_num_uuid16,uint8_t * p_num_uuid16)243 uint8_t bluetooth::shim::BTM_GetEirSupportedServices(uint32_t* p_eir_uuid,
244                                                      uint8_t** p,
245                                                      uint8_t max_num_uuid16,
246                                                      uint8_t* p_num_uuid16) {
247   mock_function_count_map[__func__]++;
248   return 0;
249 }
BTM_GetEirUuidList(uint8_t * p_eir,size_t eir_len,uint8_t uuid_size,uint8_t * p_num_uuid,uint8_t * p_uuid_list,uint8_t max_num_uuid)250 uint8_t bluetooth::shim::BTM_GetEirUuidList(uint8_t* p_eir, size_t eir_len,
251                                             uint8_t uuid_size,
252                                             uint8_t* p_num_uuid,
253                                             uint8_t* p_uuid_list,
254                                             uint8_t max_num_uuid) {
255   mock_function_count_map[__func__]++;
256   return 0;
257 }
BTM_AddEirService(uint32_t * p_eir_uuid,uint16_t uuid16)258 void bluetooth::shim::BTM_AddEirService(uint32_t* p_eir_uuid, uint16_t uuid16) {
259   mock_function_count_map[__func__]++;
260 }
BTM_BleAdvFilterParamSetup(int action,tBTM_BLE_PF_FILT_INDEX filt_index,std::unique_ptr<btgatt_filt_param_setup_t> p_filt_params,tBTM_BLE_PF_PARAM_CB cb)261 void bluetooth::shim::BTM_BleAdvFilterParamSetup(
262     int action, tBTM_BLE_PF_FILT_INDEX filt_index,
263     std::unique_ptr<btgatt_filt_param_setup_t> p_filt_params,
264     tBTM_BLE_PF_PARAM_CB cb) {
265   mock_function_count_map[__func__]++;
266 }
BTM_BleEnableDisableFilterFeature(uint8_t enable,tBTM_BLE_PF_STATUS_CBACK p_stat_cback)267 void bluetooth::shim::BTM_BleEnableDisableFilterFeature(
268     uint8_t enable, tBTM_BLE_PF_STATUS_CBACK p_stat_cback) {
269   mock_function_count_map[__func__]++;
270 }
BTM_BleLoadLocalKeys(uint8_t key_type,tBTM_BLE_LOCAL_KEYS * p_key)271 void bluetooth::shim::BTM_BleLoadLocalKeys(uint8_t key_type,
272                                            tBTM_BLE_LOCAL_KEYS* p_key) {
273   mock_function_count_map[__func__]++;
274 }
BTM_BleOobDataReply(const RawAddress & bd_addr,uint8_t res,uint8_t len,uint8_t * p_data)275 void bluetooth::shim::BTM_BleOobDataReply(const RawAddress& bd_addr,
276                                           uint8_t res, uint8_t len,
277                                           uint8_t* p_data) {
278   mock_function_count_map[__func__]++;
279 }
BTM_BleReadPhy(const RawAddress & bd_addr,base::Callback<void (uint8_t tx_phy,uint8_t rx_phy,uint8_t status)> cb)280 void bluetooth::shim::BTM_BleReadPhy(
281     const RawAddress& bd_addr,
282     base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)> cb) {
283   mock_function_count_map[__func__]++;
284 }
BTM_BleReceiverTest(uint8_t rx_freq,tBTM_CMPL_CB * p_cmd_cmpl_cback)285 void bluetooth::shim::BTM_BleReceiverTest(uint8_t rx_freq,
286                                           tBTM_CMPL_CB* p_cmd_cmpl_cback) {
287   mock_function_count_map[__func__]++;
288 }
BTM_BleSecureConnectionOobDataReply(const RawAddress & bd_addr,uint8_t * p_c,uint8_t * p_r)289 void bluetooth::shim::BTM_BleSecureConnectionOobDataReply(
290     const RawAddress& bd_addr, uint8_t* p_c, uint8_t* p_r) {
291   mock_function_count_map[__func__]++;
292 }
BTM_BleSetConnScanParams(uint32_t scan_interval,uint32_t scan_window)293 void bluetooth::shim::BTM_BleSetConnScanParams(uint32_t scan_interval,
294                                                uint32_t scan_window) {
295   mock_function_count_map[__func__]++;
296 }
BTM_BleSetPhy(const RawAddress & bd_addr,uint8_t tx_phys,uint8_t rx_phys,uint16_t phy_options)297 void bluetooth::shim::BTM_BleSetPhy(const RawAddress& bd_addr, uint8_t tx_phys,
298                                     uint8_t rx_phys, uint16_t phy_options) {
299   mock_function_count_map[__func__]++;
300 }
BTM_BleSetPrefConnParams(const RawAddress & bd_addr,uint16_t min_conn_int,uint16_t max_conn_int,uint16_t peripheral_latency,uint16_t supervision_tout)301 void bluetooth::shim::BTM_BleSetPrefConnParams(const RawAddress& bd_addr,
302                                                uint16_t min_conn_int,
303                                                uint16_t max_conn_int,
304                                                uint16_t peripheral_latency,
305                                                uint16_t supervision_tout) {
306   mock_function_count_map[__func__]++;
307 }
BTM_BleTestEnd(tBTM_CMPL_CB * p_cmd_cmpl_cback)308 void bluetooth::shim::BTM_BleTestEnd(tBTM_CMPL_CB* p_cmd_cmpl_cback) {
309   mock_function_count_map[__func__]++;
310 }
BTM_BleTransmitterTest(uint8_t tx_freq,uint8_t test_data_len,uint8_t packet_payload,tBTM_CMPL_CB * p_cmd_cmpl_cback)311 void bluetooth::shim::BTM_BleTransmitterTest(uint8_t tx_freq,
312                                              uint8_t test_data_len,
313                                              uint8_t packet_payload,
314                                              tBTM_CMPL_CB* p_cmd_cmpl_cback) {
315   mock_function_count_map[__func__]++;
316 }
BTM_BleUpdateAdvFilterPolicy(tBTM_BLE_AFP adv_policy)317 void bluetooth::shim::BTM_BleUpdateAdvFilterPolicy(tBTM_BLE_AFP adv_policy) {
318   mock_function_count_map[__func__]++;
319 }
BTM_CancelInquiry(void)320 void bluetooth::shim::BTM_CancelInquiry(void) {
321   mock_function_count_map[__func__]++;
322 }
BTM_ConfirmReqReply(tBTM_STATUS res,const RawAddress & bd_addr)323 void bluetooth::shim::BTM_ConfirmReqReply(tBTM_STATUS res,
324                                           const RawAddress& bd_addr) {
325   mock_function_count_map[__func__]++;
326 }
BTM_EnableInterlacedInquiryScan()327 void bluetooth::shim::BTM_EnableInterlacedInquiryScan() {
328   mock_function_count_map[__func__]++;
329 }
BTM_EnableInterlacedPageScan()330 void bluetooth::shim::BTM_EnableInterlacedPageScan() {
331   mock_function_count_map[__func__]++;
332 }
BTM_LE_PF_addr_filter(tBTM_BLE_SCAN_COND_OP action,tBTM_BLE_PF_FILT_INDEX filt_index,tBLE_BD_ADDR addr,tBTM_BLE_PF_CFG_CBACK cb)333 void bluetooth::shim::BTM_LE_PF_addr_filter(tBTM_BLE_SCAN_COND_OP action,
334                                             tBTM_BLE_PF_FILT_INDEX filt_index,
335                                             tBLE_BD_ADDR addr,
336                                             tBTM_BLE_PF_CFG_CBACK cb) {
337   mock_function_count_map[__func__]++;
338 }
BTM_LE_PF_clear(tBTM_BLE_PF_FILT_INDEX filt_index,tBTM_BLE_PF_CFG_CBACK cb)339 void bluetooth::shim::BTM_LE_PF_clear(tBTM_BLE_PF_FILT_INDEX filt_index,
340                                       tBTM_BLE_PF_CFG_CBACK cb) {
341   mock_function_count_map[__func__]++;
342 }
BTM_LE_PF_local_name(tBTM_BLE_SCAN_COND_OP action,tBTM_BLE_PF_FILT_INDEX filt_index,std::vector<uint8_t> name,tBTM_BLE_PF_CFG_CBACK cb)343 void bluetooth::shim::BTM_LE_PF_local_name(tBTM_BLE_SCAN_COND_OP action,
344                                            tBTM_BLE_PF_FILT_INDEX filt_index,
345                                            std::vector<uint8_t> name,
346                                            tBTM_BLE_PF_CFG_CBACK cb) {
347   mock_function_count_map[__func__]++;
348 }
BTM_LE_PF_manu_data(tBTM_BLE_SCAN_COND_OP action,tBTM_BLE_PF_FILT_INDEX filt_index,uint16_t company_id,uint16_t company_id_mask,std::vector<uint8_t> data,std::vector<uint8_t> data_mask,tBTM_BLE_PF_CFG_CBACK cb)349 void bluetooth::shim::BTM_LE_PF_manu_data(
350     tBTM_BLE_SCAN_COND_OP action, tBTM_BLE_PF_FILT_INDEX filt_index,
351     uint16_t company_id, uint16_t company_id_mask, std::vector<uint8_t> data,
352     std::vector<uint8_t> data_mask, tBTM_BLE_PF_CFG_CBACK cb) {
353   mock_function_count_map[__func__]++;
354 }
BTM_LE_PF_set(tBTM_BLE_PF_FILT_INDEX filt_index,std::vector<ApcfCommand> commands,tBTM_BLE_PF_CFG_CBACK cb)355 void bluetooth::shim::BTM_LE_PF_set(tBTM_BLE_PF_FILT_INDEX filt_index,
356                                     std::vector<ApcfCommand> commands,
357                                     tBTM_BLE_PF_CFG_CBACK cb) {
358   mock_function_count_map[__func__]++;
359 }
BTM_LE_PF_srvc_data(tBTM_BLE_SCAN_COND_OP action,tBTM_BLE_PF_FILT_INDEX filt_index)360 void bluetooth::shim::BTM_LE_PF_srvc_data(tBTM_BLE_SCAN_COND_OP action,
361                                           tBTM_BLE_PF_FILT_INDEX filt_index) {
362   mock_function_count_map[__func__]++;
363 }
BTM_LE_PF_srvc_data_pattern(tBTM_BLE_SCAN_COND_OP action,tBTM_BLE_PF_FILT_INDEX filt_index,std::vector<uint8_t> data,std::vector<uint8_t> data_mask,tBTM_BLE_PF_CFG_CBACK cb)364 void bluetooth::shim::BTM_LE_PF_srvc_data_pattern(
365     tBTM_BLE_SCAN_COND_OP action, tBTM_BLE_PF_FILT_INDEX filt_index,
366     std::vector<uint8_t> data, std::vector<uint8_t> data_mask,
367     tBTM_BLE_PF_CFG_CBACK cb) {
368   mock_function_count_map[__func__]++;
369 }
BTM_LE_PF_uuid_filter(tBTM_BLE_SCAN_COND_OP action,tBTM_BLE_PF_FILT_INDEX filt_index,tBTM_BLE_PF_COND_TYPE filter_type,const bluetooth::Uuid & uuid,tBTM_BLE_PF_LOGIC_TYPE cond_logic,const bluetooth::Uuid & uuid_mask,tBTM_BLE_PF_CFG_CBACK cb)370 void bluetooth::shim::BTM_LE_PF_uuid_filter(tBTM_BLE_SCAN_COND_OP action,
371                                             tBTM_BLE_PF_FILT_INDEX filt_index,
372                                             tBTM_BLE_PF_COND_TYPE filter_type,
373                                             const bluetooth::Uuid& uuid,
374                                             tBTM_BLE_PF_LOGIC_TYPE cond_logic,
375                                             const bluetooth::Uuid& uuid_mask,
376                                             tBTM_BLE_PF_CFG_CBACK cb) {
377   mock_function_count_map[__func__]++;
378 }
BTM_PINCodeReply(const RawAddress & bd_addr,uint8_t res,uint8_t pin_len,uint8_t * p_pin)379 void bluetooth::shim::BTM_PINCodeReply(const RawAddress& bd_addr, uint8_t res,
380                                        uint8_t pin_len, uint8_t* p_pin) {
381   mock_function_count_map[__func__]++;
382 }
BTM_ReadConnectionAddr(const RawAddress & remote_bda,RawAddress & local_conn_addr,tBLE_ADDR_TYPE * p_addr_type)383 void bluetooth::shim::BTM_ReadConnectionAddr(const RawAddress& remote_bda,
384                                              RawAddress& local_conn_addr,
385                                              tBLE_ADDR_TYPE* p_addr_type) {
386   mock_function_count_map[__func__]++;
387 }
BTM_ReadDevInfo(const RawAddress & remote_bda,tBT_DEVICE_TYPE * p_dev_type,tBLE_ADDR_TYPE * p_addr_type)388 void bluetooth::shim::BTM_ReadDevInfo(const RawAddress& remote_bda,
389                                       tBT_DEVICE_TYPE* p_dev_type,
390                                       tBLE_ADDR_TYPE* p_addr_type) {
391   mock_function_count_map[__func__]++;
392 }
BTM_RemoteOobDataReply(tBTM_STATUS res,const RawAddress & bd_addr,const Octet16 & c,const Octet16 & r)393 void bluetooth::shim::BTM_RemoteOobDataReply(tBTM_STATUS res,
394                                              const RawAddress& bd_addr,
395                                              const Octet16& c,
396                                              const Octet16& r) {
397   mock_function_count_map[__func__]++;
398 }
BTM_RemoveEirService(uint32_t * p_eir_uuid,uint16_t uuid16)399 void bluetooth::shim::BTM_RemoveEirService(uint32_t* p_eir_uuid,
400                                            uint16_t uuid16) {
401   mock_function_count_map[__func__]++;
402 }
BTM_SecAddBleDevice(const RawAddress & bd_addr,tBT_DEVICE_TYPE dev_type,tBLE_ADDR_TYPE addr_type)403 void bluetooth::shim::BTM_SecAddBleDevice(const RawAddress& bd_addr,
404                                           tBT_DEVICE_TYPE dev_type,
405                                           tBLE_ADDR_TYPE addr_type) {
406   mock_function_count_map[__func__]++;
407 }
BTM_SecAddBleKey(const RawAddress & bd_addr,tBTM_LE_KEY_VALUE * p_le_key,tBTM_LE_KEY_TYPE key_type)408 void bluetooth::shim::BTM_SecAddBleKey(const RawAddress& bd_addr,
409                                        tBTM_LE_KEY_VALUE* p_le_key,
410                                        tBTM_LE_KEY_TYPE key_type) {
411   mock_function_count_map[__func__]++;
412 }
BTM_SecClearSecurityFlags(const RawAddress & bd_addr)413 void bluetooth::shim::BTM_SecClearSecurityFlags(const RawAddress& bd_addr) {
414   mock_function_count_map[__func__]++;
415 }
BTM_SecurityGrant(const RawAddress & bd_addr,uint8_t res)416 void bluetooth::shim::BTM_SecurityGrant(const RawAddress& bd_addr,
417                                         uint8_t res) {
418   mock_function_count_map[__func__]++;
419 }
SendRemoteNameRequest(const RawAddress & raw_address)420 void bluetooth::shim::SendRemoteNameRequest(const RawAddress& raw_address) {
421   mock_function_count_map[__func__]++;
422 }
btm_api_process_extended_inquiry_result(RawAddress raw_address,uint8_t page_scan_rep_mode,DEV_CLASS device_class,uint16_t clock_offset,int8_t rssi,const uint8_t * eir_data,size_t eir_len)423 void btm_api_process_extended_inquiry_result(RawAddress raw_address,
424                                              uint8_t page_scan_rep_mode,
425                                              DEV_CLASS device_class,
426                                              uint16_t clock_offset, int8_t rssi,
427                                              const uint8_t* eir_data,
428                                              size_t eir_len) {
429   mock_function_count_map[__func__]++;
430 }
btm_api_process_inquiry_result(const RawAddress & raw_address,uint8_t page_scan_rep_mode,DEV_CLASS device_class,uint16_t clock_offset)431 void btm_api_process_inquiry_result(const RawAddress& raw_address,
432                                     uint8_t page_scan_rep_mode,
433                                     DEV_CLASS device_class,
434                                     uint16_t clock_offset) {
435   mock_function_count_map[__func__]++;
436 }
btm_api_process_inquiry_result_with_rssi(RawAddress raw_address,uint8_t page_scan_rep_mode,DEV_CLASS device_class,uint16_t clock_offset,int8_t rssi)437 void btm_api_process_inquiry_result_with_rssi(RawAddress raw_address,
438                                               uint8_t page_scan_rep_mode,
439                                               DEV_CLASS device_class,
440                                               uint16_t clock_offset,
441                                               int8_t rssi) {
442   mock_function_count_map[__func__]++;
443 }
BTM_SetPowerMode(uint16_t,tBTM_PM_PWR_MD const &)444 tBTM_STATUS bluetooth::shim::BTM_SetPowerMode(uint16_t, tBTM_PM_PWR_MD const&) {
445   mock_function_count_map[__func__]++;
446   return BTM_SUCCESS;
447 }
btm_pm_on_mode_change(tHCI_STATUS status,uint16_t handle,tHCI_MODE current_mode,uint16_t interval)448 void bluetooth::shim::btm_pm_on_mode_change(tHCI_STATUS status, uint16_t handle,
449                                             tHCI_MODE current_mode,
450                                             uint16_t interval) {
451   mock_function_count_map[__func__]++;
452 }
BTM_SetSsrParams(uint16_t,uint16_t max_lat,uint16_t min_rmt_to,uint16_t min_loc_to)453 tBTM_STATUS bluetooth::shim::BTM_SetSsrParams(uint16_t, uint16_t max_lat,
454                                               uint16_t min_rmt_to,
455                                               uint16_t min_loc_to) {
456   mock_function_count_map[__func__]++;
457   return BTM_SUCCESS;
458 }
btm_pm_on_sniff_subrating(tHCI_STATUS status,uint16_t handle,uint16_t maximum_transmit_latency,uint16_t maximum_receive_latency,UNUSED_ATTR uint16_t minimum_remote_timeout,UNUSED_ATTR uint16_t minimum_local_timeout)459 void bluetooth::shim::btm_pm_on_sniff_subrating(
460     tHCI_STATUS status, uint16_t handle, uint16_t maximum_transmit_latency,
461     uint16_t maximum_receive_latency,
462     UNUSED_ATTR uint16_t minimum_remote_timeout,
463     UNUSED_ATTR uint16_t minimum_local_timeout) {
464   mock_function_count_map[__func__]++;
465 }
466