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:33 20 * 21 * mockcify.pl ver 0.2 22 */ 23 24 #include <functional> 25 #include <map> 26 #include <string> 27 #include <vector> 28 29 extern std::map<std::string, int> mock_function_count_map; 30 31 // Original included files, if any 32 // NOTE: Since this is a mock file with mock definitions some number of 33 // include files may not be required. The include-what-you-use 34 // still applies, but crafting proper inclusion is out of scope 35 // for this effort. This compilation unit may compile as-is, or 36 // may need attention to prune the inclusion set. 37 #include <base/logging.h> 38 #include <base/strings/stringprintf.h> 39 #include <cstdint> 40 #include <string> 41 #include "device/include/controller.h" 42 #include "main/shim/l2c_api.h" 43 #include "main/shim/shim.h" 44 #include "osi/include/log.h" 45 #include "stack/btm/btm_sec.h" 46 #include "stack/include/l2c_api.h" 47 #include "stack/l2cap/l2c_int.h" 48 49 // Mocked compile conditionals, if any 50 #ifndef UNUSED_ATTR 51 #define UNUSED_ATTR 52 #endif 53 54 namespace test { 55 namespace mock { 56 namespace stack_l2cap_api { 57 58 // Shared state between mocked functions and tests 59 // Name: l2c_get_transport_from_fixed_cid 60 // Params: uint16_t fixed_cid 61 // Returns: tBT_TRANSPORT 62 struct l2c_get_transport_from_fixed_cid { 63 std::function<tBT_TRANSPORT(uint16_t fixed_cid)> body{ 64 [](uint16_t fixed_cid) { return 0; }}; operatorl2c_get_transport_from_fixed_cid65 tBT_TRANSPORT operator()(uint16_t fixed_cid) { return body(fixed_cid); }; 66 }; 67 extern struct l2c_get_transport_from_fixed_cid l2c_get_transport_from_fixed_cid; 68 // Name: L2CA_Register2 69 // Params: uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, bool enable_snoop, 70 // tL2CAP_ERTM_INFO* p_ertm_info, uint16_t my_mtu, uint16_t required_remote_mtu, 71 // uint16_t sec_level Returns: uint16_t 72 struct L2CA_Register2 { 73 std::function<uint16_t(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, 74 bool enable_snoop, tL2CAP_ERTM_INFO* p_ertm_info, 75 uint16_t my_mtu, uint16_t required_remote_mtu, 76 uint16_t sec_level)> 77 body{[](uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, 78 bool enable_snoop, tL2CAP_ERTM_INFO* p_ertm_info, uint16_t my_mtu, 79 uint16_t required_remote_mtu, uint16_t sec_level) { return 0; }}; operatorL2CA_Register280 uint16_t operator()(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, 81 bool enable_snoop, tL2CAP_ERTM_INFO* p_ertm_info, 82 uint16_t my_mtu, uint16_t required_remote_mtu, 83 uint16_t sec_level) { 84 return body(psm, p_cb_info, enable_snoop, p_ertm_info, my_mtu, 85 required_remote_mtu, sec_level); 86 }; 87 }; 88 extern struct L2CA_Register2 L2CA_Register2; 89 // Name: L2CA_Register 90 // Params: uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, bool enable_snoop, 91 // tL2CAP_ERTM_INFO* p_ertm_info, uint16_t my_mtu, uint16_t required_remote_mtu, 92 // uint16_t sec_level Returns: uint16_t 93 struct L2CA_Register { 94 std::function<uint16_t(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, 95 bool enable_snoop, tL2CAP_ERTM_INFO* p_ertm_info, 96 uint16_t my_mtu, uint16_t required_remote_mtu, 97 uint16_t sec_level)> 98 body{[](uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, 99 bool enable_snoop, tL2CAP_ERTM_INFO* p_ertm_info, uint16_t my_mtu, 100 uint16_t required_remote_mtu, uint16_t sec_level) { return 0; }}; operatorL2CA_Register101 uint16_t operator()(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, 102 bool enable_snoop, tL2CAP_ERTM_INFO* p_ertm_info, 103 uint16_t my_mtu, uint16_t required_remote_mtu, 104 uint16_t sec_level) { 105 return body(psm, p_cb_info, enable_snoop, p_ertm_info, my_mtu, 106 required_remote_mtu, sec_level); 107 }; 108 }; 109 extern struct L2CA_Register L2CA_Register; 110 // Name: L2CA_Deregister 111 // Params: uint16_t psm 112 // Returns: void 113 struct L2CA_Deregister { 114 std::function<void(uint16_t psm)> body{[](uint16_t psm) {}}; operatorL2CA_Deregister115 void operator()(uint16_t psm) { body(psm); }; 116 }; 117 extern struct L2CA_Deregister L2CA_Deregister; 118 // Name: L2CA_AllocateLePSM 119 // Params: void 120 // Returns: uint16_t 121 struct L2CA_AllocateLePSM { 122 std::function<uint16_t(void)> body{[](void) { return 0; }}; operatorL2CA_AllocateLePSM123 uint16_t operator()(void) { return body(); }; 124 }; 125 extern struct L2CA_AllocateLePSM L2CA_AllocateLePSM; 126 // Name: L2CA_FreeLePSM 127 // Params: uint16_t psm 128 // Returns: void 129 struct L2CA_FreeLePSM { 130 std::function<void(uint16_t psm)> body{[](uint16_t psm) {}}; operatorL2CA_FreeLePSM131 void operator()(uint16_t psm) { body(psm); }; 132 }; 133 extern struct L2CA_FreeLePSM L2CA_FreeLePSM; 134 // Name: L2CA_ConnectReq2 135 // Params: uint16_t psm, const RawAddress& p_bd_addr, uint16_t sec_level 136 // Returns: uint16_t 137 struct L2CA_ConnectReq2 { 138 std::function<uint16_t(uint16_t psm, const RawAddress& p_bd_addr, 139 uint16_t sec_level)> 140 body{[](uint16_t psm, const RawAddress& p_bd_addr, uint16_t sec_level) { 141 return 0; 142 }}; operatorL2CA_ConnectReq2143 uint16_t operator()(uint16_t psm, const RawAddress& p_bd_addr, 144 uint16_t sec_level) { 145 return body(psm, p_bd_addr, sec_level); 146 }; 147 }; 148 extern struct L2CA_ConnectReq2 L2CA_ConnectReq2; 149 // Name: L2CA_ConnectReq 150 // Params: uint16_t psm, const RawAddress& p_bd_addr 151 // Returns: uint16_t 152 struct L2CA_ConnectReq { 153 std::function<uint16_t(uint16_t psm, const RawAddress& p_bd_addr)> body{ 154 [](uint16_t psm, const RawAddress& p_bd_addr) { return 0; }}; operatorL2CA_ConnectReq155 uint16_t operator()(uint16_t psm, const RawAddress& p_bd_addr) { 156 return body(psm, p_bd_addr); 157 }; 158 }; 159 extern struct L2CA_ConnectReq L2CA_ConnectReq; 160 // Name: L2CA_RegisterLECoc 161 // Params: uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, uint16_t sec_level, 162 // tL2CAP_LE_CFG_INFO cfg Returns: uint16_t 163 struct L2CA_RegisterLECoc { 164 std::function<uint16_t(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, 165 uint16_t sec_level, tL2CAP_LE_CFG_INFO cfg)> 166 body{[](uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, 167 uint16_t sec_level, tL2CAP_LE_CFG_INFO cfg) { return 0; }}; operatorL2CA_RegisterLECoc168 uint16_t operator()(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, 169 uint16_t sec_level, tL2CAP_LE_CFG_INFO cfg) { 170 return body(psm, p_cb_info, sec_level, cfg); 171 }; 172 }; 173 extern struct L2CA_RegisterLECoc L2CA_RegisterLECoc; 174 // Name: L2CA_DeregisterLECoc 175 // Params: uint16_t psm 176 // Returns: void 177 struct L2CA_DeregisterLECoc { 178 std::function<void(uint16_t psm)> body{[](uint16_t psm) {}}; operatorL2CA_DeregisterLECoc179 void operator()(uint16_t psm) { body(psm); }; 180 }; 181 extern struct L2CA_DeregisterLECoc L2CA_DeregisterLECoc; 182 // Name: L2CA_ConnectLECocReq 183 // Params: uint16_t psm, const RawAddress& p_bd_addr, tL2CAP_LE_CFG_INFO* p_cfg, 184 // uint16_t sec_level Returns: uint16_t 185 struct L2CA_ConnectLECocReq { 186 std::function<uint16_t(uint16_t psm, const RawAddress& p_bd_addr, 187 tL2CAP_LE_CFG_INFO* p_cfg, uint16_t sec_level)> 188 body{[](uint16_t psm, const RawAddress& p_bd_addr, 189 tL2CAP_LE_CFG_INFO* p_cfg, uint16_t sec_level) { return 0; }}; operatorL2CA_ConnectLECocReq190 uint16_t operator()(uint16_t psm, const RawAddress& p_bd_addr, 191 tL2CAP_LE_CFG_INFO* p_cfg, uint16_t sec_level) { 192 return body(psm, p_bd_addr, p_cfg, sec_level); 193 }; 194 }; 195 extern struct L2CA_ConnectLECocReq L2CA_ConnectLECocReq; 196 // Name: L2CA_GetPeerLECocConfig 197 // Params: uint16_t lcid, tL2CAP_LE_CFG_INFO* peer_cfg 198 // Returns: bool 199 struct L2CA_GetPeerLECocConfig { 200 std::function<bool(uint16_t lcid, tL2CAP_LE_CFG_INFO* peer_cfg)> body{ 201 [](uint16_t lcid, tL2CAP_LE_CFG_INFO* peer_cfg) { return false; }}; operatorL2CA_GetPeerLECocConfig202 bool operator()(uint16_t lcid, tL2CAP_LE_CFG_INFO* peer_cfg) { 203 return body(lcid, peer_cfg); 204 }; 205 }; 206 extern struct L2CA_GetPeerLECocConfig L2CA_GetPeerLECocConfig; 207 // Name: L2CA_ConnectCreditBasedRsp 208 // Params: const RawAddress& p_bd_addr, uint8_t id, std::vector<uint16_t>& 209 // accepted_lcids, uint16_t result, tL2CAP_LE_CFG_INFO* p_cfg Returns: bool 210 struct L2CA_ConnectCreditBasedRsp { 211 std::function<bool(const RawAddress& p_bd_addr, uint8_t id, 212 std::vector<uint16_t>& accepted_lcids, uint16_t result, 213 tL2CAP_LE_CFG_INFO* p_cfg)> 214 body{[](const RawAddress& p_bd_addr, uint8_t id, 215 std::vector<uint16_t>& accepted_lcids, uint16_t result, 216 tL2CAP_LE_CFG_INFO* p_cfg) { return false; }}; operatorL2CA_ConnectCreditBasedRsp217 bool operator()(const RawAddress& p_bd_addr, uint8_t id, 218 std::vector<uint16_t>& accepted_lcids, uint16_t result, 219 tL2CAP_LE_CFG_INFO* p_cfg) { 220 return body(p_bd_addr, id, accepted_lcids, result, p_cfg); 221 }; 222 }; 223 extern struct L2CA_ConnectCreditBasedRsp L2CA_ConnectCreditBasedRsp; 224 // Name: L2CA_ConnectCreditBasedReq 225 // Params: uint16_t psm, const RawAddress& p_bd_addr, tL2CAP_LE_CFG_INFO* p_cfg 226 // Returns: std::vector<uint16_t> 227 struct L2CA_ConnectCreditBasedReq { 228 std::vector<uint16_t> cids; 229 std::function<std::vector<uint16_t>(uint16_t psm, const RawAddress& p_bd_addr, 230 tL2CAP_LE_CFG_INFO* p_cfg)> 231 body{[this](uint16_t psm, const RawAddress& p_bd_addr, 232 tL2CAP_LE_CFG_INFO* p_cfg) { return cids; }}; operatorL2CA_ConnectCreditBasedReq233 std::vector<uint16_t> operator()(uint16_t psm, const RawAddress& p_bd_addr, 234 tL2CAP_LE_CFG_INFO* p_cfg) { 235 return body(psm, p_bd_addr, p_cfg); 236 }; 237 }; 238 extern struct L2CA_ConnectCreditBasedReq L2CA_ConnectCreditBasedReq; 239 // Name: L2CA_ReconfigCreditBasedConnsReq 240 // Params: const RawAddress& bda, std::vector<uint16_t>& lcids, 241 // tL2CAP_LE_CFG_INFO* p_cfg Returns: bool 242 struct L2CA_ReconfigCreditBasedConnsReq { 243 std::function<bool(const RawAddress& bda, std::vector<uint16_t>& lcids, 244 tL2CAP_LE_CFG_INFO* p_cfg)> 245 body{[](const RawAddress& bda, std::vector<uint16_t>& lcids, 246 tL2CAP_LE_CFG_INFO* p_cfg) { return false; }}; operatorL2CA_ReconfigCreditBasedConnsReq247 bool operator()(const RawAddress& bda, std::vector<uint16_t>& lcids, 248 tL2CAP_LE_CFG_INFO* p_cfg) { 249 return body(bda, lcids, p_cfg); 250 }; 251 }; 252 extern struct L2CA_ReconfigCreditBasedConnsReq L2CA_ReconfigCreditBasedConnsReq; 253 // Name: L2CA_DisconnectReq 254 // Params: uint16_t cid 255 // Returns: bool 256 struct L2CA_DisconnectReq { 257 std::function<bool(uint16_t cid)> body{[](uint16_t cid) { return false; }}; operatorL2CA_DisconnectReq258 bool operator()(uint16_t cid) { return body(cid); }; 259 }; 260 extern struct L2CA_DisconnectReq L2CA_DisconnectReq; 261 // Name: L2CA_DisconnectLECocReq 262 // Params: uint16_t cid 263 // Returns: bool 264 struct L2CA_DisconnectLECocReq { 265 std::function<bool(uint16_t cid)> body{[](uint16_t cid) { return false; }}; operatorL2CA_DisconnectLECocReq266 bool operator()(uint16_t cid) { return body(cid); }; 267 }; 268 extern struct L2CA_DisconnectLECocReq L2CA_DisconnectLECocReq; 269 // Name: L2CA_GetRemoteCid 270 // Params: uint16_t lcid, uint16_t* rcid 271 // Returns: bool 272 struct L2CA_GetRemoteCid { 273 std::function<bool(uint16_t lcid, uint16_t* rcid)> body{ 274 [](uint16_t lcid, uint16_t* rcid) { return false; }}; operatorL2CA_GetRemoteCid275 bool operator()(uint16_t lcid, uint16_t* rcid) { return body(lcid, rcid); }; 276 }; 277 extern struct L2CA_GetRemoteCid L2CA_GetRemoteCid; 278 // Name: L2CA_SetIdleTimeoutByBdAddr 279 // Params: const RawAddress& bd_addr, uint16_t timeout, tBT_TRANSPORT transport 280 // Returns: bool 281 struct L2CA_SetIdleTimeoutByBdAddr { 282 std::function<bool(const RawAddress& bd_addr, uint16_t timeout, 283 tBT_TRANSPORT transport)> 284 body{[](const RawAddress& bd_addr, uint16_t timeout, 285 tBT_TRANSPORT transport) { return false; }}; operatorL2CA_SetIdleTimeoutByBdAddr286 bool operator()(const RawAddress& bd_addr, uint16_t timeout, 287 tBT_TRANSPORT transport) { 288 return body(bd_addr, timeout, transport); 289 }; 290 }; 291 extern struct L2CA_SetIdleTimeoutByBdAddr L2CA_SetIdleTimeoutByBdAddr; 292 // Name: L2CA_SetTraceLevel 293 // Params: uint8_t new_level 294 // Returns: uint8_t 295 struct L2CA_SetTraceLevel { 296 std::function<uint8_t(uint8_t new_level)> body{ 297 [](uint8_t new_level) { return 0; }}; operatorL2CA_SetTraceLevel298 uint8_t operator()(uint8_t new_level) { return body(new_level); }; 299 }; 300 extern struct L2CA_SetTraceLevel L2CA_SetTraceLevel; 301 // Name: L2CA_SetAclPriority 302 // Params: const RawAddress& bd_addr, tL2CAP_PRIORITY priority 303 // Returns: bool 304 struct L2CA_SetAclPriority { 305 std::function<bool(const RawAddress& bd_addr, tL2CAP_PRIORITY priority)> body{ 306 [](const RawAddress& bd_addr, tL2CAP_PRIORITY priority) { 307 return false; 308 }}; operatorL2CA_SetAclPriority309 bool operator()(const RawAddress& bd_addr, tL2CAP_PRIORITY priority) { 310 return body(bd_addr, priority); 311 }; 312 }; 313 extern struct L2CA_SetAclPriority L2CA_SetAclPriority; 314 // Name: L2CA_SetTxPriority 315 // Params: uint16_t cid, tL2CAP_CHNL_PRIORITY priority 316 // Returns: bool 317 struct L2CA_SetTxPriority { 318 std::function<bool(uint16_t cid, tL2CAP_CHNL_PRIORITY priority)> body{ 319 [](uint16_t cid, tL2CAP_CHNL_PRIORITY priority) { return false; }}; operatorL2CA_SetTxPriority320 bool operator()(uint16_t cid, tL2CAP_CHNL_PRIORITY priority) { 321 return body(cid, priority); 322 }; 323 }; 324 extern struct L2CA_SetTxPriority L2CA_SetTxPriority; 325 // Name: L2CA_GetPeerFeatures 326 // Params: const RawAddress& bd_addr, uint32_t* p_ext_feat, uint8_t* p_chnl_mask 327 // Returns: bool 328 struct L2CA_GetPeerFeatures { 329 std::function<bool(const RawAddress& bd_addr, uint32_t* p_ext_feat, 330 uint8_t* p_chnl_mask)> 331 body{[](const RawAddress& bd_addr, uint32_t* p_ext_feat, 332 uint8_t* p_chnl_mask) { return false; }}; operatorL2CA_GetPeerFeatures333 bool operator()(const RawAddress& bd_addr, uint32_t* p_ext_feat, 334 uint8_t* p_chnl_mask) { 335 return body(bd_addr, p_ext_feat, p_chnl_mask); 336 }; 337 }; 338 extern struct L2CA_GetPeerFeatures L2CA_GetPeerFeatures; 339 // Name: L2CA_RegisterFixedChannel 340 // Params: uint16_t fixed_cid, tL2CAP_FIXED_CHNL_REG* p_freg 341 // Returns: bool 342 struct L2CA_RegisterFixedChannel { 343 std::function<bool(uint16_t fixed_cid, tL2CAP_FIXED_CHNL_REG* p_freg)> body{ 344 [](uint16_t fixed_cid, tL2CAP_FIXED_CHNL_REG* p_freg) { return false; }}; operatorL2CA_RegisterFixedChannel345 bool operator()(uint16_t fixed_cid, tL2CAP_FIXED_CHNL_REG* p_freg) { 346 return body(fixed_cid, p_freg); 347 }; 348 }; 349 extern struct L2CA_RegisterFixedChannel L2CA_RegisterFixedChannel; 350 // Name: L2CA_ConnectFixedChnl 351 // Params: uint16_t fixed_cid, const RawAddress& rem_bda 352 // Returns: bool 353 struct L2CA_ConnectFixedChnl { 354 std::function<bool(uint16_t fixed_cid, const RawAddress& rem_bda)> body{ 355 [](uint16_t fixed_cid, const RawAddress& rem_bda) { return false; }}; operatorL2CA_ConnectFixedChnl356 bool operator()(uint16_t fixed_cid, const RawAddress& rem_bda) { 357 return body(fixed_cid, rem_bda); 358 }; 359 }; 360 extern struct L2CA_ConnectFixedChnl L2CA_ConnectFixedChnl; 361 // Name: L2CA_SendFixedChnlData 362 // Params: uint16_t fixed_cid, const RawAddress& rem_bda, BT_HDR* p_buf 363 // Returns: uint16_t 364 struct L2CA_SendFixedChnlData { 365 std::function<uint16_t(uint16_t fixed_cid, const RawAddress& rem_bda, 366 BT_HDR* p_buf)> 367 body{[](uint16_t fixed_cid, const RawAddress& rem_bda, BT_HDR* p_buf) { 368 return 0; 369 }}; operatorL2CA_SendFixedChnlData370 uint16_t operator()(uint16_t fixed_cid, const RawAddress& rem_bda, 371 BT_HDR* p_buf) { 372 return body(fixed_cid, rem_bda, p_buf); 373 }; 374 }; 375 extern struct L2CA_SendFixedChnlData L2CA_SendFixedChnlData; 376 // Name: L2CA_RemoveFixedChnl 377 // Params: uint16_t fixed_cid, const RawAddress& rem_bda 378 // Returns: bool 379 struct L2CA_RemoveFixedChnl { 380 std::function<bool(uint16_t fixed_cid, const RawAddress& rem_bda)> body{ 381 [](uint16_t fixed_cid, const RawAddress& rem_bda) { return false; }}; operatorL2CA_RemoveFixedChnl382 bool operator()(uint16_t fixed_cid, const RawAddress& rem_bda) { 383 return body(fixed_cid, rem_bda); 384 }; 385 }; 386 extern struct L2CA_RemoveFixedChnl L2CA_RemoveFixedChnl; 387 // Name: L2CA_SetLeGattTimeout 388 // Params: const RawAddress& rem_bda, uint16_t idle_tout 389 // Returns: bool 390 struct L2CA_SetLeGattTimeout { 391 std::function<bool(const RawAddress& rem_bda, uint16_t idle_tout)> body{ 392 [](const RawAddress& rem_bda, uint16_t idle_tout) { return false; }}; operatorL2CA_SetLeGattTimeout393 bool operator()(const RawAddress& rem_bda, uint16_t idle_tout) { 394 return body(rem_bda, idle_tout); 395 }; 396 }; 397 extern struct L2CA_SetLeGattTimeout L2CA_SetLeGattTimeout; 398 // Name: L2CA_DataWrite 399 // Params: uint16_t cid, BT_HDR* p_data 400 // Returns: uint8_t 401 struct L2CA_DataWrite { 402 std::function<uint8_t(uint16_t cid, BT_HDR* p_data)> body{ 403 [](uint16_t cid, BT_HDR* p_data) { return 0; }}; operatorL2CA_DataWrite404 uint8_t operator()(uint16_t cid, BT_HDR* p_data) { 405 return body(cid, p_data); 406 }; 407 }; 408 extern struct L2CA_DataWrite L2CA_DataWrite; 409 // Name: L2CA_LECocDataWrite 410 // Params: uint16_t cid, BT_HDR* p_data 411 // Returns: uint8_t 412 struct L2CA_LECocDataWrite { 413 std::function<uint8_t(uint16_t cid, BT_HDR* p_data)> body{ 414 [](uint16_t cid, BT_HDR* p_data) { return 0; }}; operatorL2CA_LECocDataWrite415 uint8_t operator()(uint16_t cid, BT_HDR* p_data) { 416 return body(cid, p_data); 417 }; 418 }; 419 extern struct L2CA_LECocDataWrite L2CA_LECocDataWrite; 420 // Name: L2CA_SetChnlFlushability 421 // Params: uint16_t cid, bool is_flushable 422 // Returns: bool 423 struct L2CA_SetChnlFlushability { 424 std::function<bool(uint16_t cid, bool is_flushable)> body{ 425 [](uint16_t cid, bool is_flushable) { return false; }}; operatorL2CA_SetChnlFlushability426 bool operator()(uint16_t cid, bool is_flushable) { 427 return body(cid, is_flushable); 428 }; 429 }; 430 extern struct L2CA_SetChnlFlushability L2CA_SetChnlFlushability; 431 // Name: L2CA_FlushChannel 432 // Params: uint16_t lcid, uint16_t num_to_flush 433 // Returns: uint16_t 434 struct L2CA_FlushChannel { 435 std::function<uint16_t(uint16_t lcid, uint16_t num_to_flush)> body{ 436 [](uint16_t lcid, uint16_t num_to_flush) { return 0; }}; operatorL2CA_FlushChannel437 uint16_t operator()(uint16_t lcid, uint16_t num_to_flush) { 438 return body(lcid, num_to_flush); 439 }; 440 }; 441 extern struct L2CA_FlushChannel L2CA_FlushChannel; 442 // Name: L2CA_IsLinkEstablished 443 // Params: const RawAddress& bd_addr, tBT_TRANSPORT transport 444 // Returns: bool 445 struct L2CA_IsLinkEstablished { 446 std::function<bool(const RawAddress& bd_addr, tBT_TRANSPORT transport)> body{ 447 [](const RawAddress& bd_addr, tBT_TRANSPORT transport) { return false; }}; operatorL2CA_IsLinkEstablished448 bool operator()(const RawAddress& bd_addr, tBT_TRANSPORT transport) { 449 return body(bd_addr, transport); 450 }; 451 }; 452 extern struct L2CA_IsLinkEstablished L2CA_IsLinkEstablished; 453 454 } // namespace stack_l2cap_api 455 } // namespace mock 456 } // namespace test 457 458 // END mockcify generation 459