1 /*
2  * Copyright 2022 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 #pragma once
17 
18 /*
19  * Generated mock file from original source file
20  *   Functions generated:52
21  *
22  *  mockcify.pl ver 0.5.0
23  */
24 
25 #include <cstdint>
26 #include <functional>
27 #include <optional>
28 
29 // Original included files, if any
30 #include "stack/btm/btm_ble_sec.h"
31 #include "stack/include/bt_device_type.h"
32 #include "stack/include/bt_octets.h"
33 #include "stack/include/btm_api_types.h"
34 #include "stack/include/btm_ble_api_types.h"
35 #include "stack/include/btm_ble_sec_api_types.h"
36 #include "stack/include/btm_sec_api_types.h"
37 #include "stack/include/btm_status.h"
38 #include "stack/include/l2cdefs.h"
39 #include "types/ble_address_with_type.h"
40 #include "types/raw_address.h"
41 
42 typedef uint8_t tBTM_SEC_ACTION;
43 
44 // Original usings
45 
46 // Mocked compile conditionals, if any
47 
48 namespace test {
49 namespace mock {
50 namespace stack_btm_ble {
51 
52 // Shared state between mocked functions and tests
53 // Name: BTM_BleConfirmReply
54 // Params: const RawAddress& bd_addr, uint8_t res
55 // Return: void
56 struct BTM_BleConfirmReply {
57   std::function<void(const RawAddress& /* bd_addr */, uint8_t /* res */)> body{
58       [](const RawAddress& /* bd_addr */, uint8_t /* res */) {}};
operatorBTM_BleConfirmReply59   void operator()(const RawAddress& bd_addr, uint8_t res) {
60     body(bd_addr, res);
61   };
62 };
63 extern struct BTM_BleConfirmReply BTM_BleConfirmReply;
64 
65 // Name: BTM_BleDataSignature
66 // Params: const RawAddress& bd_addr, uint8_t* p_text, uint16_t len,
67 // BLE_SIGNATURE signature Return: bool
68 struct BTM_BleDataSignature {
69   static bool return_value;
70   std::function<bool(const RawAddress& bd_addr, uint8_t* p_text, uint16_t len,
71                      BLE_SIGNATURE signature)>
72       body{[](const RawAddress& /* bd_addr */, uint8_t* /* p_text */,
73               uint16_t /* len */,
74               BLE_SIGNATURE /* signature */) { return return_value; }};
operatorBTM_BleDataSignature75   bool operator()(const RawAddress& bd_addr, uint8_t* p_text, uint16_t len,
76                   BLE_SIGNATURE signature) {
77     return body(bd_addr, p_text, len, signature);
78   };
79 };
80 extern struct BTM_BleDataSignature BTM_BleDataSignature;
81 
82 // Name: BTM_BleLoadLocalKeys
83 // Params: uint8_t key_type, tBTM_BLE_LOCAL_KEYS* p_key
84 // Return: void
85 struct BTM_BleLoadLocalKeys {
86   std::function<void(uint8_t key_type, tBTM_BLE_LOCAL_KEYS* p_key)> body{
87       [](uint8_t /* key_type */, tBTM_BLE_LOCAL_KEYS* /* p_key */) {}};
operatorBTM_BleLoadLocalKeys88   void operator()(uint8_t key_type, tBTM_BLE_LOCAL_KEYS* p_key) {
89     body(key_type, p_key);
90   };
91 };
92 extern struct BTM_BleLoadLocalKeys BTM_BleLoadLocalKeys;
93 
94 // Name: BTM_BleOobDataReply
95 // Params: const RawAddress& bd_addr, uint8_t res, uint8_t len, uint8_t* p_data
96 // Return: void
97 struct BTM_BleOobDataReply {
98   std::function<void(const RawAddress& bd_addr, uint8_t res, uint8_t len,
99                      uint8_t* p_data)>
100       body{[](const RawAddress& /* bd_addr */, uint8_t /* res */,
101               uint8_t /* len */, uint8_t* /* p_data */) {}};
operatorBTM_BleOobDataReply102   void operator()(const RawAddress& bd_addr, uint8_t res, uint8_t len,
103                   uint8_t* p_data) {
104     body(bd_addr, res, len, p_data);
105   };
106 };
107 extern struct BTM_BleOobDataReply BTM_BleOobDataReply;
108 
109 // Name: BTM_BlePasskeyReply
110 // Params: const RawAddress& bd_addr, uint8_t res, uint32_t passkey
111 // Return: void
112 struct BTM_BlePasskeyReply {
113   std::function<void(const RawAddress& bd_addr, uint8_t res, uint32_t passkey)>
114       body{[](const RawAddress& /* bd_addr */, uint8_t /* res */,
115               uint32_t /* passkey */) {}};
operatorBTM_BlePasskeyReply116   void operator()(const RawAddress& bd_addr, uint8_t res, uint32_t passkey) {
117     body(bd_addr, res, passkey);
118   };
119 };
120 extern struct BTM_BlePasskeyReply BTM_BlePasskeyReply;
121 
122 // Name: BTM_BleReadPhy
123 // Params: const RawAddress& bd_addr, base::Callback<void(uint8_t tx_phy,
124 // uint8_t rx_phy, uint8_t status Return: void
125 struct BTM_BleReadPhy {
126   std::function<void(
127       const RawAddress& bd_addr,
128       base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)>
129           callback)>
130       body{[](const RawAddress& /* bd_addr */,
131               base::Callback<void(uint8_t tx_phy, uint8_t rx_phy,
132                                   uint8_t status)>
133               /* callback */) {}};
operatorBTM_BleReadPhy134   void operator()(
135       const RawAddress& bd_addr,
136       base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)>
137           callback) {
138     body(bd_addr, callback);
139   };
140 };
141 extern struct BTM_BleReadPhy BTM_BleReadPhy;
142 
143 // Name: BTM_BleReceiverTest
144 // Params: uint8_t rx_freq, tBTM_CMPL_CB* p_cmd_cmpl_cback
145 // Return: void
146 struct BTM_BleReceiverTest {
147   std::function<void(uint8_t rx_freq, tBTM_CMPL_CB* p_cmd_cmpl_cback)> body{
148       [](uint8_t /* rx_freq */, tBTM_CMPL_CB* /* p_cmd_cmpl_cback */) {}};
operatorBTM_BleReceiverTest149   void operator()(uint8_t rx_freq, tBTM_CMPL_CB* p_cmd_cmpl_cback) {
150     body(rx_freq, p_cmd_cmpl_cback);
151   };
152 };
153 extern struct BTM_BleReceiverTest BTM_BleReceiverTest;
154 
155 // Name: BTM_BleSecureConnectionOobDataReply
156 // Params: const RawAddress& bd_addr, uint8_t* p_c, uint8_t* p_r
157 // Return: void
158 struct BTM_BleSecureConnectionOobDataReply {
159   std::function<void(const RawAddress& bd_addr, uint8_t* p_c, uint8_t* p_r)>
160       body{[](const RawAddress& /* bd_addr */, uint8_t* /* p_c */,
161               uint8_t* /* p_r */) {}};
operatorBTM_BleSecureConnectionOobDataReply162   void operator()(const RawAddress& bd_addr, uint8_t* p_c, uint8_t* p_r) {
163     body(bd_addr, p_c, p_r);
164   };
165 };
166 extern struct BTM_BleSecureConnectionOobDataReply
167     BTM_BleSecureConnectionOobDataReply;
168 
169 // Name: BTM_BleSetPhy
170 // Params: const RawAddress& bd_addr, uint8_t tx_phys, uint8_t rx_phys, uint16_t
171 // phy_options Return: void
172 struct BTM_BleSetPhy {
173   std::function<void(const RawAddress& bd_addr, uint8_t tx_phys,
174                      uint8_t rx_phys, uint16_t phy_options)>
175       body{[](const RawAddress& /* bd_addr */, uint8_t /* tx_phys */,
176               uint8_t /* rx_phys */, uint16_t /* phy_options */) {}};
operatorBTM_BleSetPhy177   void operator()(const RawAddress& bd_addr, uint8_t tx_phys, uint8_t rx_phys,
178                   uint16_t phy_options) {
179     body(bd_addr, tx_phys, rx_phys, phy_options);
180   };
181 };
182 extern struct BTM_BleSetPhy BTM_BleSetPhy;
183 
184 // Name: BTM_BleSetPrefConnParams
185 // Params: const RawAddress& bd_addr, uint16_t min_conn_int, uint16_t
186 // max_conn_int, uint16_t peripheral_latency, uint16_t supervision_tout Return:
187 // void
188 struct BTM_BleSetPrefConnParams {
189   std::function<void(const RawAddress& bd_addr, uint16_t min_conn_int,
190                      uint16_t max_conn_int, uint16_t peripheral_latency,
191                      uint16_t supervision_tout)>
192       body{[](const RawAddress& /* bd_addr */, uint16_t /* min_conn_int */,
193               uint16_t /* max_conn_int */, uint16_t /* peripheral_latency */,
194               uint16_t /* supervision_tout */) {}};
operatorBTM_BleSetPrefConnParams195   void operator()(const RawAddress& bd_addr, uint16_t min_conn_int,
196                   uint16_t max_conn_int, uint16_t peripheral_latency,
197                   uint16_t supervision_tout) {
198     body(bd_addr, min_conn_int, max_conn_int, peripheral_latency,
199          supervision_tout);
200   };
201 };
202 extern struct BTM_BleSetPrefConnParams BTM_BleSetPrefConnParams;
203 
204 // Name: BTM_BleTestEnd
205 // Params: tBTM_CMPL_CB* p_cmd_cmpl_cback
206 // Return: void
207 struct BTM_BleTestEnd {
208   std::function<void(tBTM_CMPL_CB* p_cmd_cmpl_cback)> body{
209       [](tBTM_CMPL_CB* /* p_cmd_cmpl_cback */) {}};
operatorBTM_BleTestEnd210   void operator()(tBTM_CMPL_CB* p_cmd_cmpl_cback) { body(p_cmd_cmpl_cback); };
211 };
212 extern struct BTM_BleTestEnd BTM_BleTestEnd;
213 
214 // Name: BTM_BleTransmitterTest
215 // Params: uint8_t tx_freq, uint8_t test_data_len, uint8_t packet_payload,
216 // tBTM_CMPL_CB* p_cmd_cmpl_cback Return: void
217 struct BTM_BleTransmitterTest {
218   std::function<void(uint8_t tx_freq, uint8_t test_data_len,
219                      uint8_t packet_payload, tBTM_CMPL_CB* p_cmd_cmpl_cback)>
220       body{[](uint8_t /* tx_freq */, uint8_t /* test_data_len */,
221               uint8_t /* packet_payload */,
222               tBTM_CMPL_CB* /* p_cmd_cmpl_cback */) {}};
operatorBTM_BleTransmitterTest223   void operator()(uint8_t tx_freq, uint8_t test_data_len,
224                   uint8_t packet_payload, tBTM_CMPL_CB* p_cmd_cmpl_cback) {
225     body(tx_freq, test_data_len, packet_payload, p_cmd_cmpl_cback);
226   };
227 };
228 extern struct BTM_BleTransmitterTest BTM_BleTransmitterTest;
229 
230 // Name: BTM_BleVerifySignature
231 // Params: const RawAddress& bd_addr, uint8_t* p_orig, uint16_t len, uint32_t
232 // counter, uint8_t* p_comp Return: bool
233 struct BTM_BleVerifySignature {
234   static bool return_value;
235   std::function<bool(const RawAddress& bd_addr, uint8_t* p_orig, uint16_t len,
236                      uint32_t counter, uint8_t* p_comp)>
237       body{[](const RawAddress& /* bd_addr */, uint8_t* /* p_orig */,
238               uint16_t /* len */, uint32_t /* counter */,
239               uint8_t* /* p_comp */) { return return_value; }};
operatorBTM_BleVerifySignature240   bool operator()(const RawAddress& bd_addr, uint8_t* p_orig, uint16_t len,
241                   uint32_t counter, uint8_t* p_comp) {
242     return body(bd_addr, p_orig, len, counter, p_comp);
243   };
244 };
245 extern struct BTM_BleVerifySignature BTM_BleVerifySignature;
246 
247 // Name: BTM_GetDeviceDHK
248 // Params:
249 // Return: const Octet16&
250 struct BTM_GetDeviceDHK {
251   static const Octet16 return_value;
252   std::function<const Octet16&()> body{
253       // Explicit return type is needed otherwise it returns copy of object
254       []() -> const Octet16& { return return_value; }};
operatorBTM_GetDeviceDHK255   const Octet16& operator()() { return body(); };
256 };
257 extern struct BTM_GetDeviceDHK BTM_GetDeviceDHK;
258 
259 // Name: BTM_GetDeviceEncRoot
260 // Params:
261 // Return: const Octet16&
262 struct BTM_GetDeviceEncRoot {
263   static const Octet16 return_value;
264   std::function<const Octet16&()> body{
265       // Explicit return type is needed otherwise it returns copy of object
266       []() -> const Octet16& { return return_value; }};
operatorBTM_GetDeviceEncRoot267   const Octet16& operator()() { return body(); };
268 };
269 extern struct BTM_GetDeviceEncRoot BTM_GetDeviceEncRoot;
270 
271 // Name: BTM_GetDeviceIDRoot
272 // Params:
273 // Return: const Octet16&
274 struct BTM_GetDeviceIDRoot {
275   static const Octet16 return_value;
276   std::function<const Octet16&()> body{
277       // Explicit return type is needed otherwise it returns copy of object
278       []() -> const Octet16& { return return_value; }};
operatorBTM_GetDeviceIDRoot279   const Octet16& operator()() { return body(); };
280 };
281 extern struct BTM_GetDeviceIDRoot BTM_GetDeviceIDRoot;
282 
283 // Name: BTM_ReadConnectedTransportAddress
284 // Params: RawAddress* remote_bda, tBT_TRANSPORT transport
285 // Return: bool
286 struct BTM_ReadConnectedTransportAddress {
287   static bool return_value;
288   std::function<bool(RawAddress* remote_bda, tBT_TRANSPORT transport)> body{
289       [](RawAddress* /* remote_bda */, tBT_TRANSPORT /* transport */) {
290         return return_value;
291       }};
operatorBTM_ReadConnectedTransportAddress292   bool operator()(RawAddress* remote_bda, tBT_TRANSPORT transport) {
293     return body(remote_bda, transport);
294   };
295 };
296 extern struct BTM_ReadConnectedTransportAddress
297     BTM_ReadConnectedTransportAddress;
298 
299 // Name: BTM_ReadDevInfo
300 // Params: const RawAddress& remote_bda, tBT_DEVICE_TYPE* p_dev_type,
301 // tBLE_ADDR_TYPE* p_addr_type Return: void
302 struct BTM_ReadDevInfo {
303   std::function<void(const RawAddress& remote_bda, tBT_DEVICE_TYPE* p_dev_type,
304                      tBLE_ADDR_TYPE* p_addr_type)>
305       body{[](const RawAddress& /* remote_bda */,
306               tBT_DEVICE_TYPE* /* p_dev_type */,
307               tBLE_ADDR_TYPE* /* p_addr_type */) {}};
operatorBTM_ReadDevInfo308   void operator()(const RawAddress& remote_bda, tBT_DEVICE_TYPE* p_dev_type,
309                   tBLE_ADDR_TYPE* p_addr_type) {
310     body(remote_bda, p_dev_type, p_addr_type);
311   };
312 };
313 extern struct BTM_ReadDevInfo BTM_ReadDevInfo;
314 
315 // Name: BTM_SecAddBleDevice
316 // Params: const RawAddress& bd_addr, tBT_DEVICE_TYPE dev_type, tBLE_ADDR_TYPE
317 // addr_type Return: void
318 struct BTM_SecAddBleDevice {
319   std::function<void(const RawAddress& bd_addr, tBT_DEVICE_TYPE dev_type,
320                      tBLE_ADDR_TYPE addr_type)>
321       body{[](const RawAddress& /* bd_addr */, tBT_DEVICE_TYPE /* dev_type */,
322               tBLE_ADDR_TYPE /* addr_type */) {}};
operatorBTM_SecAddBleDevice323   void operator()(const RawAddress& bd_addr, tBT_DEVICE_TYPE dev_type,
324                   tBLE_ADDR_TYPE addr_type) {
325     body(bd_addr, dev_type, addr_type);
326   };
327 };
328 extern struct BTM_SecAddBleDevice BTM_SecAddBleDevice;
329 
330 // Name: BTM_GetRemoteDeviceName
331 // Params: const RawAddress& bd_addr, BD_NAME bd_name
332 // Return: bool
333 struct BTM_GetRemoteDeviceName {
334   static bool return_value;
335   std::function<bool(const RawAddress& bd_addr, BD_NAME bd_name)> body{
336       [](const RawAddress& /* bd_addr */, BD_NAME /* bd_name */) {
337         return return_value;
338       }};
operatorBTM_GetRemoteDeviceName339   bool operator()(const RawAddress& bd_addr, BD_NAME bd_name) {
340     return body(bd_addr, bd_name);
341   };
342 };
343 extern struct BTM_GetRemoteDeviceName BTM_GetRemoteDeviceName;
344 
345 // Name: BTM_SecAddBleKey
346 // Params: const RawAddress& bd_addr, tBTM_LE_KEY_VALUE* p_le_key,
347 // tBTM_LE_KEY_TYPE key_type Return: void
348 struct BTM_SecAddBleKey {
349   std::function<void(const RawAddress& bd_addr, tBTM_LE_KEY_VALUE* p_le_key,
350                      tBTM_LE_KEY_TYPE key_type)>
351       body{[](const RawAddress& /* bd_addr */,
352               tBTM_LE_KEY_VALUE* /* p_le_key */,
353               tBTM_LE_KEY_TYPE /* key_type */) {}};
operatorBTM_SecAddBleKey354   void operator()(const RawAddress& bd_addr, tBTM_LE_KEY_VALUE* p_le_key,
355                   tBTM_LE_KEY_TYPE key_type) {
356     body(bd_addr, p_le_key, key_type);
357   };
358 };
359 extern struct BTM_SecAddBleKey BTM_SecAddBleKey;
360 
361 // Name: BTM_SecurityGrant
362 // Params: const RawAddress& bd_addr, uint8_t res
363 // Return: void
364 struct BTM_SecurityGrant {
365   std::function<void(const RawAddress& bd_addr, uint8_t res)> body{
366       [](const RawAddress& /* bd_addr */, uint8_t /* res */) {}};
operatorBTM_SecurityGrant367   void operator()(const RawAddress& bd_addr, uint8_t res) {
368     body(bd_addr, res);
369   };
370 };
371 extern struct BTM_SecurityGrant BTM_SecurityGrant;
372 
373 // Name: BTM_SetBleDataLength
374 // Params: const RawAddress& bd_addr, uint16_t tx_pdu_length
375 // Return: tBTM_STATUS
376 struct BTM_SetBleDataLength {
377   static tBTM_STATUS return_value;
378   std::function<tBTM_STATUS(const RawAddress& bd_addr, uint16_t tx_pdu_length)>
379       body{[](const RawAddress& /* bd_addr */, uint16_t /* tx_pdu_length */) {
380         return return_value;
381       }};
operatorBTM_SetBleDataLength382   tBTM_STATUS operator()(const RawAddress& bd_addr, uint16_t tx_pdu_length) {
383     return body(bd_addr, tx_pdu_length);
384   };
385 };
386 extern struct BTM_SetBleDataLength BTM_SetBleDataLength;
387 
388 // Name: BTM_UseLeLink
389 // Params: const RawAddress& bd_addr
390 // Return: bool
391 struct BTM_UseLeLink {
392   static bool return_value;
393   std::function<bool(const RawAddress& bd_addr)> body{
394       [](const RawAddress& /* bd_addr */) { return return_value; }};
operatorBTM_UseLeLink395   bool operator()(const RawAddress& bd_addr) { return body(bd_addr); };
396 };
397 extern struct BTM_UseLeLink BTM_UseLeLink;
398 
399 // Name: btm_ble_connected
400 // Params: const RawAddress& bda, uint16_t handle, uint8_t enc_mode, uint8_t
401 // role, tBLE_ADDR_TYPE addr_type, bool addr_matched Return: void
402 struct btm_ble_connected {
403   std::function<void(const RawAddress& bda, uint16_t handle, uint8_t enc_mode,
404                      uint8_t role, tBLE_ADDR_TYPE addr_type, bool addr_matched,
405                      bool can_read_discoverable_characteristics)>
406       body{[](const RawAddress& /* bda */, uint16_t /* handle */,
407               uint8_t /* enc_mode */, uint8_t /* role */,
408               tBLE_ADDR_TYPE /* addr_type */, bool /* addr_matched */,
409               bool /* can_read_discoverable_characteristics */) {}};
operatorbtm_ble_connected410   void operator()(const RawAddress& bda, uint16_t handle, uint8_t enc_mode,
411                   uint8_t role, tBLE_ADDR_TYPE addr_type, bool addr_matched,
412                   bool can_read_discoverable_characteristics) {
413     body(bda, handle, enc_mode, role, addr_type, addr_matched,
414          can_read_discoverable_characteristics);
415   };
416 };
417 extern struct btm_ble_connected btm_ble_connected;
418 
419 // Name: btm_ble_get_acl_remote_addr
420 // Params: uint16_t hci_handle, RawAddress& conn_addr, tBLE_ADDR_TYPE*
421 // p_addr_type Return: bool
422 struct btm_ble_get_acl_remote_addr {
423   static bool return_value;
424   std::function<bool(uint16_t hci_handle, RawAddress& conn_addr,
425                      tBLE_ADDR_TYPE* p_addr_type)>
426       body{[](uint16_t /* hci_handle */, RawAddress& /* conn_addr */,
427               tBLE_ADDR_TYPE* /* p_addr_type */) { return return_value; }};
operatorbtm_ble_get_acl_remote_addr428   bool operator()(uint16_t hci_handle, RawAddress& conn_addr,
429                   tBLE_ADDR_TYPE* p_addr_type) {
430     return body(hci_handle, conn_addr, p_addr_type);
431   };
432 };
433 extern struct btm_ble_get_acl_remote_addr btm_ble_get_acl_remote_addr;
434 
435 // Name: btm_ble_get_enc_key_type
436 // Params: const RawAddress& bd_addr, uint8_t* p_key_types
437 // Return: bool
438 struct btm_ble_get_enc_key_type {
439   static bool return_value;
440   std::function<bool(const RawAddress& bd_addr, uint8_t* p_key_types)> body{
441       [](const RawAddress& /* bd_addr */, uint8_t* /* p_key_types */) {
442         return return_value;
443       }};
operatorbtm_ble_get_enc_key_type444   bool operator()(const RawAddress& bd_addr, uint8_t* p_key_types) {
445     return body(bd_addr, p_key_types);
446   };
447 };
448 extern struct btm_ble_get_enc_key_type btm_ble_get_enc_key_type;
449 
450 // Name: btm_ble_link_encrypted
451 // Params: const RawAddress& bd_addr, uint8_t encr_enable
452 // Return: void
453 struct btm_ble_link_encrypted {
454   std::function<void(const RawAddress& bd_addr, uint8_t encr_enable)> body{
455       [](const RawAddress& /* bd_addr */, uint8_t /* encr_enable */) {}};
operatorbtm_ble_link_encrypted456   void operator()(const RawAddress& bd_addr, uint8_t encr_enable) {
457     body(bd_addr, encr_enable);
458   };
459 };
460 extern struct btm_ble_link_encrypted btm_ble_link_encrypted;
461 
462 // Name: btm_ble_link_sec_check
463 // Params: const RawAddress& bd_addr, tBTM_LE_AUTH_REQ auth_req,
464 // tBTM_BLE_SEC_REQ_ACT* p_sec_req_act Return: void
465 struct btm_ble_link_sec_check {
466   std::function<void(const RawAddress& bd_addr, tBTM_LE_AUTH_REQ auth_req,
467                      tBTM_BLE_SEC_REQ_ACT* p_sec_req_act)>
468       body{[](const RawAddress& /* bd_addr */, tBTM_LE_AUTH_REQ /* auth_req */,
469               tBTM_BLE_SEC_REQ_ACT* /* p_sec_req_act */) {}};
operatorbtm_ble_link_sec_check470   void operator()(const RawAddress& bd_addr, tBTM_LE_AUTH_REQ auth_req,
471                   tBTM_BLE_SEC_REQ_ACT* p_sec_req_act) {
472     body(bd_addr, auth_req, p_sec_req_act);
473   };
474 };
475 extern struct btm_ble_link_sec_check btm_ble_link_sec_check;
476 
477 // Name: btm_ble_ltk_request
478 // Params: uint16_t handle, uint8_t rand[8], uint16_t ediv
479 // Return: void
480 struct btm_ble_ltk_request {
481   std::function<void(uint16_t handle, BT_OCTET8 rand, uint16_t ediv)> body{
482       [](uint16_t /* handle */, BT_OCTET8 /* rand */, uint16_t /* ediv */) {}};
operatorbtm_ble_ltk_request483   void operator()(uint16_t handle, BT_OCTET8 rand, uint16_t ediv) {
484     body(handle, rand, ediv);
485   };
486 };
487 extern struct btm_ble_ltk_request btm_ble_ltk_request;
488 
489 // Name: btm_ble_ltk_request_reply
490 // Params: const RawAddress& bda, bool use_stk, const Octet16& stk
491 // Return: void
492 struct btm_ble_ltk_request_reply {
493   std::function<void(const RawAddress& bda, bool use_stk, const Octet16& stk)>
494       body{[](const RawAddress& /* bda */, bool /* use_stk */,
495               const Octet16& /* stk */) {}};
operatorbtm_ble_ltk_request_reply496   void operator()(const RawAddress& bda, bool use_stk, const Octet16& stk) {
497     body(bda, use_stk, stk);
498   };
499 };
500 extern struct btm_ble_ltk_request_reply btm_ble_ltk_request_reply;
501 
502 // Name: btm_ble_read_sec_key_size
503 // Params: const RawAddress& bd_addr
504 // Return: uint8_t
505 struct btm_ble_read_sec_key_size {
506   static uint8_t return_value;
507   std::function<uint8_t(const RawAddress& bd_addr)> body{
508       [](const RawAddress& /* bd_addr */) { return return_value; }};
operatorbtm_ble_read_sec_key_size509   uint8_t operator()(const RawAddress& bd_addr) { return body(bd_addr); };
510 };
511 extern struct btm_ble_read_sec_key_size btm_ble_read_sec_key_size;
512 
513 // Name: btm_ble_reset_id
514 // Params: void
515 // Return: void
516 struct btm_ble_reset_id {
517   std::function<void(void)> body{[](void) {}};
operatorbtm_ble_reset_id518   void operator()(void) { body(); };
519 };
520 extern struct btm_ble_reset_id btm_ble_reset_id;
521 
522 // Name: btm_ble_set_encryption
523 // Params: const RawAddress& bd_addr, tBTM_BLE_SEC_ACT sec_act, uint8_t
524 // link_role Return: tBTM_STATUS
525 struct btm_ble_set_encryption {
526   static tBTM_STATUS return_value;
527   std::function<tBTM_STATUS(const RawAddress& bd_addr, tBTM_BLE_SEC_ACT sec_act,
528                             uint8_t link_role)>
529       body{[](const RawAddress& /* bd_addr */, tBTM_BLE_SEC_ACT /* sec_act */,
530               uint8_t /* link_role */) { return return_value; }};
operatorbtm_ble_set_encryption531   tBTM_STATUS operator()(const RawAddress& bd_addr, tBTM_BLE_SEC_ACT sec_act,
532                          uint8_t link_role) {
533     return body(bd_addr, sec_act, link_role);
534   };
535 };
536 extern struct btm_ble_set_encryption btm_ble_set_encryption;
537 
538 // Name: btm_ble_set_keep_rfu_in_auth_req
539 // Params: bool keep_rfu
540 // Return: void
541 struct btm_ble_set_keep_rfu_in_auth_req {
542   std::function<void(bool)> body{[](bool /* keep_rfu */) {}};
operatorbtm_ble_set_keep_rfu_in_auth_req543   void operator()(bool keep_rfu) { body(keep_rfu); };
544 };
545 extern struct btm_ble_set_keep_rfu_in_auth_req btm_ble_set_keep_rfu_in_auth_req;
546 
547 // Name: btm_ble_set_no_disc_if_pair_fail
548 // Params: bool disable_disc
549 // Return: void
550 struct btm_ble_set_no_disc_if_pair_fail {
551   std::function<void(bool)> body{[](bool /* disable_disc */) {}};
operatorbtm_ble_set_no_disc_if_pair_fail552   void operator()(bool disable_disc) { body(disable_disc); };
553 };
554 extern struct btm_ble_set_no_disc_if_pair_fail btm_ble_set_no_disc_if_pair_fail;
555 
556 // Name: btm_ble_set_test_local_sign_cntr_value
557 // Params: bool enable, uint32_t test_local_sign_cntr
558 // Return: void
559 struct btm_ble_set_test_local_sign_cntr_value {
560   std::function<void(bool enable, uint32_t test_local_sign_cntr)> body{
561       [](bool /* enable */, uint32_t /* test_local_sign_cntr */) {}};
operatorbtm_ble_set_test_local_sign_cntr_value562   void operator()(bool enable, uint32_t test_local_sign_cntr) {
563     body(enable, test_local_sign_cntr);
564   };
565 };
566 extern struct btm_ble_set_test_local_sign_cntr_value
567     btm_ble_set_test_local_sign_cntr_value;
568 
569 // Name: btm_ble_set_test_mac_value
570 // Params: bool enable, uint8_t* p_test_mac_val
571 // Return: void
572 struct btm_ble_set_test_mac_value {
573   std::function<void(bool enable, uint8_t* p_test_mac_val)> body{
574       [](bool /* enable */, uint8_t* /* p_test_mac_val */) {}};
operatorbtm_ble_set_test_mac_value575   void operator()(bool enable, uint8_t* p_test_mac_val) {
576     body(enable, p_test_mac_val);
577   };
578 };
579 extern struct btm_ble_set_test_mac_value btm_ble_set_test_mac_value;
580 
581 // Name: btm_ble_start_encrypt
582 // Params: const RawAddress& bda, bool use_stk, Octet16* p_stk
583 // Return: tBTM_STATUS
584 struct btm_ble_start_encrypt {
585   static tBTM_STATUS return_value;
586   std::function<tBTM_STATUS(const RawAddress& bda, bool use_stk,
587                             Octet16* p_stk)>
588       body{[](const RawAddress& /* bda */, bool /* use_stk */,
589               Octet16* /* p_stk */) { return return_value; }};
operatorbtm_ble_start_encrypt590   tBTM_STATUS operator()(const RawAddress& bda, bool use_stk, Octet16* p_stk) {
591     return body(bda, use_stk, p_stk);
592   };
593 };
594 extern struct btm_ble_start_encrypt btm_ble_start_encrypt;
595 
596 // Name: btm_ble_start_sec_check
597 // Params: const RawAddress& bd_addr, uint16_t psm, bool is_originator,
598 // tBTM_SEC_CALLBACK* p_callback, void* p_ref_data Return: tL2CAP_LE_RESULT_CODE
599 struct btm_ble_start_sec_check {
600   static tBTM_STATUS return_value;
601   std::function<tBTM_STATUS(const RawAddress& bd_addr, uint16_t psm,
602                             bool is_originator, tBTM_SEC_CALLBACK* p_callback,
603                             void* p_ref_data)>
604       body{[](const RawAddress& /* bd_addr */, uint16_t /* psm */,
605               bool /* is_originator */, tBTM_SEC_CALLBACK* /* p_callback */,
606               void* /* p_ref_data */) { return return_value; }};
operatorbtm_ble_start_sec_check607   tBTM_STATUS operator()(const RawAddress& bd_addr, uint16_t psm,
608                          bool is_originator, tBTM_SEC_CALLBACK* p_callback,
609                          void* p_ref_data) {
610     return body(bd_addr, psm, is_originator, p_callback, p_ref_data);
611   };
612 };
613 extern struct btm_ble_start_sec_check btm_ble_start_sec_check;
614 
615 // Name: btm_ble_test_command_complete
616 // Params: uint8_t* p
617 // Return: void
618 struct btm_ble_test_command_complete {
619   std::function<void(uint8_t* p)> body{[](uint8_t* /* p */) {}};
operatorbtm_ble_test_command_complete620   void operator()(uint8_t* p) { body(p); };
621 };
622 extern struct btm_ble_test_command_complete btm_ble_test_command_complete;
623 
624 // Name: btm_ble_update_sec_key_size
625 // Params: const RawAddress& bd_addr, uint8_t enc_key_size
626 // Return: void
627 struct btm_ble_update_sec_key_size {
628   std::function<void(const RawAddress& bd_addr, uint8_t enc_key_size)> body{
629       [](const RawAddress& /* bd_addr */, uint8_t /* enc_key_size */) {}};
operatorbtm_ble_update_sec_key_size630   void operator()(const RawAddress& bd_addr, uint8_t enc_key_size) {
631     body(bd_addr, enc_key_size);
632   };
633 };
634 extern struct btm_ble_update_sec_key_size btm_ble_update_sec_key_size;
635 
636 // Name: btm_get_local_div
637 // Params: const RawAddress& bd_addr, uint16_t* p_div
638 // Return: bool
639 struct btm_get_local_div {
640   static bool return_value;
641   std::function<bool(const RawAddress& bd_addr, uint16_t* p_div)> body{
642       [](const RawAddress& /* bd_addr */, uint16_t* /* p_div */) {
643         return return_value;
644       }};
operatorbtm_get_local_div645   bool operator()(const RawAddress& bd_addr, uint16_t* p_div) {
646     return body(bd_addr, p_div);
647   };
648 };
649 extern struct btm_get_local_div btm_get_local_div;
650 
651 // Name: btm_proc_smp_cback
652 // Params: tSMP_EVT event, const RawAddress& bd_addr, const tSMP_EVT_DATA*
653 // p_data Return: tBTM_STATUS
654 struct btm_proc_smp_cback {
655   static tBTM_STATUS return_value;
656   std::function<tBTM_STATUS(tSMP_EVT event, const RawAddress& bd_addr,
657                             const tSMP_EVT_DATA* p_data)>
658       body{[](tSMP_EVT /* event */, const RawAddress& /* bd_addr */,
659               const tSMP_EVT_DATA* /* p_data */) { return return_value; }};
operatorbtm_proc_smp_cback660   tBTM_STATUS operator()(tSMP_EVT event, const RawAddress& bd_addr,
661                          const tSMP_EVT_DATA* p_data) {
662     return body(event, bd_addr, p_data);
663   };
664 };
665 extern struct btm_proc_smp_cback btm_proc_smp_cback;
666 
667 // Name: btm_sec_save_le_key
668 // Params: const RawAddress& bd_addr, tBTM_LE_KEY_TYPE key_type,
669 // tBTM_LE_KEY_VALUE* p_keys, bool pass_to_application Return: void
670 struct btm_sec_save_le_key {
671   std::function<void(const RawAddress& bd_addr, tBTM_LE_KEY_TYPE key_type,
672                      tBTM_LE_KEY_VALUE* p_keys, bool pass_to_application)>
673       body{[](const RawAddress& /* bd_addr */, tBTM_LE_KEY_TYPE /* key_type */,
674               tBTM_LE_KEY_VALUE* /* p_keys */,
675               bool /* pass_to_application */) {}};
operatorbtm_sec_save_le_key676   void operator()(const RawAddress& bd_addr, tBTM_LE_KEY_TYPE key_type,
677                   tBTM_LE_KEY_VALUE* p_keys, bool pass_to_application) {
678     body(bd_addr, key_type, p_keys, pass_to_application);
679   };
680 };
681 extern struct btm_sec_save_le_key btm_sec_save_le_key;
682 
683 // Name: doNothing
684 // Params: uint8_t* data, uint16_t len
685 // Return: void
686 struct doNothing {
687   std::function<void(uint8_t* data, uint16_t len)> body{
688       [](uint8_t* /* data */, uint16_t /* len */) {}};
operatordoNothing689   void operator()(uint8_t* data, uint16_t len) { body(data, len); };
690 };
691 extern struct doNothing doNothing;
692 
693 // Name: read_phy_cb
694 // Params: base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status
695 // Return: void
696 struct read_phy_cb {
697   std::function<void(
698       base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)>
699           callback,
700       uint8_t* data, uint16_t len)>
701       body{[](base::Callback<void(uint8_t tx_phy, uint8_t rx_phy,
702                                   uint8_t status)>
703               /* callback */,
704               uint8_t* /* data */, uint16_t /* len */) {}};
operatorread_phy_cb705   void operator()(
706       base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)>
707           callback,
708       uint8_t* data, uint16_t len) {
709     body(callback, data, len);
710   };
711 };
712 extern struct read_phy_cb read_phy_cb;
713 
714 }  // namespace stack_btm_ble
715 }  // namespace mock
716 }  // namespace test
717 
BTM_BleGetIdentityAddress(const RawAddress)718 std::optional<tBLE_BD_ADDR> BTM_BleGetIdentityAddress(
719     const RawAddress /* address */) {
720   return std::nullopt;
721 }
722 
723 // END mockcify generation
724