1 /* 2 * Copyright 2023 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:66 21 * 22 * mockcify.pl ver 0.6.0 23 */ 24 25 #include <cstdint> 26 #include <functional> 27 #include <string> 28 29 // Original included files, if any 30 #include "stack/btm/security_device_record.h" 31 #include "stack/include/bt_dev_class.h" 32 #include "stack/include/bt_device_type.h" 33 #include "stack/include/btm_status.h" 34 #include "stack/include/hci_error_code.h" 35 #include "stack/include/security_client_callbacks.h" 36 #include "types/bt_transport.h" 37 #include "types/hci_role.h" 38 #include "types/raw_address.h" 39 40 // Original usings 41 42 // Mocked compile conditionals, if any 43 44 namespace test { 45 namespace mock { 46 namespace stack_btm_sec { 47 48 // Name: BTM_CanReadDiscoverableCharacteristics 49 // Params: const RawAddress& bd_addr 50 // Return: bool 51 struct BTM_CanReadDiscoverableCharacteristics { 52 static bool return_value; 53 std::function<bool(const RawAddress& bd_addr)> body{ 54 [](const RawAddress& /* bd_addr */) { return return_value; }}; operatorBTM_CanReadDiscoverableCharacteristics55 bool operator()(const RawAddress& bd_addr) { return body(bd_addr); }; 56 }; 57 extern struct BTM_CanReadDiscoverableCharacteristics 58 BTM_CanReadDiscoverableCharacteristics; 59 60 // Name: BTM_ConfirmReqReply 61 // Params: tBTM_STATUS res, const RawAddress& bd_addr 62 // Return: void 63 struct BTM_ConfirmReqReply { 64 std::function<void(tBTM_STATUS res, const RawAddress& bd_addr)> body{ 65 [](tBTM_STATUS /* res */, const RawAddress& /* bd_addr */) {}}; operatorBTM_ConfirmReqReply66 void operator()(tBTM_STATUS res, const RawAddress& bd_addr) { 67 body(res, bd_addr); 68 }; 69 }; 70 extern struct BTM_ConfirmReqReply BTM_ConfirmReqReply; 71 72 // Name: BTM_GetPeerDeviceTypeFromFeatures 73 // Params: const RawAddress& bd_addr 74 // Return: tBT_DEVICE_TYPE 75 struct BTM_GetPeerDeviceTypeFromFeatures { 76 static tBT_DEVICE_TYPE return_value; 77 std::function<tBT_DEVICE_TYPE(const RawAddress& bd_addr)> body{ 78 [](const RawAddress& /* bd_addr */) { return return_value; }}; operatorBTM_GetPeerDeviceTypeFromFeatures79 tBT_DEVICE_TYPE operator()(const RawAddress& bd_addr) { 80 return body(bd_addr); 81 }; 82 }; 83 extern struct BTM_GetPeerDeviceTypeFromFeatures 84 BTM_GetPeerDeviceTypeFromFeatures; 85 86 // Name: BTM_IsAuthenticated 87 // Params: const RawAddress& bd_addr, tBT_TRANSPORT transport 88 // Return: bool 89 struct BTM_IsAuthenticated { 90 static bool return_value; 91 std::function<bool(const RawAddress& bd_addr, tBT_TRANSPORT transport)> body{ 92 [](const RawAddress& /* bd_addr */, tBT_TRANSPORT /* transport */) { 93 return return_value; 94 }}; operatorBTM_IsAuthenticated95 bool operator()(const RawAddress& bd_addr, tBT_TRANSPORT transport) { 96 return body(bd_addr, transport); 97 }; 98 }; 99 extern struct BTM_IsAuthenticated BTM_IsAuthenticated; 100 101 // Name: BTM_IsEncrypted 102 // Params: const RawAddress& bd_addr, tBT_TRANSPORT transport 103 // Return: bool 104 struct BTM_IsEncrypted { 105 static bool return_value; 106 std::function<bool(const RawAddress& bd_addr, tBT_TRANSPORT transport)> body{ 107 [](const RawAddress& /* bd_addr */, tBT_TRANSPORT /* transport */) { 108 return return_value; 109 }}; operatorBTM_IsEncrypted110 bool operator()(const RawAddress& bd_addr, tBT_TRANSPORT transport) { 111 return body(bd_addr, transport); 112 }; 113 }; 114 extern struct BTM_IsEncrypted BTM_IsEncrypted; 115 116 // Name: BTM_IsLinkKeyAuthed 117 // Params: const RawAddress& bd_addr, tBT_TRANSPORT transport 118 // Return: bool 119 struct BTM_IsLinkKeyAuthed { 120 static bool return_value; 121 std::function<bool(const RawAddress& bd_addr, tBT_TRANSPORT transport)> body{ 122 [](const RawAddress& /* bd_addr */, tBT_TRANSPORT /* transport */) { 123 return return_value; 124 }}; operatorBTM_IsLinkKeyAuthed125 bool operator()(const RawAddress& bd_addr, tBT_TRANSPORT transport) { 126 return body(bd_addr, transport); 127 }; 128 }; 129 extern struct BTM_IsLinkKeyAuthed BTM_IsLinkKeyAuthed; 130 131 // Name: BTM_IsLinkKeyKnown 132 // Params: const RawAddress& bd_addr, tBT_TRANSPORT transport 133 // Return: bool 134 struct BTM_IsLinkKeyKnown { 135 static bool return_value; 136 std::function<bool(const RawAddress& bd_addr, tBT_TRANSPORT transport)> body{ 137 [](const RawAddress& /* bd_addr */, tBT_TRANSPORT /* transport */) { 138 return return_value; 139 }}; operatorBTM_IsLinkKeyKnown140 bool operator()(const RawAddress& bd_addr, tBT_TRANSPORT transport) { 141 return body(bd_addr, transport); 142 }; 143 }; 144 extern struct BTM_IsLinkKeyKnown BTM_IsLinkKeyKnown; 145 146 // Name: BTM_PINCodeReply 147 // Params: const RawAddress& bd_addr, tBTM_STATUS res, uint8_t pin_len, uint8_t* 148 // p_pin Return: void 149 struct BTM_PINCodeReply { 150 std::function<void(const RawAddress& bd_addr, tBTM_STATUS res, 151 uint8_t pin_len, uint8_t* p_pin)> 152 body{[](const RawAddress& /* bd_addr */, tBTM_STATUS /* res */, 153 uint8_t /* pin_len */, uint8_t* /* p_pin */) {}}; operatorBTM_PINCodeReply154 void operator()(const RawAddress& bd_addr, tBTM_STATUS res, uint8_t pin_len, 155 uint8_t* p_pin) { 156 body(bd_addr, res, pin_len, p_pin); 157 }; 158 }; 159 extern struct BTM_PINCodeReply BTM_PINCodeReply; 160 161 // Name: BTM_PasskeyReqReply 162 // Params: tBTM_STATUS res, const RawAddress& bd_addr, uint32_t passkey 163 // Return: void 164 struct BTM_PasskeyReqReply { 165 std::function<void(tBTM_STATUS res, const RawAddress& bd_addr, 166 uint32_t passkey)> 167 body{[](tBTM_STATUS /* res */, const RawAddress& /* bd_addr */, 168 uint32_t /* passkey */) {}}; operatorBTM_PasskeyReqReply169 void operator()(tBTM_STATUS res, const RawAddress& bd_addr, 170 uint32_t passkey) { 171 body(res, bd_addr, passkey); 172 }; 173 }; 174 extern struct BTM_PasskeyReqReply BTM_PasskeyReqReply; 175 176 // Name: BTM_PeerSupportsSecureConnections 177 // Params: const RawAddress& bd_addr 178 // Return: bool 179 struct BTM_PeerSupportsSecureConnections { 180 static bool return_value; 181 std::function<bool(const RawAddress& bd_addr)> body{ 182 [](const RawAddress& /* bd_addr */) { return return_value; }}; operatorBTM_PeerSupportsSecureConnections183 bool operator()(const RawAddress& bd_addr) { return body(bd_addr); }; 184 }; 185 extern struct BTM_PeerSupportsSecureConnections 186 BTM_PeerSupportsSecureConnections; 187 188 // Name: BTM_ReadLocalOobData 189 // Params: void 190 // Return: void 191 struct BTM_ReadLocalOobData { 192 std::function<void(void)> body{[](void) {}}; operatorBTM_ReadLocalOobData193 void operator()(void) { body(); }; 194 }; 195 extern struct BTM_ReadLocalOobData BTM_ReadLocalOobData; 196 197 // Name: BTM_RemoteOobDataReply 198 // Params: tBTM_STATUS res, const RawAddress& bd_addr, const Octet16& c, const 199 // Octet16& r Return: void 200 struct BTM_RemoteOobDataReply { 201 std::function<void(tBTM_STATUS res, const RawAddress& bd_addr, 202 const Octet16& c, const Octet16& r)> 203 body{[](tBTM_STATUS /* res */, const RawAddress& /* bd_addr */, 204 const Octet16& /* c */, const Octet16& /* r */) {}}; operatorBTM_RemoteOobDataReply205 void operator()(tBTM_STATUS res, const RawAddress& bd_addr, const Octet16& c, 206 const Octet16& r) { 207 body(res, bd_addr, c, r); 208 }; 209 }; 210 extern struct BTM_RemoteOobDataReply BTM_RemoteOobDataReply; 211 212 // Name: BTM_SecAddRmtNameNotifyCallback 213 // Params: tBTM_RMT_NAME_CALLBACK* p_callback 214 // Return: bool 215 struct BTM_SecAddRmtNameNotifyCallback { 216 static bool return_value; 217 std::function<bool(tBTM_RMT_NAME_CALLBACK* p_callback)> body{ 218 [](tBTM_RMT_NAME_CALLBACK* /* p_callback */) { return return_value; }}; operatorBTM_SecAddRmtNameNotifyCallback219 bool operator()(tBTM_RMT_NAME_CALLBACK* p_callback) { 220 return body(p_callback); 221 }; 222 }; 223 extern struct BTM_SecAddRmtNameNotifyCallback BTM_SecAddRmtNameNotifyCallback; 224 225 // Name: BTM_SecBond 226 // Params: const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type, tBT_TRANSPORT 227 // transport, tBT_DEVICE_TYPE device_type, uint8_t pin_len, uint8_t* p_pin 228 // Return: tBTM_STATUS 229 struct BTM_SecBond { 230 static tBTM_STATUS return_value; 231 std::function<tBTM_STATUS(const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type, 232 tBT_TRANSPORT transport, 233 tBT_DEVICE_TYPE device_type)> 234 body{[](const RawAddress& /* bd_addr */, tBLE_ADDR_TYPE /* addr_type */, 235 tBT_TRANSPORT /* transport */, 236 tBT_DEVICE_TYPE /* device_type */) { return return_value; }}; operatorBTM_SecBond237 tBTM_STATUS operator()(const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type, 238 tBT_TRANSPORT transport, tBT_DEVICE_TYPE device_type) { 239 return body(bd_addr, addr_type, transport, device_type); 240 }; 241 }; 242 extern struct BTM_SecBond BTM_SecBond; 243 244 // Name: BTM_SecBondCancel 245 // Params: const RawAddress& bd_addr 246 // Return: tBTM_STATUS 247 struct BTM_SecBondCancel { 248 static tBTM_STATUS return_value; 249 std::function<tBTM_STATUS(const RawAddress& bd_addr)> body{ 250 [](const RawAddress& /* bd_addr */) { return return_value; }}; operatorBTM_SecBondCancel251 tBTM_STATUS operator()(const RawAddress& bd_addr) { return body(bd_addr); }; 252 }; 253 extern struct BTM_SecBondCancel BTM_SecBondCancel; 254 255 // Name: BTM_SecClrService 256 // Params: uint8_t service_id 257 // Return: uint8_t 258 struct BTM_SecClrService { 259 static uint8_t return_value; 260 std::function<uint8_t(uint8_t service_id)> body{ 261 [](uint8_t /* service_id */) { return return_value; }}; operatorBTM_SecClrService262 uint8_t operator()(uint8_t service_id) { return body(service_id); }; 263 }; 264 extern struct BTM_SecClrService BTM_SecClrService; 265 266 // Name: BTM_SecClrServiceByPsm 267 // Params: uint16_t psm 268 // Return: uint8_t 269 struct BTM_SecClrServiceByPsm { 270 static uint8_t return_value; 271 std::function<uint8_t(uint16_t psm)> body{ 272 [](uint16_t /* psm */) { return return_value; }}; operatorBTM_SecClrServiceByPsm273 uint8_t operator()(uint16_t psm) { return body(psm); }; 274 }; 275 extern struct BTM_SecClrServiceByPsm BTM_SecClrServiceByPsm; 276 277 // Name: BTM_SecDeleteRmtNameNotifyCallback 278 // Params: tBTM_RMT_NAME_CALLBACK* p_callback 279 // Return: bool 280 struct BTM_SecDeleteRmtNameNotifyCallback { 281 static bool return_value; 282 std::function<bool(tBTM_RMT_NAME_CALLBACK* p_callback)> body{ 283 [](tBTM_RMT_NAME_CALLBACK* /* p_callback */) { return return_value; }}; operatorBTM_SecDeleteRmtNameNotifyCallback284 bool operator()(tBTM_RMT_NAME_CALLBACK* p_callback) { 285 return body(p_callback); 286 }; 287 }; 288 extern struct BTM_SecDeleteRmtNameNotifyCallback 289 BTM_SecDeleteRmtNameNotifyCallback; 290 291 // Name: BTM_SecGetDeviceLinkKeyType 292 // Params: const RawAddress& bd_addr 293 // Return: tBTM_LINK_KEY_TYPE 294 struct BTM_SecGetDeviceLinkKeyType { 295 static tBTM_LINK_KEY_TYPE return_value; 296 std::function<tBTM_LINK_KEY_TYPE(const RawAddress& bd_addr)> body{ 297 [](const RawAddress& /* bd_addr */) { return return_value; }}; operatorBTM_SecGetDeviceLinkKeyType298 tBTM_LINK_KEY_TYPE operator()(const RawAddress& bd_addr) { 299 return body(bd_addr); 300 }; 301 }; 302 extern struct BTM_SecGetDeviceLinkKeyType BTM_SecGetDeviceLinkKeyType; 303 304 // Name: BTM_SecIsSecurityPending 305 // Params: const RawAddress& bd_addr 306 // Return: bool 307 struct BTM_SecIsSecurityPending { 308 static bool return_value; 309 std::function<bool(const RawAddress& bd_addr)> body{ 310 [](const RawAddress& /* bd_addr */) { return return_value; }}; operatorBTM_SecIsSecurityPending311 bool operator()(const RawAddress& bd_addr) { return body(bd_addr); }; 312 }; 313 extern struct BTM_SecIsSecurityPending BTM_SecIsSecurityPending; 314 315 // Name: BTM_SecRegister 316 // Params: const tBTM_APPL_INFO* p_cb_info 317 // Return: bool 318 struct BTM_SecRegister { 319 static bool return_value; 320 std::function<bool(const tBTM_APPL_INFO* p_cb_info)> body{ 321 [](const tBTM_APPL_INFO* /* p_cb_info */) { return return_value; }}; operatorBTM_SecRegister322 bool operator()(const tBTM_APPL_INFO* p_cb_info) { return body(p_cb_info); }; 323 }; 324 extern struct BTM_SecRegister BTM_SecRegister; 325 326 // Name: BTM_SetEncryption 327 // Params: const RawAddress& bd_addr, tBT_TRANSPORT transport, 328 // tBTM_SEC_CALLBACK* p_callback, void* p_ref_data, tBTM_BLE_SEC_ACT sec_act 329 // Return: tBTM_STATUS 330 struct BTM_SetEncryption { 331 static tBTM_STATUS return_value; 332 std::function<tBTM_STATUS(const RawAddress& bd_addr, tBT_TRANSPORT transport, 333 tBTM_SEC_CALLBACK* p_callback, void* p_ref_data, 334 tBTM_BLE_SEC_ACT sec_act)> 335 body{[](const RawAddress& /* bd_addr */, tBT_TRANSPORT /* transport */, 336 tBTM_SEC_CALLBACK* /* p_callback */, void* /* p_ref_data */, 337 tBTM_BLE_SEC_ACT /* sec_act */) { return return_value; }}; operatorBTM_SetEncryption338 tBTM_STATUS operator()(const RawAddress& bd_addr, tBT_TRANSPORT transport, 339 tBTM_SEC_CALLBACK* p_callback, void* p_ref_data, 340 tBTM_BLE_SEC_ACT sec_act) { 341 return body(bd_addr, transport, p_callback, p_ref_data, sec_act); 342 }; 343 }; 344 extern struct BTM_SetEncryption BTM_SetEncryption; 345 346 // Name: BTM_SetPinType 347 // Params: uint8_t pin_type, PIN_CODE pin_code, uint8_t pin_code_len 348 // Return: void 349 struct BTM_SetPinType { 350 std::function<void(uint8_t pin_type, PIN_CODE pin_code, uint8_t pin_code_len)> 351 body{[](uint8_t /* pin_type */, PIN_CODE /* pin_code */, 352 uint8_t /* pin_code_len */) {}}; operatorBTM_SetPinType353 void operator()(uint8_t pin_type, PIN_CODE pin_code, uint8_t pin_code_len) { 354 body(pin_type, pin_code, pin_code_len); 355 }; 356 }; 357 extern struct BTM_SetPinType BTM_SetPinType; 358 359 // Name: BTM_SetSecurityLevel 360 // Params: bool is_originator, const char* p_name, uint8_t service_id, uint16_t 361 // sec_level, uint16_t psm, uint32_t mx_proto_id, uint32_t mx_chan_id Return: 362 // bool 363 struct BTM_SetSecurityLevel { 364 static bool return_value; 365 std::function<bool(bool is_originator, const char* p_name, uint8_t service_id, 366 uint16_t sec_level, uint16_t psm, uint32_t mx_proto_id, 367 uint32_t mx_chan_id)> 368 body{[](bool /* is_originator */, const char* /* p_name */, 369 uint8_t /* service_id */, uint16_t /* sec_level */, 370 uint16_t /* psm */, uint32_t /* mx_proto_id */, 371 uint32_t /* mx_chan_id */) { return return_value; }}; operatorBTM_SetSecurityLevel372 bool operator()(bool is_originator, const char* p_name, uint8_t service_id, 373 uint16_t sec_level, uint16_t psm, uint32_t mx_proto_id, 374 uint32_t mx_chan_id) { 375 return body(is_originator, p_name, service_id, sec_level, psm, mx_proto_id, 376 mx_chan_id); 377 }; 378 }; 379 extern struct BTM_SetSecurityLevel BTM_SetSecurityLevel; 380 381 // Name: BTM_update_version_info 382 // Params: const RawAddress& bd_addr, const remote_version_info& 383 // remote_version_info Return: void 384 struct BTM_update_version_info { 385 std::function<void(const RawAddress& bd_addr, 386 const remote_version_info& remote_version_info)> 387 body{[](const RawAddress& /* bd_addr */, 388 const remote_version_info& /* remote_version_info */) {}}; operatorBTM_update_version_info389 void operator()(const RawAddress& bd_addr, 390 const remote_version_info& remote_version_info) { 391 body(bd_addr, remote_version_info); 392 }; 393 }; 394 extern struct BTM_update_version_info BTM_update_version_info; 395 396 // Name: NotifyBondingCanceled 397 // Params: tBTM_STATUS btm_status 398 // Return: void 399 struct NotifyBondingCanceled { 400 std::function<void(tBTM_STATUS btm_status)> body{ 401 [](tBTM_STATUS /* btm_status */) {}}; operatorNotifyBondingCanceled402 void operator()(tBTM_STATUS btm_status) { body(btm_status); }; 403 }; 404 extern struct NotifyBondingCanceled NotifyBondingCanceled; 405 406 // Name: btm_create_conn_cancel_complete 407 // Params: uint8_t status, RawAddress bd_addr 408 // Return: void 409 struct btm_create_conn_cancel_complete { 410 std::function<void(uint8_t status, const RawAddress bd_addr)> body{ 411 [](uint8_t /* status */, const RawAddress /* bd_addr */) {}}; operatorbtm_create_conn_cancel_complete412 void operator()(uint8_t status, const RawAddress bd_addr) { 413 body(status, bd_addr); 414 }; 415 }; 416 extern struct btm_create_conn_cancel_complete btm_create_conn_cancel_complete; 417 418 // Name: btm_get_dev_class 419 // Params: const RawAddress& bda 420 // Return: DEV_CLASS 421 struct btm_get_dev_class { 422 static const DEV_CLASS return_value; 423 std::function<const DEV_CLASS(const RawAddress& bda)> body{ 424 [](const RawAddress& /* bda */) { return return_value; }}; operatorbtm_get_dev_class425 const DEV_CLASS operator()(const RawAddress& bda) { return body(bda); }; 426 }; 427 extern struct btm_get_dev_class btm_get_dev_class; 428 429 // Name: btm_io_capabilities_req 430 // Params: RawAddress p 431 // Return: void 432 struct btm_io_capabilities_req { 433 std::function<void(RawAddress p)> body{[](RawAddress /* p */) {}}; operatorbtm_io_capabilities_req434 void operator()(RawAddress p) { body(p); }; 435 }; 436 extern struct btm_io_capabilities_req btm_io_capabilities_req; 437 438 // Name: btm_io_capabilities_rsp 439 // Params: tBTM_SP_IO_RSP evt_data 440 // Return: void 441 struct btm_io_capabilities_rsp { 442 std::function<void(const tBTM_SP_IO_RSP evt_data)> body{ 443 [](const tBTM_SP_IO_RSP /* evt_data */) {}}; operatorbtm_io_capabilities_rsp444 void operator()(const tBTM_SP_IO_RSP evt_data) { body(evt_data); }; 445 }; 446 extern struct btm_io_capabilities_rsp btm_io_capabilities_rsp; 447 448 // Name: btm_proc_sp_req_evt 449 // Params: tBTM_SP_EVT event, const uint8_t* p 450 // Return: void 451 struct btm_proc_sp_req_evt { 452 std::function<void(tBTM_SP_EVT event, const RawAddress bda, uint32_t value)> 453 body{[](tBTM_SP_EVT /* event */, const RawAddress /* bda */, 454 uint32_t /* value */) {}}; operatorbtm_proc_sp_req_evt455 void operator()(tBTM_SP_EVT event, const RawAddress bda, uint32_t value) { 456 body(event, bda, value); 457 }; 458 }; 459 extern struct btm_proc_sp_req_evt btm_proc_sp_req_evt; 460 461 // Name: btm_read_local_oob_complete 462 // Params: 463 // tBTM_SP_LOC_OOB evt_data; 464 // uint8_t status; 465 // Return: void 466 struct btm_read_local_oob_complete { 467 std::function<void(const tBTM_SP_LOC_OOB evt_data)> body{ 468 [](const tBTM_SP_LOC_OOB /* evt_data */) {}}; operatorbtm_read_local_oob_complete469 void operator()(const tBTM_SP_LOC_OOB evt_data) { body(evt_data); }; 470 }; 471 extern struct btm_read_local_oob_complete btm_read_local_oob_complete; 472 473 // Name: btm_rem_oob_req 474 // Params: RawAddress bda 475 // Return: void 476 struct btm_rem_oob_req { 477 std::function<void(const RawAddress bda)> body{ 478 [](const RawAddress /* bda */) {}}; operatorbtm_rem_oob_req479 void operator()(const RawAddress bda) { body(bda); }; 480 }; 481 extern struct btm_rem_oob_req btm_rem_oob_req; 482 483 // Name: btm_sec_abort_access_req 484 // Params: const RawAddress& bd_addr 485 // Return: void 486 struct btm_sec_abort_access_req { 487 std::function<void(const RawAddress& bd_addr)> body{ 488 [](const RawAddress& /* bd_addr */) {}}; operatorbtm_sec_abort_access_req489 void operator()(const RawAddress& bd_addr) { body(bd_addr); }; 490 }; 491 extern struct btm_sec_abort_access_req btm_sec_abort_access_req; 492 493 // Name: btm_sec_auth_complete 494 // Params: uint16_t handle, tHCI_STATUS status 495 // Return: void 496 struct btm_sec_auth_complete { 497 std::function<void(uint16_t handle, tHCI_STATUS status)> body{ 498 [](uint16_t /* handle */, tHCI_STATUS /* status */) {}}; operatorbtm_sec_auth_complete499 void operator()(uint16_t handle, tHCI_STATUS status) { 500 body(handle, status); 501 }; 502 }; 503 extern struct btm_sec_auth_complete btm_sec_auth_complete; 504 505 // Name: btm_sec_bond_by_transport 506 // Params: const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type, tBT_TRANSPORT 507 // transport, uint8_t pin_len, uint8_t* p_pin Return: tBTM_STATUS 508 struct btm_sec_bond_by_transport { 509 static tBTM_STATUS return_value; 510 std::function<tBTM_STATUS(const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type, 511 tBT_TRANSPORT transport)> 512 body{[](const RawAddress& /* bd_addr */, tBLE_ADDR_TYPE /* addr_type */, 513 tBT_TRANSPORT /* transport */) { return return_value; }}; operatorbtm_sec_bond_by_transport514 tBTM_STATUS operator()(const RawAddress& bd_addr, tBLE_ADDR_TYPE addr_type, 515 tBT_TRANSPORT transport) { 516 return body(bd_addr, addr_type, transport); 517 }; 518 }; 519 extern struct btm_sec_bond_by_transport btm_sec_bond_by_transport; 520 521 // Name: btm_sec_check_pending_reqs 522 // Params: void 523 // Return: void 524 struct btm_sec_check_pending_reqs { 525 std::function<void(void)> body{[](void) {}}; operatorbtm_sec_check_pending_reqs526 void operator()(void) { body(); }; 527 }; 528 extern struct btm_sec_check_pending_reqs btm_sec_check_pending_reqs; 529 530 // Name: btm_sec_clear_ble_keys 531 // Params: tBTM_SEC_DEV_REC* p_dev_rec 532 // Return: void 533 struct btm_sec_clear_ble_keys { 534 std::function<void(tBTM_SEC_DEV_REC* p_dev_rec)> body{ 535 [](tBTM_SEC_DEV_REC* /* p_dev_rec */) {}}; operatorbtm_sec_clear_ble_keys536 void operator()(tBTM_SEC_DEV_REC* p_dev_rec) { body(p_dev_rec); }; 537 }; 538 extern struct btm_sec_clear_ble_keys btm_sec_clear_ble_keys; 539 540 // Name: btm_sec_conn_req 541 // Params: const RawAddress& bda, const DEV_CLASS dc 542 // Return: void 543 struct btm_sec_conn_req { 544 std::function<void(const RawAddress& bda, const DEV_CLASS dc)> body{ 545 [](const RawAddress& /* bda */, const DEV_CLASS /* dc */) {}}; operatorbtm_sec_conn_req546 void operator()(const RawAddress& bda, const DEV_CLASS dc) { body(bda, dc); }; 547 }; 548 extern struct btm_sec_conn_req btm_sec_conn_req; 549 550 // Name: btm_sec_connected 551 // Params: const RawAddress& bda, uint16_t handle, tHCI_STATUS status, uint8_t 552 // enc_mode, tHCI_ROLE assigned_role Return: void 553 struct btm_sec_connected { 554 std::function<void(const RawAddress& bda, uint16_t handle, tHCI_STATUS status, 555 uint8_t enc_mode, tHCI_ROLE assigned_role)> 556 body{[](const RawAddress& /* bda */, uint16_t /* handle */, 557 tHCI_STATUS /* status */, uint8_t /* enc_mode */, 558 tHCI_ROLE /* assigned_role */) {}}; operatorbtm_sec_connected559 void operator()(const RawAddress& bda, uint16_t handle, tHCI_STATUS status, 560 uint8_t enc_mode, tHCI_ROLE assigned_role) { 561 body(bda, handle, status, enc_mode, assigned_role); 562 }; 563 }; 564 extern struct btm_sec_connected btm_sec_connected; 565 566 // Name: btm_sec_cr_loc_oob_data_cback_event 567 // Params: const RawAddress& address, tSMP_LOC_OOB_DATA loc_oob_data 568 // Return: void 569 struct btm_sec_cr_loc_oob_data_cback_event { 570 std::function<void(const RawAddress& address, tSMP_LOC_OOB_DATA loc_oob_data)> 571 body{[](const RawAddress& /* address */, 572 tSMP_LOC_OOB_DATA /* loc_oob_data */) {}}; operatorbtm_sec_cr_loc_oob_data_cback_event573 void operator()(const RawAddress& address, tSMP_LOC_OOB_DATA loc_oob_data) { 574 body(address, loc_oob_data); 575 }; 576 }; 577 extern struct btm_sec_cr_loc_oob_data_cback_event 578 btm_sec_cr_loc_oob_data_cback_event; 579 580 // Name: btm_sec_dev_rec_cback_event 581 // Params: tBTM_SEC_DEV_REC* p_dev_rec, tBTM_STATUS btm_status, bool 582 // is_le_transport Return: void 583 struct btm_sec_dev_rec_cback_event { 584 std::function<void(tBTM_SEC_DEV_REC* p_dev_rec, tBTM_STATUS btm_status, 585 bool is_le_transport)> 586 body{[](tBTM_SEC_DEV_REC* /* p_dev_rec */, tBTM_STATUS /* btm_status */, 587 bool /* is_le_transport */) {}}; operatorbtm_sec_dev_rec_cback_event588 void operator()(tBTM_SEC_DEV_REC* p_dev_rec, tBTM_STATUS btm_status, 589 bool is_le_transport) { 590 body(p_dev_rec, btm_status, is_le_transport); 591 }; 592 }; 593 extern struct btm_sec_dev_rec_cback_event btm_sec_dev_rec_cback_event; 594 595 // Name: btm_sec_dev_reset 596 // Params: void 597 // Return: void 598 struct btm_sec_dev_reset { 599 std::function<void(void)> body{[](void) {}}; operatorbtm_sec_dev_reset600 void operator()(void) { body(); }; 601 }; 602 extern struct btm_sec_dev_reset btm_sec_dev_reset; 603 604 // Name: btm_sec_disconnect 605 // Params: uint16_t handle, tHCI_STATUS reason, std::string comment 606 // Return: tBTM_STATUS 607 struct btm_sec_disconnect { 608 static tBTM_STATUS return_value; 609 std::function<tBTM_STATUS(uint16_t handle, tHCI_STATUS reason, 610 std::string comment)> 611 body{[](uint16_t /* handle */, tHCI_STATUS /* reason */, 612 std::string /* comment */) { return return_value; }}; operatorbtm_sec_disconnect613 tBTM_STATUS operator()(uint16_t handle, tHCI_STATUS reason, 614 std::string comment) { 615 return body(handle, reason, comment); 616 }; 617 }; 618 extern struct btm_sec_disconnect btm_sec_disconnect; 619 620 // Name: btm_sec_disconnected 621 // Params: uint16_t handle, tHCI_REASON reason, std::string comment 622 // Return: void 623 struct btm_sec_disconnected { 624 std::function<void(uint16_t handle, tHCI_REASON reason, std::string comment)> 625 body{[](uint16_t /* handle */, tHCI_REASON /* reason */, 626 std::string /* comment */) {}}; operatorbtm_sec_disconnected627 void operator()(uint16_t handle, tHCI_REASON reason, std::string comment) { 628 body(handle, reason, comment); 629 }; 630 }; 631 extern struct btm_sec_disconnected btm_sec_disconnected; 632 633 // Name: btm_sec_encrypt_change 634 // Params: uint16_t handle, tHCI_STATUS status, uint8_t encr_enable 635 // Return: void 636 struct btm_sec_encrypt_change { 637 std::function<void(uint16_t handle, tHCI_STATUS status, uint8_t encr_enable)> 638 body{[](uint16_t /* handle */, tHCI_STATUS /* status */, 639 uint8_t /* encr_enable */) {}}; operatorbtm_sec_encrypt_change640 void operator()(uint16_t handle, tHCI_STATUS status, uint8_t encr_enable) { 641 body(handle, status, encr_enable); 642 }; 643 }; 644 extern struct btm_sec_encrypt_change btm_sec_encrypt_change; 645 646 // Name: btm_sec_encryption_change_evt 647 // Params: uint16_t handle, tHCI_STATUS status, uint8_t encr_enable 648 // Return: void 649 struct btm_sec_encryption_change_evt { 650 std::function<void(uint16_t handle, tHCI_STATUS status, uint8_t encr_enable)> 651 body{[](uint16_t /* handle */, tHCI_STATUS /* status */, 652 uint8_t /* encr_enable */) {}}; operatorbtm_sec_encryption_change_evt653 void operator()(uint16_t handle, tHCI_STATUS status, uint8_t encr_enable) { 654 body(handle, status, encr_enable); 655 }; 656 }; 657 extern struct btm_sec_encryption_change_evt btm_sec_encryption_change_evt; 658 659 // Name: btm_sec_is_a_bonded_dev 660 // Params: const RawAddress& bda 661 // Return: bool 662 struct btm_sec_is_a_bonded_dev { 663 static bool return_value; 664 std::function<bool(const RawAddress& bda)> body{ 665 [](const RawAddress& /* bda */) { return return_value; }}; operatorbtm_sec_is_a_bonded_dev666 bool operator()(const RawAddress& bda) { return body(bda); }; 667 }; 668 extern struct btm_sec_is_a_bonded_dev btm_sec_is_a_bonded_dev; 669 670 // Name: btm_sec_l2cap_access_req 671 // Params: const RawAddress& bd_addr, uint16_t psm, bool is_originator, 672 // tBTM_SEC_CALLBACK* p_callback, void* p_ref_data Return: tBTM_STATUS 673 struct btm_sec_l2cap_access_req { 674 static tBTM_STATUS return_value; 675 std::function<tBTM_STATUS(const RawAddress& bd_addr, uint16_t psm, 676 bool is_originator, tBTM_SEC_CALLBACK* p_callback, 677 void* p_ref_data)> 678 body{[](const RawAddress& /* bd_addr */, uint16_t /* psm */, 679 bool /* is_originator */, tBTM_SEC_CALLBACK* /* p_callback */, 680 void* /* p_ref_data */) { return return_value; }}; operatorbtm_sec_l2cap_access_req681 tBTM_STATUS operator()(const RawAddress& bd_addr, uint16_t psm, 682 bool is_originator, tBTM_SEC_CALLBACK* p_callback, 683 void* p_ref_data) { 684 return body(bd_addr, psm, is_originator, p_callback, p_ref_data); 685 }; 686 }; 687 extern struct btm_sec_l2cap_access_req btm_sec_l2cap_access_req; 688 689 // Name: btm_sec_l2cap_access_req_by_requirement 690 // Params: const RawAddress& bd_addr, uint16_t security_required, bool 691 // is_originator, tBTM_SEC_CALLBACK* p_callback, void* p_ref_data Return: 692 // tBTM_STATUS 693 struct btm_sec_l2cap_access_req_by_requirement { 694 static tBTM_STATUS return_value; 695 std::function<tBTM_STATUS(const RawAddress& bd_addr, 696 uint16_t security_required, bool is_originator, 697 tBTM_SEC_CALLBACK* p_callback, void* p_ref_data)> 698 body{[](const RawAddress& /* bd_addr */, uint16_t /* security_required */, 699 bool /* is_originator */, tBTM_SEC_CALLBACK* /* p_callback */, 700 void* /* p_ref_data */) { return return_value; }}; operatorbtm_sec_l2cap_access_req_by_requirement701 tBTM_STATUS operator()(const RawAddress& bd_addr, uint16_t security_required, 702 bool is_originator, tBTM_SEC_CALLBACK* p_callback, 703 void* p_ref_data) { 704 return body(bd_addr, security_required, is_originator, p_callback, 705 p_ref_data); 706 }; 707 }; 708 extern struct btm_sec_l2cap_access_req_by_requirement 709 btm_sec_l2cap_access_req_by_requirement; 710 711 // Name: btm_sec_link_key_notification 712 // Params: const RawAddress& p_bda, const Octet16& link_key, uint8_t key_type 713 // Return: void 714 struct btm_sec_link_key_notification { 715 std::function<void(const RawAddress& p_bda, const Octet16& link_key, 716 uint8_t key_type)> 717 body{[](const RawAddress& /* p_bda */, const Octet16& /* link_key */, 718 uint8_t /* key_type */) {}}; operatorbtm_sec_link_key_notification719 void operator()(const RawAddress& p_bda, const Octet16& link_key, 720 uint8_t key_type) { 721 body(p_bda, link_key, key_type); 722 }; 723 }; 724 extern struct btm_sec_link_key_notification btm_sec_link_key_notification; 725 726 // Name: btm_sec_encryption_key_refresh_complete 727 // Params: uint16_t handle, tHCI_STATUS status 728 // Return: void 729 struct btm_sec_encryption_key_refresh_complete { 730 std::function<void(uint16_t handle, tHCI_STATUS status)> body{ 731 [](uint16_t /* handle */, tHCI_STATUS /* status */) -> void {}}; operatorbtm_sec_encryption_key_refresh_complete732 void operator()(uint16_t handle, tHCI_STATUS status) { 733 body(handle, status); 734 }; 735 }; 736 extern struct btm_sec_encryption_key_refresh_complete 737 btm_sec_encryption_key_refresh_complete; 738 739 // Name: btm_sec_link_key_request 740 // Params: const uint8_t* p_event 741 // Return: void 742 struct btm_sec_link_key_request { 743 std::function<void(const RawAddress bda)> body{ 744 [](const RawAddress /* bda */) {}}; operatorbtm_sec_link_key_request745 void operator()(const RawAddress bda) { body(bda); }; 746 }; 747 extern struct btm_sec_link_key_request btm_sec_link_key_request; 748 749 // Name: btm_sec_mx_access_request 750 // Params: const RawAddress& bd_addr, bool is_originator, uint16_t 751 // security_required, tBTM_SEC_CALLBACK* p_callback, void* p_ref_data Return: 752 // tBTM_STATUS 753 struct btm_sec_mx_access_request { 754 static tBTM_STATUS return_value; 755 std::function<tBTM_STATUS(const RawAddress& bd_addr, bool is_originator, 756 uint16_t security_required, 757 tBTM_SEC_CALLBACK* p_callback, void* p_ref_data)> 758 body{[](const RawAddress& /* bd_addr */, bool /* is_originator */, 759 uint16_t /* security_required */, 760 tBTM_SEC_CALLBACK* /* p_callback */, 761 void* /* p_ref_data */) { return return_value; }}; operatorbtm_sec_mx_access_request762 tBTM_STATUS operator()(const RawAddress& bd_addr, bool is_originator, 763 uint16_t security_required, 764 tBTM_SEC_CALLBACK* p_callback, void* p_ref_data) { 765 return body(bd_addr, is_originator, security_required, p_callback, 766 p_ref_data); 767 }; 768 }; 769 extern struct btm_sec_mx_access_request btm_sec_mx_access_request; 770 771 // Name: btm_sec_pin_code_request 772 // Params: const uint8_t* p_event 773 // Return: void 774 struct btm_sec_pin_code_request { 775 std::function<void(const RawAddress bda)> body{ 776 [](const RawAddress /* bda */) {}}; operatorbtm_sec_pin_code_request777 void operator()(const RawAddress bda) { body(bda); }; 778 }; 779 extern struct btm_sec_pin_code_request btm_sec_pin_code_request; 780 781 // Name: btm_sec_rmt_host_support_feat_evt 782 // Params: const uint8_t* p 783 // Return: void 784 struct btm_sec_rmt_host_support_feat_evt { 785 std::function<void(const RawAddress bd_addr, uint8_t features_0)> body{ 786 [](const RawAddress /* bd_addr */, uint8_t /* features_0 */) {}}; operatorbtm_sec_rmt_host_support_feat_evt787 void operator()(const RawAddress bd_addr, uint8_t features_0) { 788 body(bd_addr, features_0); 789 }; 790 }; 791 extern struct btm_sec_rmt_host_support_feat_evt 792 btm_sec_rmt_host_support_feat_evt; 793 794 // Name: btm_sec_rmt_name_request_complete 795 // Params: const RawAddress* p_bd_addr, const uint8_t* p_bd_name, tHCI_STATUS 796 // status Return: void 797 struct btm_sec_rmt_name_request_complete { 798 std::function<void(const RawAddress* p_bd_addr, const uint8_t* p_bd_name, 799 tHCI_STATUS status)> 800 body{[](const RawAddress* /* p_bd_addr */, const uint8_t* /* p_bd_name */, 801 tHCI_STATUS /* status */) {}}; operatorbtm_sec_rmt_name_request_complete802 void operator()(const RawAddress* p_bd_addr, const uint8_t* p_bd_name, 803 tHCI_STATUS status) { 804 body(p_bd_addr, p_bd_name, status); 805 }; 806 }; 807 extern struct btm_sec_rmt_name_request_complete 808 btm_sec_rmt_name_request_complete; 809 810 // Name: btm_sec_role_changed 811 // Params: tHCI_STATUS hci_status, const RawAddress& bd_addr, tHCI_ROLE new_role 812 // Return: void 813 struct btm_sec_role_changed { 814 std::function<void(tHCI_STATUS hci_status, const RawAddress& bd_addr, 815 tHCI_ROLE new_role)> 816 body{[](tHCI_STATUS /* hci_status */, const RawAddress& /* bd_addr */, 817 tHCI_ROLE /* new_role */) {}}; operatorbtm_sec_role_changed818 void operator()(tHCI_STATUS hci_status, const RawAddress& bd_addr, 819 tHCI_ROLE new_role) { 820 body(hci_status, bd_addr, new_role); 821 }; 822 }; 823 extern struct btm_sec_role_changed btm_sec_role_changed; 824 825 // Name: btm_sec_set_peer_sec_caps 826 // Params: uint16_t hci_handle, bool ssp_supported, bool sc_supported, bool 827 // hci_role_switch_supported, bool br_edr_supported, bool le_supported Return: 828 // void 829 struct btm_sec_set_peer_sec_caps { 830 std::function<void(uint16_t hci_handle, bool ssp_supported, bool sc_supported, 831 bool hci_role_switch_supported, bool br_edr_supported, 832 bool le_supported)> 833 body{[](uint16_t /* hci_handle */, bool /* ssp_supported */, 834 bool /* sc_supported */, bool /* hci_role_switch_supported */, 835 bool /* br_edr_supported */, bool /* le_supported */) {}}; operatorbtm_sec_set_peer_sec_caps836 void operator()(uint16_t hci_handle, bool ssp_supported, bool sc_supported, 837 bool hci_role_switch_supported, bool br_edr_supported, 838 bool le_supported) { 839 body(hci_handle, ssp_supported, sc_supported, hci_role_switch_supported, 840 br_edr_supported, le_supported); 841 }; 842 }; 843 extern struct btm_sec_set_peer_sec_caps btm_sec_set_peer_sec_caps; 844 845 // Name: btm_sec_update_clock_offset 846 // Params: uint16_t handle, uint16_t clock_offset 847 // Return: void 848 struct btm_sec_update_clock_offset { 849 std::function<void(uint16_t handle, uint16_t clock_offset)> body{ 850 [](uint16_t /* handle */, uint16_t /* clock_offset */) {}}; operatorbtm_sec_update_clock_offset851 void operator()(uint16_t handle, uint16_t clock_offset) { 852 body(handle, clock_offset); 853 }; 854 }; 855 extern struct btm_sec_update_clock_offset btm_sec_update_clock_offset; 856 857 // Name: btm_simple_pair_complete 858 // Params: RawAddress bd_addr, uint8_t status 859 // Return: void 860 struct btm_simple_pair_complete { 861 std::function<void(const RawAddress bd_addr, uint8_t status)> body{ 862 [](const RawAddress /* bd_addr */, uint8_t /* status */) {}}; operatorbtm_simple_pair_complete863 void operator()(const RawAddress bd_addr, uint8_t status) { 864 body(bd_addr, status); 865 }; 866 }; 867 extern struct btm_simple_pair_complete btm_simple_pair_complete; 868 869 // Name: BTM_IsRemoteNameKnown 870 // Params: const RawAddress& bd_addr, tBT_TRANSPORT transport 871 // Return: bool 872 struct BTM_IsRemoteNameKnown { 873 static bool return_value; 874 std::function<bool(const RawAddress& bd_addr, tBT_TRANSPORT transport)> body{ 875 [](const RawAddress& /* bd_addr */, tBT_TRANSPORT /* transport */) { 876 return return_value; 877 }}; operatorBTM_IsRemoteNameKnown878 bool operator()(const RawAddress& bd_addr, tBT_TRANSPORT transport) { 879 return body(bd_addr, transport); 880 }; 881 }; 882 extern struct BTM_IsRemoteNameKnown BTM_IsRemoteNameKnown; 883 884 } // namespace stack_btm_sec 885 } // namespace mock 886 } // namespace test 887 888 // END mockcify generation 889