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:44
20 */
21
22 #include <map>
23 #include <string>
24
25 extern std::map<std::string, int> mock_function_count_map;
26
27 #include <stddef.h>
28 #include <stdio.h>
29 #include <stdlib.h>
30 #include <string.h>
31 #include "advertise_data_parser.h"
32 #include "bt_common.h"
33 #include "bt_types.h"
34 #include "btm_api.h"
35 #include "btu.h"
36 #include "common/time_util.h"
37 #include "device/include/controller.h"
38 #include "hcidefs.h"
39 #include "main/shim/btm_api.h"
40 #include "main/shim/shim.h"
41 #include "osi/include/log.h"
42 #include "osi/include/osi.h"
43 #include "stack/btm/btm_ble_int.h"
44 #include "stack/btm/btm_int.h"
45 #include "stack/btm/btm_int_types.h"
46 #include "stack/include/acl_api.h"
47 #include "stack/include/btm_ble_api.h"
48 #include "stack/include/hcimsgs.h"
49 #include "stack/include/inq_hci_link_interface.h"
50
51 #ifndef UNUSED_ATTR
52 #define UNUSED_ATTR
53 #endif
54
SendRemoteNameRequest(const RawAddress & raw_address)55 void SendRemoteNameRequest(const RawAddress& raw_address) {
56 mock_function_count_map[__func__]++;
57 }
BTM_HasEirService(const uint32_t * p_eir_uuid,uint16_t uuid16)58 bool BTM_HasEirService(const uint32_t* p_eir_uuid, uint16_t uuid16) {
59 mock_function_count_map[__func__]++;
60 return false;
61 }
btm_inq_find_bdaddr(const RawAddress & p_bda)62 bool btm_inq_find_bdaddr(const RawAddress& p_bda) {
63 mock_function_count_map[__func__]++;
64 return false;
65 }
BTM_HasInquiryEirService(tBTM_INQ_RESULTS * p_results,uint16_t uuid16)66 tBTM_EIR_SEARCH_RESULT BTM_HasInquiryEirService(tBTM_INQ_RESULTS* p_results,
67 uint16_t uuid16) {
68 mock_function_count_map[__func__]++;
69 return 0;
70 }
BTM_InqDbFirst(void)71 tBTM_INQ_INFO* BTM_InqDbFirst(void) {
72 mock_function_count_map[__func__]++;
73 return nullptr;
74 }
BTM_InqDbNext(tBTM_INQ_INFO * p_cur)75 tBTM_INQ_INFO* BTM_InqDbNext(tBTM_INQ_INFO* p_cur) {
76 mock_function_count_map[__func__]++;
77 return nullptr;
78 }
BTM_InqDbRead(const RawAddress & p_bda)79 tBTM_INQ_INFO* BTM_InqDbRead(const RawAddress& p_bda) {
80 mock_function_count_map[__func__]++;
81 return nullptr;
82 }
BTM_CancelRemoteDeviceName(void)83 tBTM_STATUS BTM_CancelRemoteDeviceName(void) {
84 mock_function_count_map[__func__]++;
85 return BTM_SUCCESS;
86 }
BTM_ClearInqDb(const RawAddress * p_bda)87 tBTM_STATUS BTM_ClearInqDb(const RawAddress* p_bda) {
88 mock_function_count_map[__func__]++;
89 return BTM_SUCCESS;
90 }
BTM_ReadRemoteDeviceName(const RawAddress & remote_bda,tBTM_CMPL_CB * p_cb,tBT_TRANSPORT transport)91 tBTM_STATUS BTM_ReadRemoteDeviceName(const RawAddress& remote_bda,
92 tBTM_CMPL_CB* p_cb,
93 tBT_TRANSPORT transport) {
94 mock_function_count_map[__func__]++;
95 return BTM_SUCCESS;
96 }
BTM_SetConnectability(uint16_t page_mode)97 tBTM_STATUS BTM_SetConnectability(uint16_t page_mode) {
98 mock_function_count_map[__func__]++;
99 return BTM_SUCCESS;
100 }
BTM_SetDiscoverability(uint16_t inq_mode)101 tBTM_STATUS BTM_SetDiscoverability(uint16_t inq_mode) {
102 mock_function_count_map[__func__]++;
103 return BTM_SUCCESS;
104 }
BTM_SetInquiryMode(uint8_t mode)105 tBTM_STATUS BTM_SetInquiryMode(uint8_t mode) {
106 mock_function_count_map[__func__]++;
107 return BTM_SUCCESS;
108 }
BTM_StartInquiry(tBTM_INQ_RESULTS_CB * p_results_cb,tBTM_CMPL_CB * p_cmpl_cb)109 tBTM_STATUS BTM_StartInquiry(tBTM_INQ_RESULTS_CB* p_results_cb,
110 tBTM_CMPL_CB* p_cmpl_cb) {
111 mock_function_count_map[__func__]++;
112 return BTM_SUCCESS;
113 }
BTM_WriteEIR(BT_HDR * p_buff)114 tBTM_STATUS BTM_WriteEIR(BT_HDR* p_buff) {
115 mock_function_count_map[__func__]++;
116 return BTM_SUCCESS;
117 }
btm_initiate_rem_name(const RawAddress & remote_bda,uint8_t origin,uint64_t timeout_ms,tBTM_CMPL_CB * p_cb)118 tBTM_STATUS btm_initiate_rem_name(const RawAddress& remote_bda, uint8_t origin,
119 uint64_t timeout_ms, tBTM_CMPL_CB* p_cb) {
120 mock_function_count_map[__func__]++;
121 return BTM_SUCCESS;
122 }
btm_inq_db_find(const RawAddress & p_bda)123 tINQ_DB_ENT* btm_inq_db_find(const RawAddress& p_bda) {
124 mock_function_count_map[__func__]++;
125 return nullptr;
126 }
btm_inq_db_new(const RawAddress & p_bda)127 tINQ_DB_ENT* btm_inq_db_new(const RawAddress& p_bda) {
128 mock_function_count_map[__func__]++;
129 return nullptr;
130 }
BTM_IsInquiryActive(void)131 uint16_t BTM_IsInquiryActive(void) {
132 mock_function_count_map[__func__]++;
133 return 0;
134 }
BTM_GetEirSupportedServices(uint32_t * p_eir_uuid,uint8_t ** p,uint8_t max_num_uuid16,uint8_t * p_num_uuid16)135 uint8_t BTM_GetEirSupportedServices(uint32_t* p_eir_uuid, uint8_t** p,
136 uint8_t max_num_uuid16,
137 uint8_t* p_num_uuid16) {
138 mock_function_count_map[__func__]++;
139 return 0;
140 }
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)141 uint8_t BTM_GetEirUuidList(uint8_t* p_eir, size_t eir_len, uint8_t uuid_size,
142 uint8_t* p_num_uuid, uint8_t* p_uuid_list,
143 uint8_t max_num_uuid) {
144 mock_function_count_map[__func__]++;
145 return 0;
146 }
BTM_AddEirService(uint32_t * p_eir_uuid,uint16_t uuid16)147 void BTM_AddEirService(uint32_t* p_eir_uuid, uint16_t uuid16) {
148 mock_function_count_map[__func__]++;
149 }
BTM_CancelInquiry(void)150 void BTM_CancelInquiry(void) { mock_function_count_map[__func__]++; }
BTM_EnableInterlacedInquiryScan()151 void BTM_EnableInterlacedInquiryScan() { mock_function_count_map[__func__]++; }
BTM_EnableInterlacedPageScan()152 void BTM_EnableInterlacedPageScan() { mock_function_count_map[__func__]++; }
BTM_RemoveEirService(uint32_t * p_eir_uuid,uint16_t uuid16)153 void BTM_RemoveEirService(uint32_t* p_eir_uuid, uint16_t uuid16) {
154 mock_function_count_map[__func__]++;
155 }
btm_clr_inq_db(const RawAddress * p_bda)156 void btm_clr_inq_db(const RawAddress* p_bda) {
157 mock_function_count_map[__func__]++;
158 }
btm_clr_inq_result_flt(void)159 void btm_clr_inq_result_flt(void) { mock_function_count_map[__func__]++; }
btm_inq_clear_ssp(void)160 void btm_inq_clear_ssp(void) { mock_function_count_map[__func__]++; }
btm_inq_db_free(void)161 void btm_inq_db_free(void) { mock_function_count_map[__func__]++; }
btm_inq_db_init(void)162 void btm_inq_db_init(void) { mock_function_count_map[__func__]++; }
btm_inq_db_reset(void)163 void btm_inq_db_reset(void) { mock_function_count_map[__func__]++; }
btm_inq_remote_name_timer_timeout(UNUSED_ATTR void * data)164 void btm_inq_remote_name_timer_timeout(UNUSED_ATTR void* data) {
165 mock_function_count_map[__func__]++;
166 }
btm_inq_rmt_name_failed_cancelled(void)167 void btm_inq_rmt_name_failed_cancelled(void) {
168 mock_function_count_map[__func__]++;
169 }
btm_inq_stop_on_ssp(void)170 void btm_inq_stop_on_ssp(void) { mock_function_count_map[__func__]++; }
btm_process_cancel_complete(uint8_t status,uint8_t mode)171 void btm_process_cancel_complete(uint8_t status, uint8_t mode) {
172 mock_function_count_map[__func__]++;
173 }
btm_process_inq_complete(uint8_t status,uint8_t mode)174 void btm_process_inq_complete(uint8_t status, uint8_t mode) {
175 mock_function_count_map[__func__]++;
176 }
btm_process_inq_results(uint8_t * p,uint8_t hci_evt_len,uint8_t inq_res_mode)177 void btm_process_inq_results(uint8_t* p, uint8_t hci_evt_len,
178 uint8_t inq_res_mode) {
179 mock_function_count_map[__func__]++;
180 }
btm_process_remote_name(const RawAddress * bda,BD_NAME bdn,uint16_t evt_len,uint8_t hci_status)181 void btm_process_remote_name(const RawAddress* bda, BD_NAME bdn,
182 uint16_t evt_len, uint8_t hci_status) {
183 mock_function_count_map[__func__]++;
184 }
btm_set_eir_uuid(uint8_t * p_eir,tBTM_INQ_RESULTS * p_results)185 void btm_set_eir_uuid(uint8_t* p_eir, tBTM_INQ_RESULTS* p_results) {
186 mock_function_count_map[__func__]++;
187 }
btm_sort_inq_result(void)188 void btm_sort_inq_result(void) { mock_function_count_map[__func__]++; }
189