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:125
20 *
21 * mockcify.pl ver 0.2.1
22 */
23 // Mock include file to share data between tests and mock
24 #include "test/mock/mock_stack_acl.h"
25
26 #include <cstdint>
27 #include <string>
28
29 #include "hci/class_of_device.h"
30 #include "stack/include/acl_client_callbacks.h"
31 #include "stack/include/bt_hdr.h"
32 #include "test/common/mock_functions.h"
33 #include "types/raw_address.h"
34
35 // Mocked compile conditionals, if any
36 // Mocked internal structures, if any
37
38 namespace test {
39 namespace mock {
40 namespace stack_acl {
41
42 // Function state capture and return values, if needed
43 struct BTM_BLE_IS_RESOLVE_BDA BTM_BLE_IS_RESOLVE_BDA;
44 struct BTM_IsAclConnectionUp BTM_IsAclConnectionUp;
45 struct BTM_IsAclConnectionUpAndHandleValid BTM_IsAclConnectionUpAndHandleValid;
46 struct BTM_IsBleConnection BTM_IsBleConnection;
47 struct BTM_IsPhy2mSupported BTM_IsPhy2mSupported;
48 struct BTM_ReadRemoteConnectionAddr BTM_ReadRemoteConnectionAddr;
49 struct BTM_IsRemoteVersionReceived BTM_IsRemoteVersionReceived;
50 struct BTM_ReadRemoteVersion BTM_ReadRemoteVersion;
51 struct BTM_is_sniff_allowed_for BTM_is_sniff_allowed_for;
52 struct acl_create_le_connection acl_create_le_connection;
53 struct acl_create_le_connection_with_id acl_create_le_connection_with_id;
54 struct acl_is_role_switch_allowed acl_is_role_switch_allowed;
55 struct acl_is_switch_role_idle acl_is_switch_role_idle;
56 struct acl_peer_supports_ble_2m_phy acl_peer_supports_ble_2m_phy;
57 struct acl_peer_supports_ble_coded_phy acl_peer_supports_ble_coded_phy;
58 struct acl_send_data_packet_br_edr acl_send_data_packet_br_edr;
59 struct acl_peer_supports_ble_connection_parameters_request
60 acl_peer_supports_ble_connection_parameters_request;
61 struct acl_ble_connection_parameters_request
62 acl_ble_connection_parameters_request;
63 struct acl_peer_supports_ble_packet_extension
64 acl_peer_supports_ble_packet_extension;
65 struct acl_peer_supports_sniff_subrating acl_peer_supports_sniff_subrating;
66 struct acl_peer_supports_ble_connection_subrating
67 acl_peer_supports_ble_connection_subrating;
68 struct acl_peer_supports_ble_connection_subrating_host
69 acl_peer_supports_ble_connection_subrating_host;
70 struct acl_refresh_remote_address acl_refresh_remote_address;
71 struct acl_set_peer_le_features_from_handle
72 acl_set_peer_le_features_from_handle;
73 struct acl_get_connection_from_address acl_get_connection_from_address;
74 struct btm_acl_for_bda btm_acl_for_bda;
75 struct acl_get_connection_from_handle acl_get_connection_from_handle;
76 struct BTM_GetLinkSuperTout BTM_GetLinkSuperTout;
77 struct BTM_GetRole BTM_GetRole;
78 struct BTM_ReadFailedContactCounter BTM_ReadFailedContactCounter;
79 struct BTM_ReadRSSI BTM_ReadRSSI;
80 struct BTM_ReadTxPower BTM_ReadTxPower;
81 struct BTM_SetLinkSuperTout BTM_SetLinkSuperTout;
82 struct BTM_SwitchRoleToCentral BTM_SwitchRoleToCentral;
83 struct btm_remove_acl btm_remove_acl;
84 struct btm_get_acl_disc_reason_code btm_get_acl_disc_reason_code;
85 struct btm_is_acl_locally_initiated btm_is_acl_locally_initiated;
86 struct BTM_GetHCIConnHandle BTM_GetHCIConnHandle;
87 struct BTM_GetMaxPacketSize BTM_GetMaxPacketSize;
88 struct BTM_GetNumAclLinks BTM_GetNumAclLinks;
89 struct acl_get_supported_packet_types acl_get_supported_packet_types;
90 struct BTM_GetPeerSCA BTM_GetPeerSCA;
91 struct acl_link_role_from_handle acl_link_role_from_handle;
92 struct btm_handle_to_acl_index btm_handle_to_acl_index;
93 struct BTM_ReadRemoteFeatures BTM_ReadRemoteFeatures;
94 struct ACL_RegisterClient ACL_RegisterClient;
95 struct ACL_UnregisterClient ACL_UnregisterClient;
96 struct BTM_ReadConnectionAddr BTM_ReadConnectionAddr;
97 struct BTM_RequestPeerSCA BTM_RequestPeerSCA;
98 struct BTM_acl_after_controller_started BTM_acl_after_controller_started;
99 struct BTM_block_role_switch_for BTM_block_role_switch_for;
100 struct BTM_block_sniff_mode_for BTM_block_sniff_mode_for;
101 struct btm_connection_request btm_connection_request;
102 struct BTM_default_unblock_role_switch BTM_default_unblock_role_switch;
103 struct BTM_unblock_role_switch_for BTM_unblock_role_switch_for;
104 struct BTM_unblock_sniff_mode_for BTM_unblock_sniff_mode_for;
105 struct acl_disconnect_after_role_switch acl_disconnect_after_role_switch;
106 struct acl_disconnect_from_handle acl_disconnect_from_handle;
107 struct acl_packets_completed acl_packets_completed;
108 struct acl_process_extended_features acl_process_extended_features;
109 struct acl_process_supported_features acl_process_supported_features;
110 struct acl_rcv_acl_data acl_rcv_acl_data;
111 struct acl_send_data_packet_ble acl_send_data_packet_ble;
112 struct acl_set_disconnect_reason acl_set_disconnect_reason;
113 struct acl_write_automatic_flush_timeout acl_write_automatic_flush_timeout;
114 struct btm_acl_connected btm_acl_connected;
115 struct btm_acl_created btm_acl_created;
116 struct btm_acl_device_down btm_acl_device_down;
117 struct btm_acl_disconnected btm_acl_disconnected;
118 struct btm_acl_flush btm_acl_flush;
119 struct btm_acl_encrypt_change btm_acl_encrypt_change;
120 struct btm_acl_notif_conn_collision btm_acl_notif_conn_collision;
121 struct btm_acl_process_sca_cmpl_pkt btm_acl_process_sca_cmpl_pkt;
122 struct btm_acl_removed btm_acl_removed;
123 struct btm_acl_role_changed btm_acl_role_changed;
124 struct btm_acl_update_conn_addr btm_acl_update_conn_addr;
125 struct btm_ble_refresh_local_resolvable_private_addr
126 btm_ble_refresh_local_resolvable_private_addr;
127 struct btm_cont_rswitch_from_handle btm_cont_rswitch_from_handle;
128 struct btm_establish_continue_from_address btm_establish_continue_from_address;
129 struct btm_process_remote_ext_features btm_process_remote_ext_features;
130 struct btm_process_remote_version_complete btm_process_remote_version_complete;
131 struct btm_read_automatic_flush_timeout_complete
132 btm_read_automatic_flush_timeout_complete;
133 struct btm_read_failed_contact_counter_complete
134 btm_read_failed_contact_counter_complete;
135 struct btm_read_failed_contact_counter_timeout
136 btm_read_failed_contact_counter_timeout;
137 struct btm_read_remote_ext_features btm_read_remote_ext_features;
138 struct btm_read_remote_ext_features_complete
139 btm_read_remote_ext_features_complete;
140 struct btm_read_remote_ext_features_complete_raw
141 btm_read_remote_ext_features_complete_raw;
142 struct btm_read_remote_ext_features_failed btm_read_remote_ext_features_failed;
143 struct btm_read_remote_version_complete btm_read_remote_version_complete;
144 struct btm_read_rssi_complete btm_read_rssi_complete;
145 struct btm_read_rssi_timeout btm_read_rssi_timeout;
146 struct btm_read_tx_power_complete btm_read_tx_power_complete;
147 struct btm_read_tx_power_timeout btm_read_tx_power_timeout;
148 struct btm_rejectlist_role_change_device btm_rejectlist_role_change_device;
149 struct btm_set_link_policy btm_set_link_policy;
150 struct btm_set_packet_types_from_address btm_set_packet_types_from_address;
151 struct hci_btm_set_link_supervision_timeout
152 hci_btm_set_link_supervision_timeout;
153 struct on_acl_br_edr_connected on_acl_br_edr_connected;
154 struct on_acl_br_edr_failed on_acl_br_edr_failed;
155 struct BTM_unblock_role_switch_and_sniff_mode_for
156 BTM_unblock_role_switch_and_sniff_mode_for;
157
158 } // namespace stack_acl
159 } // namespace mock
160 } // namespace test
161
162 // Mocked functions, if any
BTM_BLE_IS_RESOLVE_BDA(const RawAddress & x)163 bool BTM_BLE_IS_RESOLVE_BDA(const RawAddress& x) {
164 inc_func_call_count(__func__);
165 return test::mock::stack_acl::BTM_BLE_IS_RESOLVE_BDA(x);
166 }
BTM_IsAclConnectionUp(const RawAddress & remote_bda,tBT_TRANSPORT transport)167 bool BTM_IsAclConnectionUp(const RawAddress& remote_bda,
168 tBT_TRANSPORT transport) {
169 inc_func_call_count(__func__);
170 return test::mock::stack_acl::BTM_IsAclConnectionUp(remote_bda, transport);
171 }
BTM_IsAclConnectionUpAndHandleValid(const RawAddress & remote_bda,tBT_TRANSPORT transport)172 bool BTM_IsAclConnectionUpAndHandleValid(const RawAddress& remote_bda,
173 tBT_TRANSPORT transport) {
174 inc_func_call_count(__func__);
175 return test::mock::stack_acl::BTM_IsAclConnectionUpAndHandleValid(remote_bda,
176 transport);
177 }
BTM_IsBleConnection(uint16_t hci_handle)178 bool BTM_IsBleConnection(uint16_t hci_handle) {
179 inc_func_call_count(__func__);
180 return test::mock::stack_acl::BTM_IsBleConnection(hci_handle);
181 }
BTM_IsPhy2mSupported(const RawAddress & remote_bda,tBT_TRANSPORT transport)182 bool BTM_IsPhy2mSupported(const RawAddress& remote_bda,
183 tBT_TRANSPORT transport) {
184 inc_func_call_count(__func__);
185 return test::mock::stack_acl::BTM_IsPhy2mSupported(remote_bda, transport);
186 }
BTM_ReadRemoteConnectionAddr(const RawAddress & pseudo_addr,RawAddress & conn_addr,tBLE_ADDR_TYPE * p_addr_type,bool ota_address)187 bool BTM_ReadRemoteConnectionAddr(const RawAddress& pseudo_addr,
188 RawAddress& conn_addr,
189 tBLE_ADDR_TYPE* p_addr_type,
190 bool ota_address) {
191 inc_func_call_count(__func__);
192 return test::mock::stack_acl::BTM_ReadRemoteConnectionAddr(
193 pseudo_addr, conn_addr, p_addr_type, ota_address);
194 }
BTM_IsRemoteVersionReceived(const RawAddress & addr)195 bool BTM_IsRemoteVersionReceived(const RawAddress& addr) {
196 inc_func_call_count(__func__);
197 return test::mock::stack_acl::BTM_IsRemoteVersionReceived(addr);
198 }
BTM_ReadRemoteVersion(const RawAddress & addr,uint8_t * lmp_version,uint16_t * manufacturer,uint16_t * lmp_sub_version)199 bool BTM_ReadRemoteVersion(const RawAddress& addr, uint8_t* lmp_version,
200 uint16_t* manufacturer, uint16_t* lmp_sub_version) {
201 inc_func_call_count(__func__);
202 return test::mock::stack_acl::BTM_ReadRemoteVersion(
203 addr, lmp_version, manufacturer, lmp_sub_version);
204 }
BTM_is_sniff_allowed_for(const RawAddress & peer_addr)205 bool BTM_is_sniff_allowed_for(const RawAddress& peer_addr) {
206 inc_func_call_count(__func__);
207 return test::mock::stack_acl::BTM_is_sniff_allowed_for(peer_addr);
208 }
acl_create_le_connection(const RawAddress & bd_addr)209 bool acl_create_le_connection(const RawAddress& bd_addr) {
210 inc_func_call_count(__func__);
211 return test::mock::stack_acl::acl_create_le_connection(bd_addr);
212 }
acl_create_le_connection_with_id(uint8_t id,const RawAddress & bd_addr,tBLE_ADDR_TYPE addr_type)213 bool acl_create_le_connection_with_id(uint8_t id, const RawAddress& bd_addr,
214 tBLE_ADDR_TYPE addr_type) {
215 inc_func_call_count(__func__);
216 return test::mock::stack_acl::acl_create_le_connection_with_id(id, bd_addr,
217 addr_type);
218 }
acl_is_role_switch_allowed()219 bool acl_is_role_switch_allowed() {
220 inc_func_call_count(__func__);
221 return test::mock::stack_acl::acl_is_role_switch_allowed();
222 }
acl_is_switch_role_idle(const RawAddress & bd_addr,tBT_TRANSPORT transport)223 bool acl_is_switch_role_idle(const RawAddress& bd_addr,
224 tBT_TRANSPORT transport) {
225 inc_func_call_count(__func__);
226 return test::mock::stack_acl::acl_is_switch_role_idle(bd_addr, transport);
227 }
acl_peer_supports_ble_2m_phy(uint16_t hci_handle)228 bool acl_peer_supports_ble_2m_phy(uint16_t hci_handle) {
229 inc_func_call_count(__func__);
230 return test::mock::stack_acl::acl_peer_supports_ble_2m_phy(hci_handle);
231 }
acl_peer_supports_ble_coded_phy(uint16_t hci_handle)232 bool acl_peer_supports_ble_coded_phy(uint16_t hci_handle) {
233 inc_func_call_count(__func__);
234 return test::mock::stack_acl::acl_peer_supports_ble_coded_phy(hci_handle);
235 }
acl_peer_supports_ble_connection_parameters_request(const RawAddress & remote_bda)236 bool acl_peer_supports_ble_connection_parameters_request(
237 const RawAddress& remote_bda) {
238 inc_func_call_count(__func__);
239 return test::mock::stack_acl::
240 acl_peer_supports_ble_connection_parameters_request(remote_bda);
241 }
acl_ble_connection_parameters_request(uint16_t handle,uint16_t conn_int_min,uint16_t conn_int_max,uint16_t conn_latency,uint16_t conn_timeout,uint16_t min_ce_len,uint16_t max_ce_len)242 void acl_ble_connection_parameters_request(
243 uint16_t handle, uint16_t conn_int_min, uint16_t conn_int_max,
244 uint16_t conn_latency, uint16_t conn_timeout, uint16_t min_ce_len,
245 uint16_t max_ce_len) {
246 inc_func_call_count(__func__);
247 test::mock::stack_acl::acl_ble_connection_parameters_request(
248 handle, conn_int_min, conn_int_max, conn_latency, conn_timeout,
249 min_ce_len, max_ce_len);
250 }
acl_peer_supports_ble_packet_extension(uint16_t hci_handle)251 bool acl_peer_supports_ble_packet_extension(uint16_t hci_handle) {
252 inc_func_call_count(__func__);
253 return test::mock::stack_acl::acl_peer_supports_ble_packet_extension(
254 hci_handle);
255 }
acl_peer_supports_sniff_subrating(const RawAddress & remote_bda)256 bool acl_peer_supports_sniff_subrating(const RawAddress& remote_bda) {
257 inc_func_call_count(__func__);
258 return test::mock::stack_acl::acl_peer_supports_sniff_subrating(remote_bda);
259 }
acl_peer_supports_ble_connection_subrating(const RawAddress & remote_bda)260 bool acl_peer_supports_ble_connection_subrating(const RawAddress& remote_bda) {
261 inc_func_call_count(__func__);
262 return test::mock::stack_acl::acl_peer_supports_ble_connection_subrating(
263 remote_bda);
264 }
acl_peer_supports_ble_connection_subrating_host(const RawAddress & remote_bda)265 bool acl_peer_supports_ble_connection_subrating_host(
266 const RawAddress& remote_bda) {
267 inc_func_call_count(__func__);
268 return test::mock::stack_acl::acl_peer_supports_ble_connection_subrating_host(
269 remote_bda);
270 }
acl_refresh_remote_address(const RawAddress & identity_address,tBLE_ADDR_TYPE identity_address_type,const RawAddress & bda,tBLE_RAND_ADDR_TYPE rra_type,const RawAddress & rpa)271 bool acl_refresh_remote_address(const RawAddress& identity_address,
272 tBLE_ADDR_TYPE identity_address_type,
273 const RawAddress& bda,
274 tBLE_RAND_ADDR_TYPE rra_type,
275 const RawAddress& rpa) {
276 inc_func_call_count(__func__);
277 return test::mock::stack_acl::acl_refresh_remote_address(
278 identity_address, identity_address_type, bda, rra_type, rpa);
279 }
acl_set_peer_le_features_from_handle(uint16_t hci_handle,const uint8_t * p)280 bool acl_set_peer_le_features_from_handle(uint16_t hci_handle,
281 const uint8_t* p) {
282 inc_func_call_count(__func__);
283 return test::mock::stack_acl::acl_set_peer_le_features_from_handle(hci_handle,
284 p);
285 }
acl_send_data_packet_br_edr(const RawAddress & bd_addr,BT_HDR * p_buf)286 void acl_send_data_packet_br_edr(const RawAddress& bd_addr, BT_HDR* p_buf) {
287 inc_func_call_count(__func__);
288 test::mock::stack_acl::acl_send_data_packet_br_edr(bd_addr, p_buf);
289 }
acl_get_connection_from_address(const RawAddress & bd_addr,tBT_TRANSPORT transport)290 tACL_CONN* acl_get_connection_from_address(const RawAddress& bd_addr,
291 tBT_TRANSPORT transport) {
292 inc_func_call_count(__func__);
293 return test::mock::stack_acl::acl_get_connection_from_address(bd_addr,
294 transport);
295 }
btm_acl_for_bda(const RawAddress & bd_addr,tBT_TRANSPORT transport)296 tACL_CONN* btm_acl_for_bda(const RawAddress& bd_addr, tBT_TRANSPORT transport) {
297 inc_func_call_count(__func__);
298 return test::mock::stack_acl::btm_acl_for_bda(bd_addr, transport);
299 }
acl_get_connection_from_handle(uint16_t handle)300 tACL_CONN* acl_get_connection_from_handle(uint16_t handle) {
301 inc_func_call_count(__func__);
302 return test::mock::stack_acl::acl_get_connection_from_handle(handle);
303 }
BTM_GetLinkSuperTout(const RawAddress & remote_bda,uint16_t * p_timeout)304 tBTM_STATUS BTM_GetLinkSuperTout(const RawAddress& remote_bda,
305 uint16_t* p_timeout) {
306 inc_func_call_count(__func__);
307 return test::mock::stack_acl::BTM_GetLinkSuperTout(remote_bda, p_timeout);
308 }
BTM_GetRole(const RawAddress & remote_bd_addr,tHCI_ROLE * p_role)309 tBTM_STATUS BTM_GetRole(const RawAddress& remote_bd_addr, tHCI_ROLE* p_role) {
310 inc_func_call_count(__func__);
311 return test::mock::stack_acl::BTM_GetRole(remote_bd_addr, p_role);
312 }
BTM_ReadFailedContactCounter(const RawAddress & remote_bda,tBTM_CMPL_CB * p_cb)313 tBTM_STATUS BTM_ReadFailedContactCounter(const RawAddress& remote_bda,
314 tBTM_CMPL_CB* p_cb) {
315 inc_func_call_count(__func__);
316 return test::mock::stack_acl::BTM_ReadFailedContactCounter(remote_bda, p_cb);
317 }
BTM_ReadRSSI(const RawAddress & remote_bda,tBTM_CMPL_CB * p_cb)318 tBTM_STATUS BTM_ReadRSSI(const RawAddress& remote_bda, tBTM_CMPL_CB* p_cb) {
319 inc_func_call_count(__func__);
320 return test::mock::stack_acl::BTM_ReadRSSI(remote_bda, p_cb);
321 }
BTM_ReadTxPower(const RawAddress & remote_bda,tBT_TRANSPORT transport,tBTM_CMPL_CB * p_cb)322 tBTM_STATUS BTM_ReadTxPower(const RawAddress& remote_bda,
323 tBT_TRANSPORT transport, tBTM_CMPL_CB* p_cb) {
324 inc_func_call_count(__func__);
325 return test::mock::stack_acl::BTM_ReadTxPower(remote_bda, transport, p_cb);
326 }
BTM_SetLinkSuperTout(const RawAddress & remote_bda,uint16_t timeout)327 tBTM_STATUS BTM_SetLinkSuperTout(const RawAddress& remote_bda,
328 uint16_t timeout) {
329 inc_func_call_count(__func__);
330 return test::mock::stack_acl::BTM_SetLinkSuperTout(remote_bda, timeout);
331 }
BTM_SwitchRoleToCentral(const RawAddress & remote_bd_addr)332 tBTM_STATUS BTM_SwitchRoleToCentral(const RawAddress& remote_bd_addr) {
333 inc_func_call_count(__func__);
334 return test::mock::stack_acl::BTM_SwitchRoleToCentral(remote_bd_addr);
335 }
btm_remove_acl(const RawAddress & bd_addr,tBT_TRANSPORT transport)336 tBTM_STATUS btm_remove_acl(const RawAddress& bd_addr, tBT_TRANSPORT transport) {
337 inc_func_call_count(__func__);
338 return test::mock::stack_acl::btm_remove_acl(bd_addr, transport);
339 }
btm_get_acl_disc_reason_code(void)340 tHCI_REASON btm_get_acl_disc_reason_code(void) {
341 inc_func_call_count(__func__);
342 return test::mock::stack_acl::btm_get_acl_disc_reason_code();
343 }
btm_is_acl_locally_initiated(void)344 bool btm_is_acl_locally_initiated(void) {
345 inc_func_call_count(__func__);
346 return test::mock::stack_acl::btm_is_acl_locally_initiated();
347 }
BTM_GetHCIConnHandle(const RawAddress & remote_bda,tBT_TRANSPORT transport)348 uint16_t BTM_GetHCIConnHandle(const RawAddress& remote_bda,
349 tBT_TRANSPORT transport) {
350 inc_func_call_count(__func__);
351 return test::mock::stack_acl::BTM_GetHCIConnHandle(remote_bda, transport);
352 }
BTM_GetMaxPacketSize(const RawAddress & addr)353 uint16_t BTM_GetMaxPacketSize(const RawAddress& addr) {
354 inc_func_call_count(__func__);
355 return test::mock::stack_acl::BTM_GetMaxPacketSize(addr);
356 }
BTM_GetNumAclLinks(void)357 uint16_t BTM_GetNumAclLinks(void) {
358 inc_func_call_count(__func__);
359 return test::mock::stack_acl::BTM_GetNumAclLinks();
360 }
acl_get_supported_packet_types()361 uint16_t acl_get_supported_packet_types() {
362 inc_func_call_count(__func__);
363 return test::mock::stack_acl::acl_get_supported_packet_types();
364 }
BTM_GetPeerSCA(const RawAddress & remote_bda,tBT_TRANSPORT transport)365 uint8_t BTM_GetPeerSCA(const RawAddress& remote_bda, tBT_TRANSPORT transport) {
366 inc_func_call_count(__func__);
367 return test::mock::stack_acl::BTM_GetPeerSCA(remote_bda, transport);
368 }
acl_link_role_from_handle(uint16_t handle)369 uint8_t acl_link_role_from_handle(uint16_t handle) {
370 inc_func_call_count(__func__);
371 return test::mock::stack_acl::acl_link_role_from_handle(handle);
372 }
btm_handle_to_acl_index(uint16_t hci_handle)373 uint8_t btm_handle_to_acl_index(uint16_t hci_handle) {
374 inc_func_call_count(__func__);
375 return test::mock::stack_acl::btm_handle_to_acl_index(hci_handle);
376 }
BTM_ReadRemoteFeatures(const RawAddress & addr)377 uint8_t* BTM_ReadRemoteFeatures(const RawAddress& addr) {
378 inc_func_call_count(__func__);
379 return test::mock::stack_acl::BTM_ReadRemoteFeatures(addr);
380 }
ACL_RegisterClient(struct acl_client_callback_s * callbacks)381 void ACL_RegisterClient(struct acl_client_callback_s* callbacks) {
382 inc_func_call_count(__func__);
383 test::mock::stack_acl::ACL_RegisterClient(callbacks);
384 }
ACL_UnregisterClient(struct acl_client_callback_s * callbacks)385 void ACL_UnregisterClient(struct acl_client_callback_s* callbacks) {
386 inc_func_call_count(__func__);
387 test::mock::stack_acl::ACL_UnregisterClient(callbacks);
388 }
BTM_ReadConnectionAddr(const RawAddress & remote_bda,RawAddress & local_conn_addr,tBLE_ADDR_TYPE * p_addr_type,bool ota_address)389 void BTM_ReadConnectionAddr(const RawAddress& remote_bda,
390 RawAddress& local_conn_addr,
391 tBLE_ADDR_TYPE* p_addr_type, bool ota_address) {
392 inc_func_call_count(__func__);
393 test::mock::stack_acl::BTM_ReadConnectionAddr(remote_bda, local_conn_addr,
394 p_addr_type, ota_address);
395 }
BTM_RequestPeerSCA(const RawAddress & remote_bda,tBT_TRANSPORT transport)396 void BTM_RequestPeerSCA(const RawAddress& remote_bda, tBT_TRANSPORT transport) {
397 inc_func_call_count(__func__);
398 test::mock::stack_acl::BTM_RequestPeerSCA(remote_bda, transport);
399 }
BTM_acl_after_controller_started()400 void BTM_acl_after_controller_started() {
401 inc_func_call_count(__func__);
402 test::mock::stack_acl::BTM_acl_after_controller_started();
403 }
BTM_block_role_switch_for(const RawAddress & peer_addr)404 void BTM_block_role_switch_for(const RawAddress& peer_addr) {
405 inc_func_call_count(__func__);
406 test::mock::stack_acl::BTM_block_role_switch_for(peer_addr);
407 }
BTM_block_sniff_mode_for(const RawAddress & peer_addr)408 void BTM_block_sniff_mode_for(const RawAddress& peer_addr) {
409 inc_func_call_count(__func__);
410 test::mock::stack_acl::BTM_block_sniff_mode_for(peer_addr);
411 }
BTM_default_unblock_role_switch()412 void BTM_default_unblock_role_switch() {
413 inc_func_call_count(__func__);
414 test::mock::stack_acl::BTM_default_unblock_role_switch();
415 }
BTM_unblock_role_switch_for(const RawAddress & peer_addr)416 void BTM_unblock_role_switch_for(const RawAddress& peer_addr) {
417 inc_func_call_count(__func__);
418 test::mock::stack_acl::BTM_unblock_role_switch_for(peer_addr);
419 }
BTM_unblock_sniff_mode_for(const RawAddress & peer_addr)420 void BTM_unblock_sniff_mode_for(const RawAddress& peer_addr) {
421 inc_func_call_count(__func__);
422 test::mock::stack_acl::BTM_unblock_sniff_mode_for(peer_addr);
423 }
acl_disconnect_after_role_switch(uint16_t conn_handle,tHCI_STATUS reason,std::string comment)424 void acl_disconnect_after_role_switch(uint16_t conn_handle, tHCI_STATUS reason,
425 std::string comment) {
426 inc_func_call_count(__func__);
427 test::mock::stack_acl::acl_disconnect_after_role_switch(conn_handle, reason,
428 comment);
429 }
acl_disconnect_from_handle(uint16_t handle,tHCI_STATUS reason,std::string comment)430 void acl_disconnect_from_handle(uint16_t handle, tHCI_STATUS reason,
431 std::string comment) {
432 inc_func_call_count(__func__);
433 test::mock::stack_acl::acl_disconnect_from_handle(handle, reason, comment);
434 }
acl_packets_completed(uint16_t handle,uint16_t credits)435 void acl_packets_completed(uint16_t handle, uint16_t credits) {
436 inc_func_call_count(__func__);
437 test::mock::stack_acl::acl_packets_completed(handle, credits);
438 }
acl_process_extended_features(uint16_t handle,uint8_t current_page_number,uint8_t max_page_number,uint64_t features)439 void acl_process_extended_features(uint16_t handle, uint8_t current_page_number,
440 uint8_t max_page_number, uint64_t features) {
441 inc_func_call_count(__func__);
442 test::mock::stack_acl::acl_process_extended_features(
443 handle, current_page_number, max_page_number, features);
444 }
acl_process_supported_features(uint16_t handle,uint64_t features)445 void acl_process_supported_features(uint16_t handle, uint64_t features) {
446 inc_func_call_count(__func__);
447 test::mock::stack_acl::acl_process_supported_features(handle, features);
448 }
acl_rcv_acl_data(BT_HDR * p_msg)449 void acl_rcv_acl_data(BT_HDR* p_msg) {
450 inc_func_call_count(__func__);
451 test::mock::stack_acl::acl_rcv_acl_data(p_msg);
452 }
acl_send_data_packet_ble(const RawAddress & bd_addr,BT_HDR * p_buf)453 void acl_send_data_packet_ble(const RawAddress& bd_addr, BT_HDR* p_buf) {
454 inc_func_call_count(__func__);
455 test::mock::stack_acl::acl_send_data_packet_ble(bd_addr, p_buf);
456 }
acl_set_disconnect_reason(tHCI_STATUS acl_disc_reason)457 void acl_set_disconnect_reason(tHCI_STATUS acl_disc_reason) {
458 inc_func_call_count(__func__);
459 test::mock::stack_acl::acl_set_disconnect_reason(acl_disc_reason);
460 }
acl_write_automatic_flush_timeout(const RawAddress & bd_addr,uint16_t flush_timeout_in_ticks)461 void acl_write_automatic_flush_timeout(const RawAddress& bd_addr,
462 uint16_t flush_timeout_in_ticks) {
463 inc_func_call_count(__func__);
464 test::mock::stack_acl::acl_write_automatic_flush_timeout(
465 bd_addr, flush_timeout_in_ticks);
466 }
btm_acl_connected(const RawAddress & bda,uint16_t handle,tHCI_STATUS status,uint8_t enc_mode)467 void btm_acl_connected(const RawAddress& bda, uint16_t handle,
468 tHCI_STATUS status, uint8_t enc_mode) {
469 inc_func_call_count(__func__);
470 test::mock::stack_acl::btm_acl_connected(bda, handle, status, enc_mode);
471 }
btm_acl_created(const RawAddress & bda,uint16_t hci_handle,tHCI_ROLE link_role,tBT_TRANSPORT transport)472 void btm_acl_created(const RawAddress& bda, uint16_t hci_handle,
473 tHCI_ROLE link_role, tBT_TRANSPORT transport) {
474 inc_func_call_count(__func__);
475 test::mock::stack_acl::btm_acl_created(bda, hci_handle, link_role, transport);
476 }
btm_acl_device_down(void)477 void btm_acl_device_down(void) {
478 inc_func_call_count(__func__);
479 test::mock::stack_acl::btm_acl_device_down();
480 }
btm_acl_disconnected(tHCI_STATUS status,uint16_t handle,tHCI_REASON reason)481 void btm_acl_disconnected(tHCI_STATUS status, uint16_t handle,
482 tHCI_REASON reason) {
483 inc_func_call_count(__func__);
484 test::mock::stack_acl::btm_acl_disconnected(status, handle, reason);
485 }
btm_acl_encrypt_change(uint16_t handle,uint8_t status,uint8_t encr_enable)486 void btm_acl_encrypt_change(uint16_t handle, uint8_t status,
487 uint8_t encr_enable) {
488 inc_func_call_count(__func__);
489 test::mock::stack_acl::btm_acl_encrypt_change(handle, status, encr_enable);
490 }
btm_acl_notif_conn_collision(const RawAddress & bda)491 void btm_acl_notif_conn_collision(const RawAddress& bda) {
492 inc_func_call_count(__func__);
493 test::mock::stack_acl::btm_acl_notif_conn_collision(bda);
494 }
btm_acl_process_sca_cmpl_pkt(uint8_t len,uint8_t * data)495 void btm_acl_process_sca_cmpl_pkt(uint8_t len, uint8_t* data) {
496 inc_func_call_count(__func__);
497 test::mock::stack_acl::btm_acl_process_sca_cmpl_pkt(len, data);
498 }
btm_acl_removed(uint16_t handle)499 void btm_acl_removed(uint16_t handle) {
500 inc_func_call_count(__func__);
501 test::mock::stack_acl::btm_acl_removed(handle);
502 }
btm_acl_flush(uint16_t handle)503 void btm_acl_flush(uint16_t handle) {
504 inc_func_call_count(__func__);
505 test::mock::stack_acl::btm_acl_flush(handle);
506 }
btm_acl_role_changed(tHCI_STATUS hci_status,const RawAddress & bd_addr,tHCI_ROLE new_role)507 void btm_acl_role_changed(tHCI_STATUS hci_status, const RawAddress& bd_addr,
508 tHCI_ROLE new_role) {
509 inc_func_call_count(__func__);
510 test::mock::stack_acl::btm_acl_role_changed(hci_status, bd_addr, new_role);
511 }
btm_acl_update_conn_addr(uint16_t handle,const RawAddress & address)512 void btm_acl_update_conn_addr(uint16_t handle, const RawAddress& address) {
513 inc_func_call_count(__func__);
514 test::mock::stack_acl::btm_acl_update_conn_addr(handle, address);
515 }
btm_ble_refresh_local_resolvable_private_addr(const RawAddress & pseudo_addr,const RawAddress & local_rpa)516 void btm_ble_refresh_local_resolvable_private_addr(
517 const RawAddress& pseudo_addr, const RawAddress& local_rpa) {
518 inc_func_call_count(__func__);
519 test::mock::stack_acl::btm_ble_refresh_local_resolvable_private_addr(
520 pseudo_addr, local_rpa);
521 }
btm_cont_rswitch_from_handle(uint16_t hci_handle)522 void btm_cont_rswitch_from_handle(uint16_t hci_handle) {
523 inc_func_call_count(__func__);
524 test::mock::stack_acl::btm_cont_rswitch_from_handle(hci_handle);
525 }
btm_establish_continue_from_address(const RawAddress & bda,tBT_TRANSPORT transport)526 void btm_establish_continue_from_address(const RawAddress& bda,
527 tBT_TRANSPORT transport) {
528 inc_func_call_count(__func__);
529 test::mock::stack_acl::btm_establish_continue_from_address(bda, transport);
530 }
btm_process_remote_ext_features(tACL_CONN * p_acl_cb,uint8_t max_page_number)531 void btm_process_remote_ext_features(tACL_CONN* p_acl_cb,
532 uint8_t max_page_number) {
533 inc_func_call_count(__func__);
534 test::mock::stack_acl::btm_process_remote_ext_features(p_acl_cb,
535 max_page_number);
536 }
btm_process_remote_version_complete(uint8_t status,uint16_t handle,uint8_t lmp_version,uint16_t manufacturer,uint16_t lmp_subversion)537 void btm_process_remote_version_complete(uint8_t status, uint16_t handle,
538 uint8_t lmp_version,
539 uint16_t manufacturer,
540 uint16_t lmp_subversion) {
541 inc_func_call_count(__func__);
542 test::mock::stack_acl::btm_process_remote_version_complete(
543 status, handle, lmp_version, manufacturer, lmp_subversion);
544 }
btm_read_automatic_flush_timeout_complete(uint8_t * p)545 void btm_read_automatic_flush_timeout_complete(uint8_t* p) {
546 inc_func_call_count(__func__);
547 test::mock::stack_acl::btm_read_automatic_flush_timeout_complete(p);
548 }
btm_read_failed_contact_counter_complete(uint8_t * p)549 void btm_read_failed_contact_counter_complete(uint8_t* p) {
550 inc_func_call_count(__func__);
551 test::mock::stack_acl::btm_read_failed_contact_counter_complete(p);
552 }
btm_read_failed_contact_counter_timeout(void * data)553 void btm_read_failed_contact_counter_timeout(void* data) {
554 inc_func_call_count(__func__);
555 test::mock::stack_acl::btm_read_failed_contact_counter_timeout(data);
556 }
btm_read_remote_ext_features(uint16_t handle,uint8_t page_number)557 void btm_read_remote_ext_features(uint16_t handle, uint8_t page_number) {
558 inc_func_call_count(__func__);
559 test::mock::stack_acl::btm_read_remote_ext_features(handle, page_number);
560 }
btm_read_remote_ext_features_complete(uint16_t handle,uint8_t page_num,uint8_t max_page,uint8_t * features)561 void btm_read_remote_ext_features_complete(uint16_t handle, uint8_t page_num,
562 uint8_t max_page,
563 uint8_t* features) {
564 inc_func_call_count(__func__);
565 test::mock::stack_acl::btm_read_remote_ext_features_complete(
566 handle, page_num, max_page, features);
567 }
btm_read_remote_ext_features_complete_raw(uint8_t * p,uint8_t evt_len)568 void btm_read_remote_ext_features_complete_raw(uint8_t* p, uint8_t evt_len) {
569 inc_func_call_count(__func__);
570 test::mock::stack_acl::btm_read_remote_ext_features_complete_raw(p, evt_len);
571 }
btm_read_remote_ext_features_failed(uint8_t status,uint16_t handle)572 void btm_read_remote_ext_features_failed(uint8_t status, uint16_t handle) {
573 inc_func_call_count(__func__);
574 test::mock::stack_acl::btm_read_remote_ext_features_failed(status, handle);
575 }
btm_read_remote_version_complete(tHCI_STATUS status,uint16_t handle,uint8_t lmp_version,uint16_t manufacturer,uint16_t lmp_subversion)576 void btm_read_remote_version_complete(tHCI_STATUS status, uint16_t handle,
577 uint8_t lmp_version,
578 uint16_t manufacturer,
579 uint16_t lmp_subversion) {
580 inc_func_call_count(__func__);
581 test::mock::stack_acl::btm_read_remote_version_complete(
582 status, handle, lmp_version, manufacturer, lmp_subversion);
583 }
btm_read_rssi_complete(uint8_t * p,uint16_t evt_len)584 void btm_read_rssi_complete(uint8_t* p, uint16_t evt_len) {
585 inc_func_call_count(__func__);
586 test::mock::stack_acl::btm_read_rssi_complete(p, evt_len);
587 }
btm_read_rssi_timeout(void * data)588 void btm_read_rssi_timeout(void* data) {
589 inc_func_call_count(__func__);
590 test::mock::stack_acl::btm_read_rssi_timeout(data);
591 }
btm_read_tx_power_complete(uint8_t * p,uint16_t evt_len,bool is_ble)592 void btm_read_tx_power_complete(uint8_t* p, uint16_t evt_len, bool is_ble) {
593 inc_func_call_count(__func__);
594 test::mock::stack_acl::btm_read_tx_power_complete(p, evt_len, is_ble);
595 }
btm_read_tx_power_timeout(void * data)596 void btm_read_tx_power_timeout(void* data) {
597 inc_func_call_count(__func__);
598 test::mock::stack_acl::btm_read_tx_power_timeout(data);
599 }
btm_rejectlist_role_change_device(const RawAddress & bd_addr,uint8_t hci_status)600 void btm_rejectlist_role_change_device(const RawAddress& bd_addr,
601 uint8_t hci_status) {
602 inc_func_call_count(__func__);
603 test::mock::stack_acl::btm_rejectlist_role_change_device(bd_addr, hci_status);
604 }
btm_set_link_policy(tACL_CONN * conn,tLINK_POLICY policy)605 void btm_set_link_policy(tACL_CONN* conn, tLINK_POLICY policy) {
606 inc_func_call_count(__func__);
607 test::mock::stack_acl::btm_set_link_policy(conn, policy);
608 }
btm_set_packet_types_from_address(const RawAddress & bd_addr,uint16_t pkt_types)609 void btm_set_packet_types_from_address(const RawAddress& bd_addr,
610 uint16_t pkt_types) {
611 inc_func_call_count(__func__);
612 test::mock::stack_acl::btm_set_packet_types_from_address(bd_addr, pkt_types);
613 }
hci_btm_set_link_supervision_timeout(tACL_CONN & link,uint16_t timeout)614 void hci_btm_set_link_supervision_timeout(tACL_CONN& link, uint16_t timeout) {
615 inc_func_call_count(__func__);
616 test::mock::stack_acl::hci_btm_set_link_supervision_timeout(link, timeout);
617 }
btm_connection_request(const RawAddress & bda,const bluetooth::hci::ClassOfDevice & cod)618 void btm_connection_request(const RawAddress& bda,
619 const bluetooth::hci::ClassOfDevice& cod) {
620 test::mock::stack_acl::btm_connection_request(bda, cod);
621 }
on_acl_br_edr_connected(const RawAddress & bda,uint16_t handle,uint8_t enc_mode,bool locally_initiated)622 void on_acl_br_edr_connected(const RawAddress& bda, uint16_t handle,
623 uint8_t enc_mode, bool locally_initiated) {
624 inc_func_call_count(__func__);
625 test::mock::stack_acl::on_acl_br_edr_connected(bda, handle, enc_mode,
626 locally_initiated);
627 }
on_acl_br_edr_failed(const RawAddress & bda,tHCI_STATUS status,bool locally_initiated)628 void on_acl_br_edr_failed(const RawAddress& bda, tHCI_STATUS status,
629 bool locally_initiated) {
630 inc_func_call_count(__func__);
631 test::mock::stack_acl::on_acl_br_edr_failed(bda, status, locally_initiated);
632 }
633
BTM_unblock_role_switch_and_sniff_mode_for(const RawAddress & peer_addr)634 void BTM_unblock_role_switch_and_sniff_mode_for(const RawAddress& peer_addr) {
635 inc_func_call_count(__func__);
636 test::mock::stack_acl::BTM_unblock_role_switch_and_sniff_mode_for(peer_addr);
637 }
638
639 // END mockcify generation
640
BTM_block_role_switch_and_sniff_mode_for(const RawAddress &)641 void BTM_block_role_switch_and_sniff_mode_for(
642 const RawAddress& /* peer_addr */) {}
643