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 #pragma once 18 19 /* 20 * Generated mock file from original source file 21 * Functions generated:33 22 * 23 * mockcify.pl ver 0.2 24 */ 25 26 #include <functional> 27 #include <vector> 28 29 // Original included files, if any 30 31 #include <cstdint> 32 33 #include "stack/include/bt_hdr.h" 34 #include "stack/include/l2cap_interface.h" 35 #include "types/bt_transport.h" 36 #include "types/raw_address.h" 37 38 // Mocked compile conditionals, if any 39 namespace test { 40 namespace mock { 41 namespace stack_l2cap_api { 42 // Name: L2CA_RegisterWithSecurity 43 // Params: uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, bool enable_snoop, 44 // tL2CAP_ERTM_INFO* p_ertm_info, uint16_t my_mtu, uint16_t required_remote_mtu, 45 // uint16_t sec_level Returns: uint16_t 46 struct L2CA_RegisterWithSecurity { 47 std::function<uint16_t(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, bool enable_snoop, 48 tL2CAP_ERTM_INFO* p_ertm_info, uint16_t my_mtu, 49 uint16_t required_remote_mtu, uint16_t sec_level)> 50 body{[](uint16_t /* psm */, const tL2CAP_APPL_INFO& /* p_cb_info */, 51 bool /* enable_snoop */, tL2CAP_ERTM_INFO* /* p_ertm_info */, 52 uint16_t /* my_mtu */, uint16_t /* required_remote_mtu */, 53 uint16_t /* sec_level */) { return 0; }}; operatorL2CA_RegisterWithSecurity54 uint16_t operator()(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, bool enable_snoop, 55 tL2CAP_ERTM_INFO* p_ertm_info, uint16_t my_mtu, uint16_t required_remote_mtu, 56 uint16_t sec_level) { 57 return body(psm, p_cb_info, enable_snoop, p_ertm_info, my_mtu, required_remote_mtu, sec_level); 58 } 59 }; 60 extern struct L2CA_RegisterWithSecurity L2CA_RegisterWithSecurity; 61 // Name: L2CA_Register 62 // Params: uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, bool enable_snoop, 63 // tL2CAP_ERTM_INFO* p_ertm_info, uint16_t my_mtu, uint16_t required_remote_mtu, 64 // uint16_t sec_level Returns: uint16_t 65 struct L2CA_Register { 66 std::function<uint16_t(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, bool enable_snoop, 67 tL2CAP_ERTM_INFO* p_ertm_info, uint16_t my_mtu, 68 uint16_t required_remote_mtu, uint16_t sec_level)> 69 body{[](uint16_t /* psm */, const tL2CAP_APPL_INFO& /* p_cb_info */, 70 bool /* enable_snoop */, tL2CAP_ERTM_INFO* /* p_ertm_info */, 71 uint16_t /* my_mtu */, uint16_t /* required_remote_mtu */, 72 uint16_t /* sec_level */) { return 0; }}; operatorL2CA_Register73 uint16_t operator()(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, bool enable_snoop, 74 tL2CAP_ERTM_INFO* p_ertm_info, uint16_t my_mtu, uint16_t required_remote_mtu, 75 uint16_t sec_level) { 76 return body(psm, p_cb_info, enable_snoop, p_ertm_info, my_mtu, required_remote_mtu, sec_level); 77 } 78 }; 79 extern struct L2CA_Register L2CA_Register; 80 // Name: L2CA_Deregister 81 // Params: uint16_t psm 82 // Returns: void 83 struct L2CA_Deregister { 84 std::function<void(uint16_t /* psm */)> body{[](uint16_t /* psm */) {}}; operatorL2CA_Deregister85 void operator()(uint16_t psm) { body(psm); } 86 }; 87 extern struct L2CA_Deregister L2CA_Deregister; 88 // Name: L2CA_AllocateLePSM 89 // Params: void 90 // Returns: uint16_t 91 struct L2CA_AllocateLePSM { 92 std::function<uint16_t(void)> body{[](void) { return 0; }}; operatorL2CA_AllocateLePSM93 uint16_t operator()(void) { return body(); } 94 }; 95 extern struct L2CA_AllocateLePSM L2CA_AllocateLePSM; 96 // Name: L2CA_FreeLePSM 97 // Params: uint16_t psm 98 // Returns: void 99 struct L2CA_FreeLePSM { 100 std::function<void(uint16_t /* psm */)> body{[](uint16_t /* psm */) {}}; operatorL2CA_FreeLePSM101 void operator()(uint16_t psm) { body(psm); } 102 }; 103 extern struct L2CA_FreeLePSM L2CA_FreeLePSM; 104 // Name: L2CA_ConnectReqWithSecurity 105 // Params: uint16_t psm, const RawAddress& p_bd_addr, uint16_t sec_level 106 // Returns: uint16_t 107 struct L2CA_ConnectReqWithSecurity { 108 std::function<uint16_t(uint16_t psm, const RawAddress& p_bd_addr, uint16_t sec_level)> body{ 109 [](uint16_t /* psm */, const RawAddress& /* p_bd_addr */, uint16_t /* sec_level */) { 110 return 0; 111 }}; operatorL2CA_ConnectReqWithSecurity112 uint16_t operator()(uint16_t psm, const RawAddress& p_bd_addr, uint16_t sec_level) { 113 return body(psm, p_bd_addr, sec_level); 114 } 115 }; 116 extern struct L2CA_ConnectReqWithSecurity L2CA_ConnectReqWithSecurity; 117 // Name: L2CA_ConnectReq 118 // Params: uint16_t psm, const RawAddress& p_bd_addr 119 // Returns: uint16_t 120 struct L2CA_ConnectReq { 121 std::function<uint16_t(uint16_t psm, const RawAddress& p_bd_addr)> body{ 122 [](uint16_t /* psm */, const RawAddress& /* p_bd_addr */) { return 0; }}; operatorL2CA_ConnectReq123 uint16_t operator()(uint16_t psm, const RawAddress& p_bd_addr) { return body(psm, p_bd_addr); } 124 }; 125 extern struct L2CA_ConnectReq L2CA_ConnectReq; 126 // Name: L2CA_RegisterLECoc 127 // Params: uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, uint16_t sec_level, 128 // tL2CAP_LE_CFG_INFO cfg Returns: uint16_t 129 struct L2CA_RegisterLECoc { 130 std::function<uint16_t(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, uint16_t sec_level, 131 tL2CAP_LE_CFG_INFO cfg)> 132 body{[](uint16_t /* psm */, const tL2CAP_APPL_INFO& /* p_cb_info */, 133 uint16_t /* sec_level */, tL2CAP_LE_CFG_INFO /* cfg */) { return 0; }}; operatorL2CA_RegisterLECoc134 uint16_t operator()(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, uint16_t sec_level, 135 tL2CAP_LE_CFG_INFO cfg) { 136 return body(psm, p_cb_info, sec_level, cfg); 137 } 138 }; 139 extern struct L2CA_RegisterLECoc L2CA_RegisterLECoc; 140 // Name: L2CA_DeregisterLECoc 141 // Params: uint16_t psm 142 // Returns: void 143 struct L2CA_DeregisterLECoc { 144 std::function<void(uint16_t psm)> body{[](uint16_t /* psm */) {}}; operatorL2CA_DeregisterLECoc145 void operator()(uint16_t psm) { body(psm); } 146 }; 147 extern struct L2CA_DeregisterLECoc L2CA_DeregisterLECoc; 148 // Name: L2CA_ConnectLECocReq 149 // Params: uint16_t psm, const RawAddress& p_bd_addr, tL2CAP_LE_CFG_INFO* p_cfg, 150 // uint16_t sec_level Returns: uint16_t 151 struct L2CA_ConnectLECocReq { 152 std::function<uint16_t(uint16_t psm, const RawAddress& p_bd_addr, tL2CAP_LE_CFG_INFO* p_cfg, 153 uint16_t sec_level)> 154 body{[](uint16_t /* psm */, const RawAddress& /* p_bd_addr */, 155 tL2CAP_LE_CFG_INFO* /* p_cfg */, uint16_t /* sec_level */) { return 0; }}; operatorL2CA_ConnectLECocReq156 uint16_t operator()(uint16_t psm, const RawAddress& p_bd_addr, tL2CAP_LE_CFG_INFO* p_cfg, 157 uint16_t sec_level) { 158 return body(psm, p_bd_addr, p_cfg, sec_level); 159 } 160 }; 161 extern struct L2CA_ConnectLECocReq L2CA_ConnectLECocReq; 162 // Name: L2CA_GetPeerLECocConfig 163 // Params: uint16_t lcid, tL2CAP_LE_CFG_INFO* peer_cfg 164 // Returns: bool 165 struct L2CA_GetPeerLECocConfig { 166 std::function<bool(uint16_t lcid, tL2CAP_LE_CFG_INFO* peer_cfg)> body{ 167 [](uint16_t /* lcid */, tL2CAP_LE_CFG_INFO* /* peer_cfg */) { return false; }}; operatorL2CA_GetPeerLECocConfig168 bool operator()(uint16_t lcid, tL2CAP_LE_CFG_INFO* peer_cfg) { return body(lcid, peer_cfg); } 169 }; 170 extern struct L2CA_GetPeerLECocConfig L2CA_GetPeerLECocConfig; 171 // Name: L2CA_ConnectCreditBasedRsp 172 // Params: const RawAddress& p_bd_addr, uint8_t id, std::vector<uint16_t>& 173 // accepted_lcids, uint16_t result, tL2CAP_LE_CFG_INFO* p_cfg Returns: bool 174 struct L2CA_ConnectCreditBasedRsp { 175 std::function<bool(const RawAddress& p_bd_addr, uint8_t id, std::vector<uint16_t>& accepted_lcids, 176 tL2CAP_LE_RESULT_CODE result, tL2CAP_LE_CFG_INFO* p_cfg)> 177 body{[](const RawAddress& /* p_bd_addr */, uint8_t /* id */, 178 std::vector<uint16_t>& /* accepted_lcids */, tL2CAP_LE_RESULT_CODE /* result */, 179 tL2CAP_LE_CFG_INFO* /* p_cfg */) { return false; }}; operatorL2CA_ConnectCreditBasedRsp180 bool operator()(const RawAddress& p_bd_addr, uint8_t id, std::vector<uint16_t>& accepted_lcids, 181 tL2CAP_LE_RESULT_CODE result, tL2CAP_LE_CFG_INFO* p_cfg) { 182 return body(p_bd_addr, id, accepted_lcids, result, p_cfg); 183 } 184 }; 185 extern struct L2CA_ConnectCreditBasedRsp L2CA_ConnectCreditBasedRsp; 186 // Name: L2CA_ConnectCreditBasedReq 187 // Params: uint16_t psm, const RawAddress& p_bd_addr, tL2CAP_LE_CFG_INFO* p_cfg 188 // Returns: std::vector<uint16_t> 189 struct L2CA_ConnectCreditBasedReq { 190 std::vector<uint16_t> cids; 191 std::function<std::vector<uint16_t>(uint16_t psm, const RawAddress& p_bd_addr, 192 tL2CAP_LE_CFG_INFO* p_cfg)> 193 body{[this](uint16_t /* psm */, const RawAddress& /* p_bd_addr */, 194 tL2CAP_LE_CFG_INFO* /* p_cfg */) { return cids; }}; operatorL2CA_ConnectCreditBasedReq195 std::vector<uint16_t> operator()(uint16_t psm, const RawAddress& p_bd_addr, 196 tL2CAP_LE_CFG_INFO* p_cfg) { 197 return body(psm, p_bd_addr, p_cfg); 198 } 199 }; 200 extern struct L2CA_ConnectCreditBasedReq L2CA_ConnectCreditBasedReq; 201 // Name: L2CA_ReconfigCreditBasedConnsReq 202 // Params: const RawAddress& bda, std::vector<uint16_t>& lcids, 203 // tL2CAP_LE_CFG_INFO* p_cfg Returns: bool 204 struct L2CA_ReconfigCreditBasedConnsReq { 205 std::function<bool(const RawAddress& bda, std::vector<uint16_t>& lcids, 206 tL2CAP_LE_CFG_INFO* p_cfg)> 207 body{[](const RawAddress& /* bda */, std::vector<uint16_t>& /* lcids */, 208 tL2CAP_LE_CFG_INFO* /* p_cfg */) { return false; }}; operatorL2CA_ReconfigCreditBasedConnsReq209 bool operator()(const RawAddress& bda, std::vector<uint16_t>& lcids, tL2CAP_LE_CFG_INFO* p_cfg) { 210 return body(bda, lcids, p_cfg); 211 } 212 }; 213 extern struct L2CA_ReconfigCreditBasedConnsReq L2CA_ReconfigCreditBasedConnsReq; 214 // Name: L2CA_DisconnectReq 215 // Params: uint16_t cid 216 // Returns: bool 217 struct L2CA_DisconnectReq { 218 std::function<bool(uint16_t cid)> body{[](uint16_t /* cid */) { return false; }}; operatorL2CA_DisconnectReq219 bool operator()(uint16_t cid) { return body(cid); } 220 }; 221 extern struct L2CA_DisconnectReq L2CA_DisconnectReq; 222 // Name: L2CA_DisconnectLECocReq 223 // Params: uint16_t cid 224 // Returns: bool 225 struct L2CA_DisconnectLECocReq { 226 std::function<bool(uint16_t cid)> body{[](uint16_t /* cid */) { return false; }}; operatorL2CA_DisconnectLECocReq227 bool operator()(uint16_t cid) { return body(cid); } 228 }; 229 extern struct L2CA_DisconnectLECocReq L2CA_DisconnectLECocReq; 230 // Name: L2CA_GetRemoteChannelId 231 // Params: uint16_t lcid, uint16_t* rcid 232 // Returns: bool 233 struct L2CA_GetRemoteChannelId { 234 std::function<bool(uint16_t lcid, uint16_t* rcid)> body{ 235 [](uint16_t /* lcid */, uint16_t* /* rcid */) { return false; }}; operatorL2CA_GetRemoteChannelId236 bool operator()(uint16_t lcid, uint16_t* rcid) { return body(lcid, rcid); } 237 }; 238 extern struct L2CA_GetRemoteChannelId L2CA_GetRemoteChannelId; 239 // Name: L2CA_SetIdleTimeoutByBdAddr 240 // Params: const RawAddress& bd_addr, uint16_t timeout, tBT_TRANSPORT transport 241 // Returns: bool 242 struct L2CA_SetIdleTimeoutByBdAddr { 243 std::function<bool(const RawAddress& bd_addr, uint16_t timeout, tBT_TRANSPORT transport)> body{ 244 [](const RawAddress& /* bd_addr */, uint16_t /* timeout */, 245 tBT_TRANSPORT /* transport */) { return false; }}; operatorL2CA_SetIdleTimeoutByBdAddr246 bool operator()(const RawAddress& bd_addr, uint16_t timeout, tBT_TRANSPORT transport) { 247 return body(bd_addr, timeout, transport); 248 } 249 }; 250 extern struct L2CA_SetIdleTimeoutByBdAddr L2CA_SetIdleTimeoutByBdAddr; 251 // Name: L2CA_UseLatencyMode 252 // Params: const RawAddress& bd_addr, bool use_latency_mode 253 // Returns: bool 254 struct L2CA_UseLatencyMode { 255 std::function<bool(const RawAddress& bd_addr, bool use_latency_mode)> body{ 256 [](const RawAddress& /* bd_addr */, bool /* use_latency_mode */) { return false; }}; operatorL2CA_UseLatencyMode257 bool operator()(const RawAddress& bd_addr, bool use_latency_mode) { 258 return body(bd_addr, use_latency_mode); 259 } 260 }; 261 extern struct L2CA_UseLatencyMode L2CA_UseLatencyMode; 262 // Name: L2CA_SetAclPriority 263 // Params: const RawAddress& bd_addr, tL2CAP_PRIORITY priority, 264 // Returns: bool 265 struct L2CA_SetAclPriority { 266 std::function<bool(const RawAddress& bd_addr, tL2CAP_PRIORITY priority)> body{ 267 [](const RawAddress& /* bd_addr */, tL2CAP_PRIORITY /* priority */) { return false; }}; operatorL2CA_SetAclPriority268 bool operator()(const RawAddress& bd_addr, tL2CAP_PRIORITY priority) { 269 return body(bd_addr, priority); 270 } 271 }; 272 extern struct L2CA_SetAclPriority L2CA_SetAclPriority; 273 // Name: L2CA_SetAclLatency 274 // Params: const RawAddress& bd_addr, tL2CAP_LATENCY latency 275 // Returns: bool 276 struct L2CA_SetAclLatency { 277 std::function<bool(const RawAddress& bd_addr, tL2CAP_LATENCY latency)> body{ 278 [](const RawAddress& /* bd_addr */, tL2CAP_LATENCY /* latency */) { return false; }}; operatorL2CA_SetAclLatency279 bool operator()(const RawAddress& bd_addr, tL2CAP_LATENCY latency) { 280 return body(bd_addr, latency); 281 } 282 }; 283 extern struct L2CA_SetAclLatency L2CA_SetAclLatency; 284 // Name: L2CA_SetTxPriority 285 // Params: uint16_t cid, tL2CAP_CHNL_PRIORITY priority 286 // Returns: bool 287 struct L2CA_SetTxPriority { 288 std::function<bool(uint16_t cid, tL2CAP_CHNL_PRIORITY priority)> body{ 289 [](uint16_t /* cid */, tL2CAP_CHNL_PRIORITY /* priority */) { return false; }}; operatorL2CA_SetTxPriority290 bool operator()(uint16_t cid, tL2CAP_CHNL_PRIORITY priority) { return body(cid, priority); } 291 }; 292 extern struct L2CA_SetTxPriority L2CA_SetTxPriority; 293 // Name: L2CA_GetPeerFeatures 294 // Params: const RawAddress& bd_addr, uint32_t* p_ext_feat, uint8_t* p_chnl_mask 295 // Returns: bool 296 struct L2CA_GetPeerFeatures { 297 std::function<bool(const RawAddress& bd_addr, uint32_t* p_ext_feat, uint8_t* p_chnl_mask)> body{ 298 [](const RawAddress& /* bd_addr */, uint32_t* /* p_ext_feat */, 299 uint8_t* /* p_chnl_mask */) { return false; }}; operatorL2CA_GetPeerFeatures300 bool operator()(const RawAddress& bd_addr, uint32_t* p_ext_feat, uint8_t* p_chnl_mask) { 301 return body(bd_addr, p_ext_feat, p_chnl_mask); 302 } 303 }; 304 extern struct L2CA_GetPeerFeatures L2CA_GetPeerFeatures; 305 // Name: L2CA_RegisterFixedChannel 306 // Params: uint16_t fixed_cid, tL2CAP_FIXED_CHNL_REG* p_freg 307 // Returns: bool 308 struct L2CA_RegisterFixedChannel { 309 std::function<bool(uint16_t fixed_cid, tL2CAP_FIXED_CHNL_REG* p_freg)> body{ 310 [](uint16_t /* fixed_cid */, tL2CAP_FIXED_CHNL_REG* /* p_freg */) { return false; }}; operatorL2CA_RegisterFixedChannel311 bool operator()(uint16_t fixed_cid, tL2CAP_FIXED_CHNL_REG* p_freg) { 312 return body(fixed_cid, p_freg); 313 } 314 }; 315 extern struct L2CA_RegisterFixedChannel L2CA_RegisterFixedChannel; 316 // Name: L2CA_ConnectFixedChnl 317 // Params: uint16_t fixed_cid, const RawAddress& rem_bda 318 // Returns: bool 319 struct L2CA_ConnectFixedChnl { 320 std::function<bool(uint16_t fixed_cid, const RawAddress& rem_bda)> body{ 321 [](uint16_t /* fixed_cid */, const RawAddress& /* rem_bda */) { return false; }}; operatorL2CA_ConnectFixedChnl322 bool operator()(uint16_t fixed_cid, const RawAddress& rem_bda) { 323 return body(fixed_cid, rem_bda); 324 } 325 }; 326 extern struct L2CA_ConnectFixedChnl L2CA_ConnectFixedChnl; 327 // Name: L2CA_SendFixedChnlData 328 // Params: uint16_t fixed_cid, const RawAddress& rem_bda, BT_HDR* p_buf 329 // Returns: uint16_t 330 struct L2CA_SendFixedChnlData { 331 std::function<tL2CAP_DW_RESULT(uint16_t fixed_cid, const RawAddress& rem_bda, BT_HDR* p_buf)> 332 body{[](uint16_t /* fixed_cid */, const RawAddress& /* rem_bda */, 333 BT_HDR* /* p_buf */) -> tL2CAP_DW_RESULT { return tL2CAP_DW_RESULT::FAILED; }}; operatorL2CA_SendFixedChnlData334 tL2CAP_DW_RESULT operator()(uint16_t fixed_cid, const RawAddress& rem_bda, BT_HDR* p_buf) { 335 return body(fixed_cid, rem_bda, p_buf); 336 } 337 }; 338 extern struct L2CA_SendFixedChnlData L2CA_SendFixedChnlData; 339 // Name: L2CA_RemoveFixedChnl 340 // Params: uint16_t fixed_cid, const RawAddress& rem_bda 341 // Returns: bool 342 struct L2CA_RemoveFixedChnl { 343 std::function<bool(uint16_t fixed_cid, const RawAddress& rem_bda)> body{ 344 [](uint16_t /* fixed_cid */, const RawAddress& /* rem_bda */) { return false; }}; operatorL2CA_RemoveFixedChnl345 bool operator()(uint16_t fixed_cid, const RawAddress& rem_bda) { 346 return body(fixed_cid, rem_bda); 347 } 348 }; 349 extern struct L2CA_RemoveFixedChnl L2CA_RemoveFixedChnl; 350 // Name: L2CA_SetLeGattTimeout 351 // Params: const RawAddress& rem_bda, uint16_t idle_tout 352 // Returns: bool 353 struct L2CA_SetLeGattTimeout { 354 std::function<bool(const RawAddress& rem_bda, uint16_t idle_tout)> body{ 355 [](const RawAddress& /* rem_bda */, uint16_t /* idle_tout */) { return false; }}; operatorL2CA_SetLeGattTimeout356 bool operator()(const RawAddress& rem_bda, uint16_t idle_tout) { 357 return body(rem_bda, idle_tout); 358 } 359 }; 360 extern struct L2CA_SetLeGattTimeout L2CA_SetLeGattTimeout; 361 // Name: L2CA_MarkLeLinkAsActive 362 // Params: const RawAddress& rem_bda 363 // Returns: bool 364 struct L2CA_MarkLeLinkAsActive { 365 std::function<bool(const RawAddress& rem_bda)> body{ 366 [](const RawAddress& /* rem_bda */) { return false; }}; operatorL2CA_MarkLeLinkAsActive367 bool operator()(const RawAddress& rem_bda) { return body(rem_bda); } 368 }; 369 extern struct L2CA_MarkLeLinkAsActive L2CA_MarkLeLinkAsActive; 370 // Name: L2CA_DataWrite 371 // Params: uint16_t cid, BT_HDR* p_data 372 // Returns: uint8_t 373 struct L2CA_DataWrite { 374 std::function<tL2CAP_DW_RESULT(uint16_t cid, BT_HDR* p_data)> body{ 375 [](uint16_t /* cid */, BT_HDR* /* p_data */) -> tL2CAP_DW_RESULT { 376 return tL2CAP_DW_RESULT::FAILED; 377 }}; operatorL2CA_DataWrite378 tL2CAP_DW_RESULT operator()(uint16_t cid, BT_HDR* p_data) { return body(cid, p_data); } 379 }; 380 extern struct L2CA_DataWrite L2CA_DataWrite; 381 // Name: L2CA_LECocDataWrite 382 // Params: uint16_t cid, BT_HDR* p_data 383 // Returns: uint8_t 384 struct L2CA_LECocDataWrite { 385 std::function<tL2CAP_DW_RESULT(uint16_t cid, BT_HDR* p_data)> body{ 386 [](uint16_t /* cid */, BT_HDR* /* p_data */) -> tL2CAP_DW_RESULT { 387 return tL2CAP_DW_RESULT::FAILED; 388 }}; operatorL2CA_LECocDataWrite389 tL2CAP_DW_RESULT operator()(uint16_t cid, BT_HDR* p_data) { return body(cid, p_data); } 390 }; 391 extern struct L2CA_LECocDataWrite L2CA_LECocDataWrite; 392 // Name: L2CA_SetChnlFlushability 393 // Params: uint16_t cid, bool is_flushable 394 // Returns: bool 395 struct L2CA_SetChnlFlushability { 396 std::function<bool(uint16_t cid, bool is_flushable)> body{ 397 [](uint16_t /* cid */, bool /* is_flushable */) { return false; }}; operatorL2CA_SetChnlFlushability398 bool operator()(uint16_t cid, bool is_flushable) { return body(cid, is_flushable); } 399 }; 400 extern struct L2CA_SetChnlFlushability L2CA_SetChnlFlushability; 401 // Name: L2CA_FlushChannel 402 // Params: uint16_t lcid, uint16_t num_to_flush 403 // Returns: uint16_t 404 struct L2CA_FlushChannel { 405 std::function<uint16_t(uint16_t lcid, uint16_t num_to_flush)> body{ 406 [](uint16_t /* lcid */, uint16_t /* num_to_flush */) { return 0; }}; operatorL2CA_FlushChannel407 uint16_t operator()(uint16_t lcid, uint16_t num_to_flush) { return body(lcid, num_to_flush); } 408 }; 409 extern struct L2CA_FlushChannel L2CA_FlushChannel; 410 // Name: L2CA_IsLinkEstablished 411 // Params: const RawAddress& bd_addr, tBT_TRANSPORT transport 412 // Returns: bool 413 struct L2CA_IsLinkEstablished { 414 std::function<bool(const RawAddress& bd_addr, tBT_TRANSPORT transport)> body{ 415 [](const RawAddress& /* bd_addr */, tBT_TRANSPORT /* transport */) { return false; }}; operatorL2CA_IsLinkEstablished416 bool operator()(const RawAddress& bd_addr, tBT_TRANSPORT transport) { 417 return body(bd_addr, transport); 418 } 419 }; 420 extern struct L2CA_IsLinkEstablished L2CA_IsLinkEstablished; 421 // Name: L2CA_SetMediaStreamChannel 422 // Params: uint16_t handle, uint16_t channel_id, bool is_local_cid 423 // Returns: void 424 struct L2CA_SetMediaStreamChannel { 425 std::function<void(uint16_t local_media_cid, bool status)> body{ 426 [](uint16_t /* local_media_cid */, bool /* status */) {}}; operatorL2CA_SetMediaStreamChannel427 void operator()(uint16_t local_media_cid, bool status) { body(local_media_cid, status); } 428 }; 429 extern struct L2CA_SetMediaStreamChannel L2CA_SetMediaStreamChannel; 430 // Name: L2CA_isMediaChannel 431 // Params: uint16_t handle, uint16_t channel_id, bool is_local_cid 432 // Returns: bool 433 struct L2CA_isMediaChannel { 434 std::function<bool(uint16_t handle, uint16_t channel_id, bool is_local_cid)> body{ 435 [](uint16_t /* handle */, uint16_t /* channel_id */, bool /* is_local_cid */) { 436 return false; 437 }}; operatorL2CA_isMediaChannel438 bool operator()(uint16_t handle, uint16_t channel_id, bool is_local_cid) { 439 return body(handle, channel_id, is_local_cid); 440 } 441 }; 442 extern struct L2CA_isMediaChannel L2CA_isMediaChannel; 443 // Name: L2CA_LeCreditDefault 444 // Params: 445 // Returns: uint16_t 446 struct L2CA_LeCreditDefault { 447 std::function<uint16_t()> body{[]() { return 0; }}; operatorL2CA_LeCreditDefault448 uint16_t operator()() { return body(); } 449 }; 450 extern struct L2CA_LeCreditDefault L2CA_LeCreditDefault; 451 // Name: L2CA_LeCreditThreshold 452 // Params: 453 // Returns: uint16_t 454 struct L2CA_LeCreditThreshold { 455 std::function<uint16_t()> body{[]() { return 0; }}; operatorL2CA_LeCreditThreshold456 uint16_t operator()() { return body(); } 457 }; 458 extern struct L2CA_LeCreditThreshold L2CA_LeCreditThreshold; 459 460 // Name: L2CA_GetAclHandle 461 // Params: uint16_t lcid, uint16_t* acl_handle 462 // Returns: bool 463 struct L2CA_GetAclHandle { 464 std::function<bool(uint16_t lcid, uint16_t* acl_handle)> body{ 465 [](uint16_t /* lcid */, uint16_t* /* acl_handle */) { return false; }}; operatorL2CA_GetAclHandle466 bool operator()(uint16_t lcid, uint16_t* acl_handle) { return body(lcid, acl_handle); } 467 }; 468 extern struct L2CA_GetAclHandle L2CA_GetAclHandle; 469 470 } // namespace stack_l2cap_api 471 } // namespace mock 472 } // namespace test 473 474 // END mockcify generation 475