1 /* 2 * Copyright 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 /* 18 * Generated mock file from original source file 19 * Functions generated:45 20 * 21 * mockcify.pl ver 0.2 22 */ 23 24 #include <cstdint> 25 #include <functional> 26 27 // Original included files, if any 28 #include "stack/include/bt_hdr.h" 29 #include "stack/include/l2c_api.h" 30 #include "types/ble_address_with_type.h" 31 #include "types/raw_address.h" 32 33 // Mocked compile conditionals, if any 34 namespace test { 35 namespace mock { 36 namespace main_shim_l2cap_api { 37 38 // Shared state between mocked functions and tests 39 // Name: L2CA_ReadRemoteVersion 40 // Params: const RawAddress& addr, uint8_t* lmp_version, uint16_t* manufacturer, 41 // uint16_t* lmp_sub_version Returns: bool 42 struct L2CA_ReadRemoteVersion { 43 std::function<bool(const RawAddress& addr, uint8_t* lmp_version, 44 uint16_t* manufacturer, uint16_t* lmp_sub_version)> 45 body{[](const RawAddress& addr, uint8_t* lmp_version, 46 uint16_t* manufacturer, 47 uint16_t* lmp_sub_version) { return false; }}; operatorL2CA_ReadRemoteVersion48 bool operator()(const RawAddress& addr, uint8_t* lmp_version, 49 uint16_t* manufacturer, uint16_t* lmp_sub_version) { 50 return body(addr, lmp_version, manufacturer, lmp_sub_version); 51 }; 52 }; 53 extern struct L2CA_ReadRemoteVersion L2CA_ReadRemoteVersion; 54 // Name: L2CA_ReadRemoteFeatures 55 // Params: const RawAddress& addr 56 // Returns: uint8_t* 57 struct L2CA_ReadRemoteFeatures { 58 std::function<uint8_t*(const RawAddress& addr)> body{ 59 [](const RawAddress& addr) { return nullptr; }}; operatorL2CA_ReadRemoteFeatures60 uint8_t* operator()(const RawAddress& addr) { return body(addr); }; 61 }; 62 extern struct L2CA_ReadRemoteFeatures L2CA_ReadRemoteFeatures; 63 // Name: L2CA_Register 64 // Params: uint16_t client_psm, const tL2CAP_APPL_INFO& callbacks, bool 65 // enable_snoop, tL2CAP_ERTM_INFO* p_ertm_info, uint16_t my_mtu, uint16_t 66 // required_remote_mtu, uint16_t sec_level Returns: uint16_t 67 struct L2CA_Register { 68 std::function<uint16_t(uint16_t client_psm, const tL2CAP_APPL_INFO& callbacks, 69 bool enable_snoop, tL2CAP_ERTM_INFO* p_ertm_info, 70 uint16_t my_mtu, uint16_t required_remote_mtu, 71 uint16_t sec_level)> 72 body{[](uint16_t client_psm, const tL2CAP_APPL_INFO& callbacks, 73 bool enable_snoop, tL2CAP_ERTM_INFO* p_ertm_info, uint16_t my_mtu, 74 uint16_t required_remote_mtu, uint16_t sec_level) { return 0; }}; operatorL2CA_Register75 uint16_t operator()(uint16_t client_psm, const tL2CAP_APPL_INFO& callbacks, 76 bool enable_snoop, tL2CAP_ERTM_INFO* p_ertm_info, 77 uint16_t my_mtu, uint16_t required_remote_mtu, 78 uint16_t sec_level) { 79 return body(client_psm, callbacks, enable_snoop, p_ertm_info, my_mtu, 80 required_remote_mtu, sec_level); 81 }; 82 }; 83 extern struct L2CA_Register L2CA_Register; 84 // Name: L2CA_Deregister 85 // Params: uint16_t psm 86 // Returns: void 87 struct L2CA_Deregister { 88 std::function<void(uint16_t psm)> body{[](uint16_t psm) {}}; operatorL2CA_Deregister89 void operator()(uint16_t psm) { body(psm); }; 90 }; 91 extern struct L2CA_Deregister L2CA_Deregister; 92 // Name: L2CA_ConnectReq 93 // Params: uint16_t psm, const RawAddress& raw_address 94 // Returns: uint16_t 95 struct L2CA_ConnectReq { 96 std::function<uint16_t(uint16_t psm, const RawAddress& raw_address)> body{ 97 [](uint16_t psm, const RawAddress& raw_address) { return 0; }}; operatorL2CA_ConnectReq98 uint16_t operator()(uint16_t psm, const RawAddress& raw_address) { 99 return body(psm, raw_address); 100 }; 101 }; 102 extern struct L2CA_ConnectReq L2CA_ConnectReq; 103 // Name: L2CA_DisconnectReq 104 // Params: uint16_t cid 105 // Returns: bool 106 struct L2CA_DisconnectReq { 107 std::function<bool(uint16_t cid)> body{[](uint16_t cid) { return false; }}; operatorL2CA_DisconnectReq108 bool operator()(uint16_t cid) { return body(cid); }; 109 }; 110 extern struct L2CA_DisconnectReq L2CA_DisconnectReq; 111 // Name: L2CA_DataWrite 112 // Params: uint16_t cid, BT_HDR* p_data 113 // Returns: uint8_t 114 struct L2CA_DataWrite { 115 std::function<uint8_t(uint16_t cid, BT_HDR* p_data)> body{ 116 [](uint16_t cid, BT_HDR* p_data) { return 0; }}; operatorL2CA_DataWrite117 uint8_t operator()(uint16_t cid, BT_HDR* p_data) { 118 return body(cid, p_data); 119 }; 120 }; 121 extern struct L2CA_DataWrite L2CA_DataWrite; 122 // Name: L2CA_ReconfigCreditBasedConnsReq 123 // Params: const RawAddress& bd_addr, std::vector<uint16_t>& lcids, 124 // tL2CAP_LE_CFG_INFO* p_cfg Returns: bool 125 struct L2CA_ReconfigCreditBasedConnsReq { 126 std::function<bool(const RawAddress& bd_addr, std::vector<uint16_t>& lcids, 127 tL2CAP_LE_CFG_INFO* p_cfg)> 128 body{[](const RawAddress& bd_addr, std::vector<uint16_t>& lcids, 129 tL2CAP_LE_CFG_INFO* p_cfg) { return false; }}; operatorL2CA_ReconfigCreditBasedConnsReq130 bool operator()(const RawAddress& bd_addr, std::vector<uint16_t>& lcids, 131 tL2CAP_LE_CFG_INFO* p_cfg) { 132 return body(bd_addr, lcids, p_cfg); 133 }; 134 }; 135 extern struct L2CA_ReconfigCreditBasedConnsReq L2CA_ReconfigCreditBasedConnsReq; 136 // Name: L2CA_ConnectCreditBasedReq 137 // Params: uint16_t psm, const RawAddress& p_bd_addr, tL2CAP_LE_CFG_INFO* p_cfg 138 // Returns: std::vector<uint16_t> 139 struct L2CA_ConnectCreditBasedReq { 140 std::vector<uint16_t> cids; 141 std::function<std::vector<uint16_t>(uint16_t psm, const RawAddress& p_bd_addr, 142 tL2CAP_LE_CFG_INFO* p_cfg)> 143 body{[this](uint16_t psm, const RawAddress& p_bd_addr, 144 tL2CAP_LE_CFG_INFO* p_cfg) { return cids; }}; operatorL2CA_ConnectCreditBasedReq145 std::vector<uint16_t> operator()(uint16_t psm, const RawAddress& p_bd_addr, 146 tL2CAP_LE_CFG_INFO* p_cfg) { 147 return body(psm, p_bd_addr, p_cfg); 148 }; 149 }; 150 extern struct L2CA_ConnectCreditBasedReq L2CA_ConnectCreditBasedReq; 151 // Name: L2CA_ConnectCreditBasedRsp 152 // Params: const RawAddress& bd_addr, uint8_t id, std::vector<uint16_t>& 153 // accepted_lcids, uint16_t result, tL2CAP_LE_CFG_INFO* p_cfg Returns: bool 154 struct L2CA_ConnectCreditBasedRsp { 155 std::function<bool(const RawAddress& bd_addr, uint8_t id, 156 std::vector<uint16_t>& accepted_lcids, uint16_t result, 157 tL2CAP_LE_CFG_INFO* p_cfg)> 158 body{[](const RawAddress& bd_addr, uint8_t id, 159 std::vector<uint16_t>& accepted_lcids, uint16_t result, 160 tL2CAP_LE_CFG_INFO* p_cfg) { return false; }}; operatorL2CA_ConnectCreditBasedRsp161 bool operator()(const RawAddress& bd_addr, uint8_t id, 162 std::vector<uint16_t>& accepted_lcids, uint16_t result, 163 tL2CAP_LE_CFG_INFO* p_cfg) { 164 return body(bd_addr, id, accepted_lcids, result, p_cfg); 165 }; 166 }; 167 extern struct L2CA_ConnectCreditBasedRsp L2CA_ConnectCreditBasedRsp; 168 // Name: L2CA_SetIdleTimeoutByBdAddr 169 // Params: const RawAddress& bd_addr, uint16_t timeout, tBT_TRANSPORT transport 170 // Returns: bool 171 struct L2CA_SetIdleTimeoutByBdAddr { 172 std::function<bool(const RawAddress& bd_addr, uint16_t timeout, 173 tBT_TRANSPORT transport)> 174 body{[](const RawAddress& bd_addr, uint16_t timeout, 175 tBT_TRANSPORT transport) { return false; }}; operatorL2CA_SetIdleTimeoutByBdAddr176 bool operator()(const RawAddress& bd_addr, uint16_t timeout, 177 tBT_TRANSPORT transport) { 178 return body(bd_addr, timeout, transport); 179 }; 180 }; 181 extern struct L2CA_SetIdleTimeoutByBdAddr L2CA_SetIdleTimeoutByBdAddr; 182 // Name: L2CA_SetAclPriority 183 // Params: uint16_t handle, bool high_priority 184 // Returns: bool 185 struct L2CA_SetAclPriority { 186 std::function<bool(uint16_t handle, bool high_priority)> body{ 187 [](uint16_t handle, bool high_priority) { return false; }}; operatorL2CA_SetAclPriority188 bool operator()(uint16_t handle, bool high_priority) { 189 return body(handle, high_priority); 190 }; 191 }; 192 extern struct L2CA_SetAclPriority L2CA_SetAclPriority; 193 // Name: L2CA_SetAclPriority 194 // Params: const RawAddress& bd_addr, tL2CAP_PRIORITY priority 195 // Returns: bool 196 struct L2CA_SetAclPriority2 { 197 std::function<bool(const RawAddress& bd_addr, tL2CAP_PRIORITY priority)> body{ 198 [](const RawAddress& bd_addr, tL2CAP_PRIORITY priority) { 199 return false; 200 }}; operatorL2CA_SetAclPriority2201 bool operator()(const RawAddress& bd_addr, tL2CAP_PRIORITY priority) { 202 return body(bd_addr, priority); 203 }; 204 }; 205 extern struct L2CA_SetAclPriority2 L2CA_SetAclPriority2; 206 // Name: L2CA_GetPeerFeatures 207 // Params: const RawAddress& bd_addr, uint32_t* p_ext_feat, uint8_t* p_chnl_mask 208 // Returns: bool 209 struct L2CA_GetPeerFeatures { 210 std::function<bool(const RawAddress& bd_addr, uint32_t* p_ext_feat, 211 uint8_t* p_chnl_mask)> 212 body{[](const RawAddress& bd_addr, uint32_t* p_ext_feat, 213 uint8_t* p_chnl_mask) { return false; }}; operatorL2CA_GetPeerFeatures214 bool operator()(const RawAddress& bd_addr, uint32_t* p_ext_feat, 215 uint8_t* p_chnl_mask) { 216 return body(bd_addr, p_ext_feat, p_chnl_mask); 217 }; 218 }; 219 extern struct L2CA_GetPeerFeatures L2CA_GetPeerFeatures; 220 // Name: L2CA_RegisterFixedChannel 221 // Params: uint16_t cid, tL2CAP_FIXED_CHNL_REG* p_freg 222 // Returns: bool 223 struct L2CA_RegisterFixedChannel { 224 std::function<bool(uint16_t cid, tL2CAP_FIXED_CHNL_REG* p_freg)> body{ 225 [](uint16_t cid, tL2CAP_FIXED_CHNL_REG* p_freg) { return false; }}; operatorL2CA_RegisterFixedChannel226 bool operator()(uint16_t cid, tL2CAP_FIXED_CHNL_REG* p_freg) { 227 return body(cid, p_freg); 228 }; 229 }; 230 extern struct L2CA_RegisterFixedChannel L2CA_RegisterFixedChannel; 231 // Name: L2CA_ConnectFixedChnl 232 // Params: uint16_t cid, const RawAddress& rem_bda 233 // Returns: bool 234 struct L2CA_ConnectFixedChnl { 235 std::function<bool(uint16_t cid, const RawAddress& rem_bda)> body{ 236 [](uint16_t cid, const RawAddress& rem_bda) { return false; }}; operatorL2CA_ConnectFixedChnl237 bool operator()(uint16_t cid, const RawAddress& rem_bda) { 238 return body(cid, rem_bda); 239 }; 240 }; 241 extern struct L2CA_ConnectFixedChnl L2CA_ConnectFixedChnl; 242 // Name: L2CA_SendFixedChnlData 243 // Params: uint16_t cid, const RawAddress& rem_bda, BT_HDR* p_buf 244 // Returns: uint16_t 245 struct L2CA_SendFixedChnlData { 246 std::function<uint16_t(uint16_t cid, const RawAddress& rem_bda, 247 BT_HDR* p_buf)> 248 body{[](uint16_t cid, const RawAddress& rem_bda, BT_HDR* p_buf) { 249 return 0; 250 }}; operatorL2CA_SendFixedChnlData251 uint16_t operator()(uint16_t cid, const RawAddress& rem_bda, BT_HDR* p_buf) { 252 return body(cid, rem_bda, p_buf); 253 }; 254 }; 255 extern struct L2CA_SendFixedChnlData L2CA_SendFixedChnlData; 256 // Name: L2CA_RemoveFixedChnl 257 // Params: uint16_t cid, const RawAddress& rem_bda 258 // Returns: bool 259 struct L2CA_RemoveFixedChnl { 260 std::function<bool(uint16_t cid, const RawAddress& rem_bda)> body{ 261 [](uint16_t cid, const RawAddress& rem_bda) { return false; }}; operatorL2CA_RemoveFixedChnl262 bool operator()(uint16_t cid, const RawAddress& rem_bda) { 263 return body(cid, rem_bda); 264 }; 265 }; 266 extern struct L2CA_RemoveFixedChnl L2CA_RemoveFixedChnl; 267 // Name: L2CA_GetLeHandle 268 // Params: const RawAddress& rem_bda 269 // Returns: uint16_t 270 struct L2CA_GetLeHandle { 271 std::function<uint16_t(const RawAddress& rem_bda)> body{ 272 [](const RawAddress& rem_bda) { return 0; }}; operatorL2CA_GetLeHandle273 uint16_t operator()(const RawAddress& rem_bda) { return body(rem_bda); }; 274 }; 275 extern struct L2CA_GetLeHandle L2CA_GetLeHandle; 276 // Name: L2CA_LeConnectionUpdate 277 // Params: const RawAddress& rem_bda, uint16_t min_int, uint16_t max_int, 278 // uint16_t latency, uint16_t timeout, uint16_t min_ce_len, uint16_t max_ce_len 279 // Returns: void 280 struct L2CA_LeConnectionUpdate { 281 std::function<void(const RawAddress& rem_bda, uint16_t min_int, 282 uint16_t max_int, uint16_t latency, uint16_t timeout, 283 uint16_t min_ce_len, uint16_t max_ce_len)> 284 body{[](const RawAddress& rem_bda, uint16_t min_int, uint16_t max_int, 285 uint16_t latency, uint16_t timeout, uint16_t min_ce_len, 286 uint16_t max_ce_len) {}}; operatorL2CA_LeConnectionUpdate287 void operator()(const RawAddress& rem_bda, uint16_t min_int, uint16_t max_int, 288 uint16_t latency, uint16_t timeout, uint16_t min_ce_len, 289 uint16_t max_ce_len) { 290 body(rem_bda, min_int, max_int, latency, timeout, min_ce_len, max_ce_len); 291 }; 292 }; 293 extern struct L2CA_LeConnectionUpdate L2CA_LeConnectionUpdate; 294 // Name: L2CA_LockBleConnParamsForServiceDiscovery 295 // Params: const RawAddress& rem_bda, bool enable 296 // Returns: void 297 struct L2CA_LockBleConnParamsForServiceDiscovery { 298 std::function<void(const RawAddress& rem_bda, bool enable)> body{ 299 [](const RawAddress& rem_bda, bool enable) { return false; }}; operatorL2CA_LockBleConnParamsForServiceDiscovery300 void operator()(const RawAddress& rem_bda, bool enable) { 301 return body(rem_bda, enable); 302 }; 303 }; 304 extern struct L2CA_LockBleConnParamsForServiceDiscovery 305 L2CA_LockBleConnParamsForServiceDiscovery; 306 // Name: L2CA_LockBleConnParamsForProfileConnection 307 // Params: const RawAddress& rem_bda, bool enable 308 // Returns: void 309 struct L2CA_LockBleConnParamsForProfileConnection { 310 std::function<void(const RawAddress& rem_bda, bool enable)> body{ 311 [](const RawAddress& rem_bda, bool enable) { return false; }}; operatorL2CA_LockBleConnParamsForProfileConnection312 void operator()(const RawAddress& rem_bda, bool enable) { 313 return body(rem_bda, enable); 314 }; 315 }; 316 extern struct L2CA_LockBleConnParamsForProfileConnection 317 L2CA_LockBleConnParamsForProfileConnection; 318 // Name: L2CA_SetTxPriority 319 // Params: uint16_t cid, tL2CAP_CHNL_PRIORITY priority 320 // Returns: bool 321 struct L2CA_SetTxPriority { 322 std::function<bool(uint16_t cid, tL2CAP_CHNL_PRIORITY priority)> body{ 323 [](uint16_t cid, tL2CAP_CHNL_PRIORITY priority) { return false; }}; operatorL2CA_SetTxPriority324 bool operator()(uint16_t cid, tL2CAP_CHNL_PRIORITY priority) { 325 return body(cid, priority); 326 }; 327 }; 328 extern struct L2CA_SetTxPriority L2CA_SetTxPriority; 329 // Name: L2CA_SetLeGattTimeout 330 // Params: const RawAddress& rem_bda, uint16_t idle_tout 331 // Returns: bool 332 struct L2CA_SetLeGattTimeout { 333 std::function<bool(const RawAddress& rem_bda, uint16_t idle_tout)> body{ 334 [](const RawAddress& rem_bda, uint16_t idle_tout) { return false; }}; operatorL2CA_SetLeGattTimeout335 bool operator()(const RawAddress& rem_bda, uint16_t idle_tout) { 336 return body(rem_bda, idle_tout); 337 }; 338 }; 339 extern struct L2CA_SetLeGattTimeout L2CA_SetLeGattTimeout; 340 // Name: L2CA_SetChnlFlushability 341 // Params: uint16_t cid, bool is_flushable 342 // Returns: bool 343 struct L2CA_SetChnlFlushability { 344 std::function<bool(uint16_t cid, bool is_flushable)> body{ 345 [](uint16_t cid, bool is_flushable) { return false; }}; operatorL2CA_SetChnlFlushability346 bool operator()(uint16_t cid, bool is_flushable) { 347 return body(cid, is_flushable); 348 }; 349 }; 350 extern struct L2CA_SetChnlFlushability L2CA_SetChnlFlushability; 351 // Name: L2CA_FlushChannel 352 // Params: uint16_t lcid, uint16_t num_to_flush 353 // Returns: uint16_t 354 struct L2CA_FlushChannel { 355 std::function<uint16_t(uint16_t lcid, uint16_t num_to_flush)> body{ 356 [](uint16_t lcid, uint16_t num_to_flush) { return 0; }}; operatorL2CA_FlushChannel357 uint16_t operator()(uint16_t lcid, uint16_t num_to_flush) { 358 return body(lcid, num_to_flush); 359 }; 360 }; 361 extern struct L2CA_FlushChannel L2CA_FlushChannel; 362 // Name: L2CA_IsLinkEstablished 363 // Params: const RawAddress& bd_addr, tBT_TRANSPORT transport 364 // Returns: bool 365 struct L2CA_IsLinkEstablished { 366 std::function<bool(const RawAddress& bd_addr, tBT_TRANSPORT transport)> body{ 367 [](const RawAddress& bd_addr, tBT_TRANSPORT transport) { return false; }}; operatorL2CA_IsLinkEstablished368 bool operator()(const RawAddress& bd_addr, tBT_TRANSPORT transport) { 369 return body(bd_addr, transport); 370 }; 371 }; 372 extern struct L2CA_IsLinkEstablished L2CA_IsLinkEstablished; 373 // Name: L2CA_IsLeLink 374 // Params: uint16_t acl_handle 375 // Returns: bool 376 struct L2CA_IsLeLink { 377 std::function<bool(uint16_t acl_handle)> body{ 378 [](uint16_t acl_handle) { return false; }}; operatorL2CA_IsLeLink379 bool operator()(uint16_t acl_handle) { return body(acl_handle); }; 380 }; 381 extern struct L2CA_IsLeLink L2CA_IsLeLink; 382 // Name: L2CA_ReadConnectionAddr 383 // Params: const RawAddress& pseudo_addr, RawAddress& conn_addr, uint8_t* 384 // p_addr_type Returns: void 385 struct L2CA_ReadConnectionAddr { 386 std::function<void(const RawAddress& pseudo_addr, RawAddress& conn_addr, 387 tBLE_ADDR_TYPE* p_addr_type)> 388 body{[](const RawAddress& pseudo_addr, RawAddress& conn_addr, 389 tBLE_ADDR_TYPE* p_addr_type) {}}; operatorL2CA_ReadConnectionAddr390 void operator()(const RawAddress& pseudo_addr, RawAddress& conn_addr, 391 tBLE_ADDR_TYPE* p_addr_type) { 392 body(pseudo_addr, conn_addr, p_addr_type); 393 }; 394 }; 395 extern struct L2CA_ReadConnectionAddr L2CA_ReadConnectionAddr; 396 // Name: L2CA_ReadRemoteConnectionAddr 397 // Params: const RawAddress& pseudo_addr, RawAddress& conn_addr, uint8_t* 398 // p_addr_type Returns: bool 399 struct L2CA_ReadRemoteConnectionAddr { 400 std::function<bool(const RawAddress& pseudo_addr, RawAddress& conn_addr, 401 tBLE_ADDR_TYPE* p_addr_type)> 402 body{[](const RawAddress& pseudo_addr, RawAddress& conn_addr, 403 tBLE_ADDR_TYPE* p_addr_type) { return false; }}; operatorL2CA_ReadRemoteConnectionAddr404 bool operator()(const RawAddress& pseudo_addr, RawAddress& conn_addr, 405 tBLE_ADDR_TYPE* p_addr_type) { 406 return body(pseudo_addr, conn_addr, p_addr_type); 407 }; 408 }; 409 extern struct L2CA_ReadRemoteConnectionAddr L2CA_ReadRemoteConnectionAddr; 410 // Name: L2CA_GetBleConnRole 411 // Params: const RawAddress& bd_addr 412 // Returns: hci_role_t 413 struct L2CA_GetBleConnRole { 414 std::function<hci_role_t(const RawAddress& bd_addr)> body{ 415 [](const RawAddress& bd_addr) { return HCI_ROLE_CENTRAL; }}; operatorL2CA_GetBleConnRole416 hci_role_t operator()(const RawAddress& bd_addr) { return body(bd_addr); }; 417 }; 418 extern struct L2CA_GetBleConnRole L2CA_GetBleConnRole; 419 // Name: L2CA_ConnectForSecurity 420 // Params: const RawAddress& bd_addr 421 // Returns: void 422 struct L2CA_ConnectForSecurity { 423 std::function<void(const RawAddress& bd_addr)> body{ 424 [](const RawAddress& bd_addr) {}}; operatorL2CA_ConnectForSecurity425 void operator()(const RawAddress& bd_addr) { body(bd_addr); }; 426 }; 427 extern struct L2CA_ConnectForSecurity L2CA_ConnectForSecurity; 428 // Name: L2CA_SetBondingState 429 // Params: const RawAddress& bd_addr, bool is_bonding 430 // Returns: void 431 struct L2CA_SetBondingState { 432 std::function<void(const RawAddress& bd_addr, bool is_bonding)> body{ 433 [](const RawAddress& bd_addr, bool is_bonding) {}}; operatorL2CA_SetBondingState434 void operator()(const RawAddress& bd_addr, bool is_bonding) { 435 body(bd_addr, is_bonding); 436 }; 437 }; 438 extern struct L2CA_SetBondingState L2CA_SetBondingState; 439 // Name: L2CA_DisconnectLink 440 // Params: const RawAddress& remote 441 // Returns: void 442 struct L2CA_DisconnectLink { 443 std::function<void(const RawAddress& remote)> body{ 444 [](const RawAddress& remote) {}}; operatorL2CA_DisconnectLink445 void operator()(const RawAddress& remote) { body(remote); }; 446 }; 447 extern struct L2CA_DisconnectLink L2CA_DisconnectLink; 448 // Name: L2CA_GetNumLinks 449 // Params: 450 // Returns: uint16_t 451 struct L2CA_GetNumLinks { 452 std::function<uint16_t()> body{[]() { return 0; }}; operatorL2CA_GetNumLinks453 uint16_t operator()() { return body(); }; 454 }; 455 extern struct L2CA_GetNumLinks L2CA_GetNumLinks; 456 // Name: L2CA_AllocateLePSM 457 // Params: 458 // Returns: uint16_t 459 struct L2CA_AllocateLePSM { 460 std::function<uint16_t()> body{[]() { return 0; }}; operatorL2CA_AllocateLePSM461 uint16_t operator()() { return body(); }; 462 }; 463 extern struct L2CA_AllocateLePSM L2CA_AllocateLePSM; 464 // Name: L2CA_FreeLePSM 465 // Params: uint16_t psm 466 // Returns: void 467 struct L2CA_FreeLePSM { 468 std::function<void(uint16_t psm)> body{[](uint16_t psm) {}}; operatorL2CA_FreeLePSM469 void operator()(uint16_t psm) { body(psm); }; 470 }; 471 extern struct L2CA_FreeLePSM L2CA_FreeLePSM; 472 // Name: L2CA_RegisterLECoc 473 // Params: uint16_t psm, const tL2CAP_APPL_INFO& callbacks, uint16_t sec_level, 474 // tL2CAP_LE_CFG_INFO cfg Returns: uint16_t 475 struct L2CA_RegisterLECoc { 476 std::function<uint16_t(uint16_t psm, const tL2CAP_APPL_INFO& callbacks, 477 uint16_t sec_level, tL2CAP_LE_CFG_INFO cfg)> 478 body{[](uint16_t psm, const tL2CAP_APPL_INFO& callbacks, 479 uint16_t sec_level, tL2CAP_LE_CFG_INFO cfg) { return 0; }}; operatorL2CA_RegisterLECoc480 uint16_t operator()(uint16_t psm, const tL2CAP_APPL_INFO& callbacks, 481 uint16_t sec_level, tL2CAP_LE_CFG_INFO cfg) { 482 return body(psm, callbacks, sec_level, cfg); 483 }; 484 }; 485 extern struct L2CA_RegisterLECoc L2CA_RegisterLECoc; 486 // Name: L2CA_DeregisterLECoc 487 // Params: uint16_t psm 488 // Returns: void 489 struct L2CA_DeregisterLECoc { 490 std::function<void(uint16_t psm)> body{[](uint16_t psm) {}}; operatorL2CA_DeregisterLECoc491 void operator()(uint16_t psm) { body(psm); }; 492 }; 493 extern struct L2CA_DeregisterLECoc L2CA_DeregisterLECoc; 494 // Name: L2CA_ConnectLECocReq 495 // Params: uint16_t psm, const RawAddress& p_bd_addr, tL2CAP_LE_CFG_INFO* p_cfg 496 // Returns: uint16_t 497 struct L2CA_ConnectLECocReq { 498 std::function<uint16_t(uint16_t psm, const RawAddress& p_bd_addr, 499 tL2CAP_LE_CFG_INFO* p_cfg)> 500 body{[](uint16_t psm, const RawAddress& p_bd_addr, 501 tL2CAP_LE_CFG_INFO* p_cfg) { return 0; }}; operatorL2CA_ConnectLECocReq502 uint16_t operator()(uint16_t psm, const RawAddress& p_bd_addr, 503 tL2CAP_LE_CFG_INFO* p_cfg) { 504 return body(psm, p_bd_addr, p_cfg); 505 }; 506 }; 507 extern struct L2CA_ConnectLECocReq L2CA_ConnectLECocReq; 508 // Name: L2CA_GetPeerLECocConfig 509 // Params: uint16_t cid, tL2CAP_LE_CFG_INFO* peer_cfg 510 // Returns: bool 511 struct L2CA_GetPeerLECocConfig { 512 std::function<bool(uint16_t cid, tL2CAP_LE_CFG_INFO* peer_cfg)> body{ 513 [](uint16_t cid, tL2CAP_LE_CFG_INFO* peer_cfg) { return false; }}; operatorL2CA_GetPeerLECocConfig514 bool operator()(uint16_t cid, tL2CAP_LE_CFG_INFO* peer_cfg) { 515 return body(cid, peer_cfg); 516 }; 517 }; 518 extern struct L2CA_GetPeerLECocConfig L2CA_GetPeerLECocConfig; 519 // Name: L2CA_DisconnectLECocReq 520 // Params: uint16_t cid 521 // Returns: bool 522 struct L2CA_DisconnectLECocReq { 523 std::function<bool(uint16_t cid)> body{[](uint16_t cid) { return false; }}; operatorL2CA_DisconnectLECocReq524 bool operator()(uint16_t cid) { return body(cid); }; 525 }; 526 extern struct L2CA_DisconnectLECocReq L2CA_DisconnectLECocReq; 527 // Name: L2CA_LECocDataWrite 528 // Params: uint16_t cid, BT_HDR* p_data 529 // Returns: uint8_t 530 struct L2CA_LECocDataWrite { 531 std::function<uint8_t(uint16_t cid, BT_HDR* p_data)> body{ 532 [](uint16_t cid, BT_HDR* p_data) { return 0; }}; operatorL2CA_LECocDataWrite533 uint8_t operator()(uint16_t cid, BT_HDR* p_data) { 534 return body(cid, p_data); 535 }; 536 }; 537 extern struct L2CA_LECocDataWrite L2CA_LECocDataWrite; 538 // Name: L2CA_SwitchRoleToCentral 539 // Params: const RawAddress& addr 540 // Returns: void 541 struct L2CA_SwitchRoleToCentral { 542 std::function<void(const RawAddress& addr)> body{ 543 [](const RawAddress& addr) {}}; operatorL2CA_SwitchRoleToCentral544 void operator()(const RawAddress& addr) { body(addr); }; 545 }; 546 extern struct L2CA_SwitchRoleToCentral L2CA_SwitchRoleToCentral; 547 548 } // namespace main_shim_l2cap_api 549 } // namespace mock 550 } // namespace test 551 552 // END mockcify generation 553