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 <map> 28 #include <string> 29 30 // Original included files, if any 31 // NOTE: Since this is a mock file with mock definitions some number of 32 // include files may not be required. The include-what-you-use 33 // still applies, but crafting proper inclusion is out of scope 34 // for this effort. This compilation unit may compile as-is, or 35 // may need attention to prune from (or add to ) the inclusion set. 36 #include <base/logging.h> 37 38 #include <cstdint> 39 40 #include "device/include/controller.h" 41 #include "main/shim/btm_api.h" 42 #include "main/shim/l2c_api.h" 43 #include "main/shim/shim.h" 44 #include "osi/include/allocator.h" 45 #include "osi/include/properties.h" 46 #include "stack/btm/btm_dev.h" 47 #include "stack/btm/btm_int_types.h" 48 #include "stack/btm/security_device_record.h" 49 #include "stack/crypto_toolbox/crypto_toolbox.h" 50 #include "stack/include/acl_api.h" 51 #include "stack/include/bt_octets.h" 52 #include "stack/include/bt_types.h" 53 #include "stack/include/btm_api.h" 54 #include "stack/include/btu.h" 55 #include "stack/include/gatt_api.h" 56 #include "stack/include/l2cap_security_interface.h" 57 #include "stack/include/l2cdefs.h" 58 #include "stack/include/smp_api.h" 59 #include "test/common/mock_functions.h" 60 #include "types/raw_address.h" 61 62 // Original usings 63 64 // Mocked compile conditionals, if any 65 66 namespace test { 67 namespace mock { 68 namespace stack_btm_ble { 69 70 // Shared state between mocked functions and tests 71 // Name: BTM_BleConfirmReply 72 // Params: const RawAddress& bd_addr, uint8_t res 73 // Return: void 74 struct BTM_BleConfirmReply { 75 std::function<void(const RawAddress& bd_addr, uint8_t res)> body{ 76 [](const RawAddress& bd_addr, uint8_t res) {}}; operatorBTM_BleConfirmReply77 void operator()(const RawAddress& bd_addr, uint8_t res) { 78 body(bd_addr, res); 79 }; 80 }; 81 extern struct BTM_BleConfirmReply BTM_BleConfirmReply; 82 83 // Name: BTM_BleDataSignature 84 // Params: const RawAddress& bd_addr, uint8_t* p_text, uint16_t len, 85 // BLE_SIGNATURE signature Return: bool 86 struct BTM_BleDataSignature { 87 static bool return_value; 88 std::function<bool(const RawAddress& bd_addr, uint8_t* p_text, uint16_t len, 89 BLE_SIGNATURE signature)> 90 body{[](const RawAddress& bd_addr, uint8_t* p_text, uint16_t len, 91 BLE_SIGNATURE signature) { return return_value; }}; operatorBTM_BleDataSignature92 bool operator()(const RawAddress& bd_addr, uint8_t* p_text, uint16_t len, 93 BLE_SIGNATURE signature) { 94 return body(bd_addr, p_text, len, signature); 95 }; 96 }; 97 extern struct BTM_BleDataSignature BTM_BleDataSignature; 98 99 // Name: BTM_BleLoadLocalKeys 100 // Params: uint8_t key_type, tBTM_BLE_LOCAL_KEYS* p_key 101 // Return: void 102 struct BTM_BleLoadLocalKeys { 103 std::function<void(uint8_t key_type, tBTM_BLE_LOCAL_KEYS* p_key)> body{ 104 [](uint8_t key_type, tBTM_BLE_LOCAL_KEYS* p_key) {}}; operatorBTM_BleLoadLocalKeys105 void operator()(uint8_t key_type, tBTM_BLE_LOCAL_KEYS* p_key) { 106 body(key_type, p_key); 107 }; 108 }; 109 extern struct BTM_BleLoadLocalKeys BTM_BleLoadLocalKeys; 110 111 // Name: BTM_BleOobDataReply 112 // Params: const RawAddress& bd_addr, uint8_t res, uint8_t len, uint8_t* p_data 113 // Return: void 114 struct BTM_BleOobDataReply { 115 std::function<void(const RawAddress& bd_addr, uint8_t res, uint8_t len, 116 uint8_t* p_data)> 117 body{[](const RawAddress& bd_addr, uint8_t res, uint8_t len, 118 uint8_t* p_data) {}}; operatorBTM_BleOobDataReply119 void operator()(const RawAddress& bd_addr, uint8_t res, uint8_t len, 120 uint8_t* p_data) { 121 body(bd_addr, res, len, p_data); 122 }; 123 }; 124 extern struct BTM_BleOobDataReply BTM_BleOobDataReply; 125 126 // Name: BTM_BlePasskeyReply 127 // Params: const RawAddress& bd_addr, uint8_t res, uint32_t passkey 128 // Return: void 129 struct BTM_BlePasskeyReply { 130 std::function<void(const RawAddress& bd_addr, uint8_t res, uint32_t passkey)> 131 body{[](const RawAddress& bd_addr, uint8_t res, uint32_t passkey) {}}; operatorBTM_BlePasskeyReply132 void operator()(const RawAddress& bd_addr, uint8_t res, uint32_t passkey) { 133 body(bd_addr, res, passkey); 134 }; 135 }; 136 extern struct BTM_BlePasskeyReply BTM_BlePasskeyReply; 137 138 // Name: BTM_BleReadPhy 139 // Params: const RawAddress& bd_addr, base::Callback<void(uint8_t tx_phy, 140 // uint8_t rx_phy, uint8_t status Return: void 141 struct BTM_BleReadPhy { 142 std::function<void( 143 const RawAddress& bd_addr, 144 base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)> 145 callback)> 146 body{[](const RawAddress& bd_addr, 147 base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, 148 uint8_t status)> 149 callback) {}}; operatorBTM_BleReadPhy150 void operator()( 151 const RawAddress& bd_addr, 152 base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)> 153 callback) { 154 body(bd_addr, callback); 155 }; 156 }; 157 extern struct BTM_BleReadPhy BTM_BleReadPhy; 158 159 // Name: BTM_BleSecureConnectionOobDataReply 160 // Params: const RawAddress& bd_addr, uint8_t* p_c, uint8_t* p_r 161 // Return: void 162 struct BTM_BleSecureConnectionOobDataReply { 163 std::function<void(const RawAddress& bd_addr, uint8_t* p_c, uint8_t* p_r)> 164 body{[](const RawAddress& bd_addr, uint8_t* p_c, uint8_t* p_r) {}}; operatorBTM_BleSecureConnectionOobDataReply165 void operator()(const RawAddress& bd_addr, uint8_t* p_c, uint8_t* p_r) { 166 body(bd_addr, p_c, p_r); 167 }; 168 }; 169 extern struct BTM_BleSecureConnectionOobDataReply 170 BTM_BleSecureConnectionOobDataReply; 171 172 // Name: BTM_BleSetPhy 173 // Params: const RawAddress& bd_addr, uint8_t tx_phys, uint8_t rx_phys, uint16_t 174 // phy_options Return: void 175 struct BTM_BleSetPhy { 176 std::function<void(const RawAddress& bd_addr, uint8_t tx_phys, 177 uint8_t rx_phys, uint16_t phy_options)> 178 body{[](const RawAddress& bd_addr, uint8_t tx_phys, uint8_t rx_phys, 179 uint16_t phy_options) {}}; operatorBTM_BleSetPhy180 void operator()(const RawAddress& bd_addr, uint8_t tx_phys, uint8_t rx_phys, 181 uint16_t phy_options) { 182 body(bd_addr, tx_phys, rx_phys, phy_options); 183 }; 184 }; 185 extern struct BTM_BleSetPhy BTM_BleSetPhy; 186 187 // Name: BTM_BleSetPrefConnParams 188 // Params: const RawAddress& bd_addr, uint16_t min_conn_int, uint16_t 189 // max_conn_int, uint16_t peripheral_latency, uint16_t supervision_tout Return: 190 // void 191 struct BTM_BleSetPrefConnParams { 192 std::function<void(const RawAddress& bd_addr, uint16_t min_conn_int, 193 uint16_t max_conn_int, uint16_t peripheral_latency, 194 uint16_t supervision_tout)> 195 body{[](const RawAddress& bd_addr, uint16_t min_conn_int, 196 uint16_t max_conn_int, uint16_t peripheral_latency, 197 uint16_t supervision_tout) {}}; operatorBTM_BleSetPrefConnParams198 void operator()(const RawAddress& bd_addr, uint16_t min_conn_int, 199 uint16_t max_conn_int, uint16_t peripheral_latency, 200 uint16_t supervision_tout) { 201 body(bd_addr, min_conn_int, max_conn_int, peripheral_latency, 202 supervision_tout); 203 }; 204 }; 205 extern struct BTM_BleSetPrefConnParams BTM_BleSetPrefConnParams; 206 207 // Name: BTM_BleVerifySignature 208 // Params: const RawAddress& bd_addr, uint8_t* p_orig, uint16_t len, uint32_t 209 // counter, uint8_t* p_comp Return: bool 210 struct BTM_BleVerifySignature { 211 static bool return_value; 212 std::function<bool(const RawAddress& bd_addr, uint8_t* p_orig, uint16_t len, 213 uint32_t counter, uint8_t* p_comp)> 214 body{[](const RawAddress& bd_addr, uint8_t* p_orig, uint16_t len, 215 uint32_t counter, uint8_t* p_comp) { return return_value; }}; operatorBTM_BleVerifySignature216 bool operator()(const RawAddress& bd_addr, uint8_t* p_orig, uint16_t len, 217 uint32_t counter, uint8_t* p_comp) { 218 return body(bd_addr, p_orig, len, counter, p_comp); 219 }; 220 }; 221 extern struct BTM_BleVerifySignature BTM_BleVerifySignature; 222 223 // Name: BTM_GetDeviceDHK 224 // Params: 225 // Return: const Octet16& 226 struct BTM_GetDeviceDHK { 227 static const Octet16 return_value; 228 std::function<const Octet16&()> body{ 229 // Explicit return type is needed otherwise it returns copy of object 230 []() -> const Octet16& { return return_value; }}; operatorBTM_GetDeviceDHK231 const Octet16& operator()() { return body(); }; 232 }; 233 extern struct BTM_GetDeviceDHK BTM_GetDeviceDHK; 234 235 // Name: BTM_GetDeviceEncRoot 236 // Params: 237 // Return: const Octet16& 238 struct BTM_GetDeviceEncRoot { 239 static const Octet16 return_value; 240 std::function<const Octet16&()> body{ 241 // Explicit return type is needed otherwise it returns copy of object 242 []() -> const Octet16& { return return_value; }}; operatorBTM_GetDeviceEncRoot243 const Octet16& operator()() { return body(); }; 244 }; 245 extern struct BTM_GetDeviceEncRoot BTM_GetDeviceEncRoot; 246 247 // Name: BTM_GetDeviceIDRoot 248 // Params: 249 // Return: const Octet16& 250 struct BTM_GetDeviceIDRoot { 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_GetDeviceIDRoot255 const Octet16& operator()() { return body(); }; 256 }; 257 extern struct BTM_GetDeviceIDRoot BTM_GetDeviceIDRoot; 258 259 // Name: BTM_ReadConnectedTransportAddress 260 // Params: RawAddress* remote_bda, tBT_TRANSPORT transport 261 // Return: bool 262 struct BTM_ReadConnectedTransportAddress { 263 static bool return_value; 264 std::function<bool(RawAddress* remote_bda, tBT_TRANSPORT transport)> body{ 265 [](RawAddress* remote_bda, tBT_TRANSPORT transport) { 266 return return_value; 267 }}; operatorBTM_ReadConnectedTransportAddress268 bool operator()(RawAddress* remote_bda, tBT_TRANSPORT transport) { 269 return body(remote_bda, transport); 270 }; 271 }; 272 extern struct BTM_ReadConnectedTransportAddress 273 BTM_ReadConnectedTransportAddress; 274 275 // Name: BTM_ReadDevInfo 276 // Params: const RawAddress& remote_bda, tBT_DEVICE_TYPE* p_dev_type, 277 // tBLE_ADDR_TYPE* p_addr_type Return: void 278 struct BTM_ReadDevInfo { 279 std::function<void(const RawAddress& remote_bda, tBT_DEVICE_TYPE* p_dev_type, 280 tBLE_ADDR_TYPE* p_addr_type)> 281 body{[](const RawAddress& remote_bda, tBT_DEVICE_TYPE* p_dev_type, 282 tBLE_ADDR_TYPE* p_addr_type) {}}; operatorBTM_ReadDevInfo283 void operator()(const RawAddress& remote_bda, tBT_DEVICE_TYPE* p_dev_type, 284 tBLE_ADDR_TYPE* p_addr_type) { 285 body(remote_bda, p_dev_type, p_addr_type); 286 }; 287 }; 288 extern struct BTM_ReadDevInfo BTM_ReadDevInfo; 289 290 // Name: BTM_SecAddBleDevice 291 // Params: const RawAddress& bd_addr, tBT_DEVICE_TYPE dev_type, tBLE_ADDR_TYPE 292 // addr_type Return: void 293 struct BTM_SecAddBleDevice { 294 std::function<void(const RawAddress& bd_addr, tBT_DEVICE_TYPE dev_type, 295 tBLE_ADDR_TYPE addr_type)> 296 body{[](const RawAddress& bd_addr, tBT_DEVICE_TYPE dev_type, 297 tBLE_ADDR_TYPE addr_type) {}}; operatorBTM_SecAddBleDevice298 void operator()(const RawAddress& bd_addr, tBT_DEVICE_TYPE dev_type, 299 tBLE_ADDR_TYPE addr_type) { 300 body(bd_addr, dev_type, addr_type); 301 }; 302 }; 303 extern struct BTM_SecAddBleDevice BTM_SecAddBleDevice; 304 305 // Name: BTM_GetRemoteDeviceName 306 // Params: const RawAddress& bd_addr, BD_NAME bd_name 307 // Return: bool 308 struct BTM_GetRemoteDeviceName { 309 static bool return_value; 310 std::function<bool(const RawAddress& bd_addr, BD_NAME bd_name)> body{ 311 [](const RawAddress& bd_addr, BD_NAME bd_name) { return return_value; }}; operatorBTM_GetRemoteDeviceName312 bool operator()(const RawAddress& bd_addr, BD_NAME bd_name) { 313 return body(bd_addr, bd_name); 314 }; 315 }; 316 extern struct BTM_GetRemoteDeviceName BTM_GetRemoteDeviceName; 317 318 // Name: BTM_SecAddBleKey 319 // Params: const RawAddress& bd_addr, tBTM_LE_KEY_VALUE* p_le_key, 320 // tBTM_LE_KEY_TYPE key_type Return: void 321 struct BTM_SecAddBleKey { 322 std::function<void(const RawAddress& bd_addr, tBTM_LE_KEY_VALUE* p_le_key, 323 tBTM_LE_KEY_TYPE key_type)> 324 body{[](const RawAddress& bd_addr, tBTM_LE_KEY_VALUE* p_le_key, 325 tBTM_LE_KEY_TYPE key_type) {}}; operatorBTM_SecAddBleKey326 void operator()(const RawAddress& bd_addr, tBTM_LE_KEY_VALUE* p_le_key, 327 tBTM_LE_KEY_TYPE key_type) { 328 body(bd_addr, p_le_key, key_type); 329 }; 330 }; 331 extern struct BTM_SecAddBleKey BTM_SecAddBleKey; 332 333 // Name: BTM_SecurityGrant 334 // Params: const RawAddress& bd_addr, uint8_t res 335 // Return: void 336 struct BTM_SecurityGrant { 337 std::function<void(const RawAddress& bd_addr, uint8_t res)> body{ 338 [](const RawAddress& bd_addr, uint8_t res) {}}; operatorBTM_SecurityGrant339 void operator()(const RawAddress& bd_addr, uint8_t res) { 340 body(bd_addr, res); 341 }; 342 }; 343 extern struct BTM_SecurityGrant BTM_SecurityGrant; 344 345 // Name: BTM_SetBleDataLength 346 // Params: const RawAddress& bd_addr, uint16_t tx_pdu_length 347 // Return: tBTM_STATUS 348 struct BTM_SetBleDataLength { 349 static tBTM_STATUS return_value; 350 std::function<tBTM_STATUS(const RawAddress& bd_addr, uint16_t tx_pdu_length)> 351 body{[](const RawAddress& bd_addr, uint16_t tx_pdu_length) { 352 return return_value; 353 }}; operatorBTM_SetBleDataLength354 tBTM_STATUS operator()(const RawAddress& bd_addr, uint16_t tx_pdu_length) { 355 return body(bd_addr, tx_pdu_length); 356 }; 357 }; 358 extern struct BTM_SetBleDataLength BTM_SetBleDataLength; 359 360 // Name: BTM_UseLeLink 361 // Params: const RawAddress& bd_addr 362 // Return: bool 363 struct BTM_UseLeLink { 364 static bool return_value; 365 std::function<bool(const RawAddress& bd_addr)> body{ 366 [](const RawAddress& bd_addr) { return return_value; }}; operatorBTM_UseLeLink367 bool operator()(const RawAddress& bd_addr) { return body(bd_addr); }; 368 }; 369 extern struct BTM_UseLeLink BTM_UseLeLink; 370 371 // Name: btm_ble_br_keys_req 372 // Params: tBTM_SEC_DEV_REC* p_dev_rec, tBTM_LE_IO_REQ* p_data 373 // Return: uint8_t 374 struct btm_ble_br_keys_req { 375 static uint8_t return_value; 376 std::function<uint8_t(tBTM_SEC_DEV_REC* p_dev_rec, tBTM_LE_IO_REQ* p_data)> 377 body{[](tBTM_SEC_DEV_REC* p_dev_rec, tBTM_LE_IO_REQ* p_data) { 378 return return_value; 379 }}; operatorbtm_ble_br_keys_req380 uint8_t operator()(tBTM_SEC_DEV_REC* p_dev_rec, tBTM_LE_IO_REQ* p_data) { 381 return body(p_dev_rec, p_data); 382 }; 383 }; 384 extern struct btm_ble_br_keys_req btm_ble_br_keys_req; 385 386 // Name: btm_ble_connected 387 // Params: const RawAddress& bda, uint16_t handle, uint8_t enc_mode, uint8_t 388 // role, tBLE_ADDR_TYPE addr_type, bool addr_matched Return: void 389 struct btm_ble_connected { 390 std::function<void(const RawAddress& bda, uint16_t handle, uint8_t enc_mode, 391 uint8_t role, tBLE_ADDR_TYPE addr_type, bool addr_matched, 392 bool can_read_discoverable_characteristics)> 393 body{[](const RawAddress& bda, uint16_t handle, uint8_t enc_mode, 394 uint8_t role, tBLE_ADDR_TYPE addr_type, bool addr_matched, 395 bool can_read_discoverable_characteristics) {}}; operatorbtm_ble_connected396 void operator()(const RawAddress& bda, uint16_t handle, uint8_t enc_mode, 397 uint8_t role, tBLE_ADDR_TYPE addr_type, bool addr_matched, 398 bool can_read_discoverable_characteristics) { 399 body(bda, handle, enc_mode, role, addr_type, addr_matched, 400 can_read_discoverable_characteristics); 401 }; 402 }; 403 extern struct btm_ble_connected btm_ble_connected; 404 405 // Name: btm_ble_determine_security_act 406 // Params: bool is_originator, const RawAddress& bdaddr, uint16_t 407 // security_required Return: tBTM_SEC_ACTION 408 struct btm_ble_determine_security_act { 409 static tBTM_SEC_ACTION return_value; 410 std::function<tBTM_SEC_ACTION(bool is_originator, const RawAddress& bdaddr, 411 uint16_t security_required)> 412 body{[](bool is_originator, const RawAddress& bdaddr, 413 uint16_t security_required) { return return_value; }}; operatorbtm_ble_determine_security_act414 tBTM_SEC_ACTION operator()(bool is_originator, const RawAddress& bdaddr, 415 uint16_t security_required) { 416 return body(is_originator, bdaddr, security_required); 417 }; 418 }; 419 extern struct btm_ble_determine_security_act btm_ble_determine_security_act; 420 421 // Name: btm_ble_get_acl_remote_addr 422 // Params: uint16_t hci_handle, RawAddress& conn_addr, tBLE_ADDR_TYPE* 423 // p_addr_type Return: bool 424 struct btm_ble_get_acl_remote_addr { 425 static bool return_value; 426 std::function<bool(uint16_t hci_handle, RawAddress& conn_addr, 427 tBLE_ADDR_TYPE* p_addr_type)> 428 body{[](uint16_t hci_handle, RawAddress& conn_addr, 429 tBLE_ADDR_TYPE* p_addr_type) { return return_value; }}; operatorbtm_ble_get_acl_remote_addr430 bool operator()(uint16_t hci_handle, RawAddress& conn_addr, 431 tBLE_ADDR_TYPE* p_addr_type) { 432 return body(hci_handle, conn_addr, p_addr_type); 433 }; 434 }; 435 extern struct btm_ble_get_acl_remote_addr btm_ble_get_acl_remote_addr; 436 437 // Name: btm_ble_get_enc_key_type 438 // Params: const RawAddress& bd_addr, uint8_t* p_key_types 439 // Return: bool 440 struct btm_ble_get_enc_key_type { 441 static bool return_value; 442 std::function<bool(const RawAddress& bd_addr, uint8_t* p_key_types)> body{ 443 [](const RawAddress& bd_addr, uint8_t* p_key_types) { 444 return return_value; 445 }}; operatorbtm_ble_get_enc_key_type446 bool operator()(const RawAddress& bd_addr, uint8_t* p_key_types) { 447 return body(bd_addr, p_key_types); 448 }; 449 }; 450 extern struct btm_ble_get_enc_key_type btm_ble_get_enc_key_type; 451 452 // Name: btm_ble_increment_sign_ctr 453 // Params: const RawAddress& bd_addr, bool is_local 454 // Return: void 455 struct btm_ble_increment_sign_ctr { 456 std::function<void(const RawAddress& bd_addr, bool is_local)> body{ 457 [](const RawAddress& bd_addr, bool is_local) {}}; operatorbtm_ble_increment_sign_ctr458 void operator()(const RawAddress& bd_addr, bool is_local) { 459 body(bd_addr, is_local); 460 }; 461 }; 462 extern struct btm_ble_increment_sign_ctr btm_ble_increment_sign_ctr; 463 464 // Name: btm_ble_io_capabilities_req 465 // Params: tBTM_SEC_DEV_REC* p_dev_rec, tBTM_LE_IO_REQ* p_data 466 // Return: uint8_t 467 struct btm_ble_io_capabilities_req { 468 static uint8_t return_value; 469 std::function<uint8_t(tBTM_SEC_DEV_REC* p_dev_rec, tBTM_LE_IO_REQ* p_data)> 470 body{[](tBTM_SEC_DEV_REC* p_dev_rec, tBTM_LE_IO_REQ* p_data) { 471 return return_value; 472 }}; operatorbtm_ble_io_capabilities_req473 uint8_t operator()(tBTM_SEC_DEV_REC* p_dev_rec, tBTM_LE_IO_REQ* p_data) { 474 return body(p_dev_rec, p_data); 475 }; 476 }; 477 extern struct btm_ble_io_capabilities_req btm_ble_io_capabilities_req; 478 479 // Name: btm_ble_link_encrypted 480 // Params: const RawAddress& bd_addr, uint8_t encr_enable 481 // Return: void 482 struct btm_ble_link_encrypted { 483 std::function<void(const RawAddress& bd_addr, uint8_t encr_enable)> body{ 484 [](const RawAddress& bd_addr, uint8_t encr_enable) {}}; operatorbtm_ble_link_encrypted485 void operator()(const RawAddress& bd_addr, uint8_t encr_enable) { 486 body(bd_addr, encr_enable); 487 }; 488 }; 489 extern struct btm_ble_link_encrypted btm_ble_link_encrypted; 490 491 // Name: btm_ble_link_sec_check 492 // Params: const RawAddress& bd_addr, tBTM_LE_AUTH_REQ auth_req, 493 // tBTM_BLE_SEC_REQ_ACT* p_sec_req_act Return: void 494 struct btm_ble_link_sec_check { 495 std::function<void(const RawAddress& bd_addr, tBTM_LE_AUTH_REQ auth_req, 496 tBTM_BLE_SEC_REQ_ACT* p_sec_req_act)> 497 body{[](const RawAddress& bd_addr, tBTM_LE_AUTH_REQ auth_req, 498 tBTM_BLE_SEC_REQ_ACT* p_sec_req_act) {}}; operatorbtm_ble_link_sec_check499 void operator()(const RawAddress& bd_addr, tBTM_LE_AUTH_REQ auth_req, 500 tBTM_BLE_SEC_REQ_ACT* p_sec_req_act) { 501 body(bd_addr, auth_req, p_sec_req_act); 502 }; 503 }; 504 extern struct btm_ble_link_sec_check btm_ble_link_sec_check; 505 506 // Name: btm_ble_ltk_request 507 // Params: uint16_t handle, uint8_t rand[8], uint16_t ediv 508 // Return: void 509 struct btm_ble_ltk_request { 510 std::function<void(uint16_t handle, uint8_t* rand, uint16_t ediv)> body{ 511 [](uint16_t handle, uint8_t* rand, uint16_t ediv) {}}; operatorbtm_ble_ltk_request512 void operator()(uint16_t handle, uint8_t* rand, uint16_t ediv) { 513 body(handle, rand, ediv); 514 }; 515 }; 516 extern struct btm_ble_ltk_request btm_ble_ltk_request; 517 518 // Name: btm_ble_ltk_request_reply 519 // Params: const RawAddress& bda, bool use_stk, const Octet16& stk 520 // Return: void 521 struct btm_ble_ltk_request_reply { 522 std::function<void(const RawAddress& bda, bool use_stk, const Octet16& stk)> 523 body{[](const RawAddress& bda, bool use_stk, const Octet16& stk) {}}; operatorbtm_ble_ltk_request_reply524 void operator()(const RawAddress& bda, bool use_stk, const Octet16& stk) { 525 body(bda, use_stk, stk); 526 }; 527 }; 528 extern struct btm_ble_ltk_request_reply btm_ble_ltk_request_reply; 529 530 // Name: btm_ble_rand_enc_complete 531 // Params: uint8_t* p, uint16_t op_code, tBTM_RAND_ENC_CB* p_enc_cplt_cback 532 // Return: void 533 struct btm_ble_rand_enc_complete { 534 std::function<void(uint8_t* p, uint16_t evt_len, uint16_t op_code, 535 tBTM_RAND_ENC_CB* p_enc_cplt_cback)> 536 body{[](uint8_t* p, uint16_t evt_len, uint16_t op_code, 537 tBTM_RAND_ENC_CB* p_enc_cplt_cback) {}}; operatorbtm_ble_rand_enc_complete538 void operator()(uint8_t* p, uint16_t evt_len, uint16_t op_code, 539 tBTM_RAND_ENC_CB* p_enc_cplt_cback) { 540 body(p, evt_len, op_code, p_enc_cplt_cback); 541 }; 542 }; 543 extern struct btm_ble_rand_enc_complete btm_ble_rand_enc_complete; 544 545 // Name: btm_ble_read_sec_key_size 546 // Params: const RawAddress& bd_addr 547 // Return: uint8_t 548 struct btm_ble_read_sec_key_size { 549 static uint8_t return_value; 550 std::function<uint8_t(const RawAddress& bd_addr)> body{ 551 [](const RawAddress& bd_addr) { return return_value; }}; operatorbtm_ble_read_sec_key_size552 uint8_t operator()(const RawAddress& bd_addr) { return body(bd_addr); }; 553 }; 554 extern struct btm_ble_read_sec_key_size btm_ble_read_sec_key_size; 555 556 // Name: btm_ble_reset_id 557 // Params: void 558 // Return: void 559 struct btm_ble_reset_id { 560 std::function<void(void)> body{[](void) {}}; operatorbtm_ble_reset_id561 void operator()(void) { body(); }; 562 }; 563 extern struct btm_ble_reset_id btm_ble_reset_id; 564 565 // Name: btm_ble_set_encryption 566 // Params: const RawAddress& bd_addr, tBTM_BLE_SEC_ACT sec_act, uint8_t 567 // link_role Return: tBTM_STATUS 568 struct btm_ble_set_encryption { 569 static tBTM_STATUS return_value; 570 std::function<tBTM_STATUS(const RawAddress& bd_addr, tBTM_BLE_SEC_ACT sec_act, 571 uint8_t link_role)> 572 body{[](const RawAddress& bd_addr, tBTM_BLE_SEC_ACT sec_act, 573 uint8_t link_role) { return return_value; }}; operatorbtm_ble_set_encryption574 tBTM_STATUS operator()(const RawAddress& bd_addr, tBTM_BLE_SEC_ACT sec_act, 575 uint8_t link_role) { 576 return body(bd_addr, sec_act, link_role); 577 }; 578 }; 579 extern struct btm_ble_set_encryption btm_ble_set_encryption; 580 581 // Name: btm_ble_set_keep_rfu_in_auth_req 582 // Params: bool keep_rfu 583 // Return: void 584 struct btm_ble_set_keep_rfu_in_auth_req { 585 std::function<void(bool keep_rfu)> body{[](bool keep_rfu) {}}; operatorbtm_ble_set_keep_rfu_in_auth_req586 void operator()(bool keep_rfu) { body(keep_rfu); }; 587 }; 588 extern struct btm_ble_set_keep_rfu_in_auth_req btm_ble_set_keep_rfu_in_auth_req; 589 590 // Name: btm_ble_set_no_disc_if_pair_fail 591 // Params: bool disable_disc 592 // Return: void 593 struct btm_ble_set_no_disc_if_pair_fail { 594 std::function<void(bool disable_disc)> body{[](bool disable_disc) {}}; operatorbtm_ble_set_no_disc_if_pair_fail595 void operator()(bool disable_disc) { body(disable_disc); }; 596 }; 597 extern struct btm_ble_set_no_disc_if_pair_fail btm_ble_set_no_disc_if_pair_fail; 598 599 // Name: btm_ble_set_test_local_sign_cntr_value 600 // Params: bool enable, uint32_t test_local_sign_cntr 601 // Return: void 602 struct btm_ble_set_test_local_sign_cntr_value { 603 std::function<void(bool enable, uint32_t test_local_sign_cntr)> body{ 604 [](bool enable, uint32_t test_local_sign_cntr) {}}; operatorbtm_ble_set_test_local_sign_cntr_value605 void operator()(bool enable, uint32_t test_local_sign_cntr) { 606 body(enable, test_local_sign_cntr); 607 }; 608 }; 609 extern struct btm_ble_set_test_local_sign_cntr_value 610 btm_ble_set_test_local_sign_cntr_value; 611 612 // Name: btm_ble_set_test_mac_value 613 // Params: bool enable, uint8_t* p_test_mac_val 614 // Return: void 615 struct btm_ble_set_test_mac_value { 616 std::function<void(bool enable, uint8_t* p_test_mac_val)> body{ 617 [](bool enable, uint8_t* p_test_mac_val) {}}; operatorbtm_ble_set_test_mac_value618 void operator()(bool enable, uint8_t* p_test_mac_val) { 619 body(enable, p_test_mac_val); 620 }; 621 }; 622 extern struct btm_ble_set_test_mac_value btm_ble_set_test_mac_value; 623 624 // Name: btm_ble_start_encrypt 625 // Params: const RawAddress& bda, bool use_stk, Octet16* p_stk 626 // Return: tBTM_STATUS 627 struct btm_ble_start_encrypt { 628 static tBTM_STATUS return_value; 629 std::function<tBTM_STATUS(const RawAddress& bda, bool use_stk, 630 Octet16* p_stk)> 631 body{[](const RawAddress& bda, bool use_stk, Octet16* p_stk) { 632 return return_value; 633 }}; operatorbtm_ble_start_encrypt634 tBTM_STATUS operator()(const RawAddress& bda, bool use_stk, Octet16* p_stk) { 635 return body(bda, use_stk, p_stk); 636 }; 637 }; 638 extern struct btm_ble_start_encrypt btm_ble_start_encrypt; 639 640 // Name: btm_ble_start_sec_check 641 // Params: const RawAddress& bd_addr, uint16_t psm, bool is_originator, 642 // tBTM_SEC_CALLBACK* p_callback, void* p_ref_data Return: tL2CAP_LE_RESULT_CODE 643 struct btm_ble_start_sec_check { 644 static tL2CAP_LE_RESULT_CODE return_value; 645 std::function<tL2CAP_LE_RESULT_CODE( 646 const RawAddress& bd_addr, uint16_t psm, bool is_originator, 647 tBTM_SEC_CALLBACK* p_callback, void* p_ref_data)> 648 body{[](const RawAddress& bd_addr, uint16_t psm, bool is_originator, 649 tBTM_SEC_CALLBACK* p_callback, 650 void* p_ref_data) { return return_value; }}; operatorbtm_ble_start_sec_check651 tL2CAP_LE_RESULT_CODE operator()(const RawAddress& bd_addr, uint16_t psm, 652 bool is_originator, 653 tBTM_SEC_CALLBACK* p_callback, 654 void* p_ref_data) { 655 return body(bd_addr, psm, is_originator, p_callback, p_ref_data); 656 }; 657 }; 658 extern struct btm_ble_start_sec_check btm_ble_start_sec_check; 659 660 // Name: btm_ble_test_command_complete 661 // Params: uint8_t* p 662 // Return: void 663 struct btm_ble_test_command_complete { 664 std::function<void(uint8_t* p)> body{[](uint8_t* p) {}}; operatorbtm_ble_test_command_complete665 void operator()(uint8_t* p) { body(p); }; 666 }; 667 extern struct btm_ble_test_command_complete btm_ble_test_command_complete; 668 669 // Name: btm_ble_update_sec_key_size 670 // Params: const RawAddress& bd_addr, uint8_t enc_key_size 671 // Return: void 672 struct btm_ble_update_sec_key_size { 673 std::function<void(const RawAddress& bd_addr, uint8_t enc_key_size)> body{ 674 [](const RawAddress& bd_addr, uint8_t enc_key_size) {}}; operatorbtm_ble_update_sec_key_size675 void operator()(const RawAddress& bd_addr, uint8_t enc_key_size) { 676 body(bd_addr, enc_key_size); 677 }; 678 }; 679 extern struct btm_ble_update_sec_key_size btm_ble_update_sec_key_size; 680 681 // Name: btm_get_local_div 682 // Params: const RawAddress& bd_addr, uint16_t* p_div 683 // Return: bool 684 struct btm_get_local_div { 685 static bool return_value; 686 std::function<bool(const RawAddress& bd_addr, uint16_t* p_div)> body{ 687 [](const RawAddress& bd_addr, uint16_t* p_div) { return return_value; }}; operatorbtm_get_local_div688 bool operator()(const RawAddress& bd_addr, uint16_t* p_div) { 689 return body(bd_addr, p_div); 690 }; 691 }; 692 extern struct btm_get_local_div btm_get_local_div; 693 694 // Name: btm_proc_smp_cback 695 // Params: tSMP_EVT event, const RawAddress& bd_addr, const tSMP_EVT_DATA* 696 // p_data Return: tBTM_STATUS 697 struct btm_proc_smp_cback { 698 static tBTM_STATUS return_value; 699 std::function<tBTM_STATUS(tSMP_EVT event, const RawAddress& bd_addr, 700 const tSMP_EVT_DATA* p_data)> 701 body{[](tSMP_EVT event, const RawAddress& bd_addr, 702 const tSMP_EVT_DATA* p_data) { return return_value; }}; operatorbtm_proc_smp_cback703 tBTM_STATUS operator()(tSMP_EVT event, const RawAddress& bd_addr, 704 const tSMP_EVT_DATA* p_data) { 705 return body(event, bd_addr, p_data); 706 }; 707 }; 708 extern struct btm_proc_smp_cback btm_proc_smp_cback; 709 710 // Name: btm_sec_save_le_key 711 // Params: const RawAddress& bd_addr, tBTM_LE_KEY_TYPE key_type, 712 // tBTM_LE_KEY_VALUE* p_keys, bool pass_to_application Return: void 713 struct btm_sec_save_le_key { 714 std::function<void(const RawAddress& bd_addr, tBTM_LE_KEY_TYPE key_type, 715 tBTM_LE_KEY_VALUE* p_keys, bool pass_to_application)> 716 body{[](const RawAddress& bd_addr, tBTM_LE_KEY_TYPE key_type, 717 tBTM_LE_KEY_VALUE* p_keys, bool pass_to_application) {}}; operatorbtm_sec_save_le_key718 void operator()(const RawAddress& bd_addr, tBTM_LE_KEY_TYPE key_type, 719 tBTM_LE_KEY_VALUE* p_keys, bool pass_to_application) { 720 body(bd_addr, key_type, p_keys, pass_to_application); 721 }; 722 }; 723 extern struct btm_sec_save_le_key btm_sec_save_le_key; 724 725 // Name: doNothing 726 // Params: uint8_t* data, uint16_t len 727 // Return: void 728 struct doNothing { 729 std::function<void(uint8_t* data, uint16_t len)> body{ 730 [](uint8_t* data, uint16_t len) {}}; operatordoNothing731 void operator()(uint8_t* data, uint16_t len) { body(data, len); }; 732 }; 733 extern struct doNothing doNothing; 734 735 // Name: read_phy_cb 736 // Params: base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status 737 // Return: void 738 struct read_phy_cb { 739 std::function<void( 740 base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)> 741 callback, 742 uint8_t* data, uint16_t len)> 743 body{[](base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, 744 uint8_t status)> 745 callback, 746 uint8_t* data, uint16_t len) {}}; operatorread_phy_cb747 void operator()( 748 base::Callback<void(uint8_t tx_phy, uint8_t rx_phy, uint8_t status)> 749 callback, 750 uint8_t* data, uint16_t len) { 751 body(callback, data, len); 752 }; 753 }; 754 extern struct read_phy_cb read_phy_cb; 755 756 } // namespace stack_btm_ble 757 } // namespace mock 758 } // namespace test 759 760 // END mockcify generation 761