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 <vector>
26 
27 // Original included files, if any
28 
29 #include <cstdint>
30 
31 #include "stack/include/bt_hdr.h"
32 #include "stack/include/l2c_api.h"
33 #include "types/raw_address.h"
34 
35 // Mocked compile conditionals, if any
36 namespace test {
37 namespace mock {
38 namespace stack_l2cap_api {
39 
40 // Shared state between mocked functions and tests
41 // Name: l2c_get_transport_from_fixed_cid
42 // Params: uint16_t fixed_cid
43 // Returns: tBT_TRANSPORT
44 struct l2c_get_transport_from_fixed_cid {
45   std::function<tBT_TRANSPORT(uint16_t fixed_cid)> body{
46       [](uint16_t /* fixed_cid */) { return 0; }};
operatorl2c_get_transport_from_fixed_cid47   tBT_TRANSPORT operator()(uint16_t fixed_cid) { return body(fixed_cid); };
48 };
49 extern struct l2c_get_transport_from_fixed_cid l2c_get_transport_from_fixed_cid;
50 // Name: L2CA_RegisterWithSecurity
51 // Params: uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, bool enable_snoop,
52 // tL2CAP_ERTM_INFO* p_ertm_info, uint16_t my_mtu, uint16_t required_remote_mtu,
53 // uint16_t sec_level Returns: uint16_t
54 struct L2CA_RegisterWithSecurity {
55   std::function<uint16_t(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info,
56                          bool enable_snoop, tL2CAP_ERTM_INFO* p_ertm_info,
57                          uint16_t my_mtu, uint16_t required_remote_mtu,
58                          uint16_t sec_level)>
59       body{[](uint16_t /* psm */, const tL2CAP_APPL_INFO& /* p_cb_info */,
60               bool /* enable_snoop */, tL2CAP_ERTM_INFO* /* p_ertm_info */,
61               uint16_t /* my_mtu */, uint16_t /* required_remote_mtu */,
62               uint16_t /* sec_level */) { return 0; }};
operatorL2CA_RegisterWithSecurity63   uint16_t operator()(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info,
64                       bool enable_snoop, tL2CAP_ERTM_INFO* p_ertm_info,
65                       uint16_t my_mtu, uint16_t required_remote_mtu,
66                       uint16_t sec_level) {
67     return body(psm, p_cb_info, enable_snoop, p_ertm_info, my_mtu,
68                 required_remote_mtu, sec_level);
69   };
70 };
71 extern struct L2CA_RegisterWithSecurity L2CA_RegisterWithSecurity;
72 // Name: L2CA_Register
73 // Params: 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 Returns: uint16_t
76 struct L2CA_Register {
77   std::function<uint16_t(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info,
78                          bool enable_snoop, tL2CAP_ERTM_INFO* p_ertm_info,
79                          uint16_t my_mtu, uint16_t required_remote_mtu,
80                          uint16_t sec_level)>
81       body{[](uint16_t /* psm */, const tL2CAP_APPL_INFO& /* p_cb_info */,
82               bool /* enable_snoop */, tL2CAP_ERTM_INFO* /* p_ertm_info */,
83               uint16_t /* my_mtu */, uint16_t /* required_remote_mtu */,
84               uint16_t /* sec_level */) { return 0; }};
operatorL2CA_Register85   uint16_t operator()(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info,
86                       bool enable_snoop, tL2CAP_ERTM_INFO* p_ertm_info,
87                       uint16_t my_mtu, uint16_t required_remote_mtu,
88                       uint16_t sec_level) {
89     return body(psm, p_cb_info, enable_snoop, p_ertm_info, my_mtu,
90                 required_remote_mtu, sec_level);
91   };
92 };
93 extern struct L2CA_Register L2CA_Register;
94 // Name: L2CA_Deregister
95 // Params: uint16_t psm
96 // Returns: void
97 struct L2CA_Deregister {
98   std::function<void(uint16_t /* psm */)> body{[](uint16_t /* psm */) {}};
operatorL2CA_Deregister99   void operator()(uint16_t psm) { body(psm); };
100 };
101 extern struct L2CA_Deregister L2CA_Deregister;
102 // Name: L2CA_AllocateLePSM
103 // Params: void
104 // Returns: uint16_t
105 struct L2CA_AllocateLePSM {
106   std::function<uint16_t(void)> body{[](void) { return 0; }};
operatorL2CA_AllocateLePSM107   uint16_t operator()(void) { return body(); };
108 };
109 extern struct L2CA_AllocateLePSM L2CA_AllocateLePSM;
110 // Name: L2CA_FreeLePSM
111 // Params: uint16_t psm
112 // Returns: void
113 struct L2CA_FreeLePSM {
114   std::function<void(uint16_t /* psm */)> body{[](uint16_t /* psm */) {}};
operatorL2CA_FreeLePSM115   void operator()(uint16_t psm) { body(psm); };
116 };
117 extern struct L2CA_FreeLePSM L2CA_FreeLePSM;
118 // Name: L2CA_ConnectReqWithSecurity
119 // Params: uint16_t psm, const RawAddress& p_bd_addr, uint16_t sec_level
120 // Returns: uint16_t
121 struct L2CA_ConnectReqWithSecurity {
122   std::function<uint16_t(uint16_t psm, const RawAddress& p_bd_addr,
123                          uint16_t sec_level)>
124       body{[](uint16_t /* psm */, const RawAddress& /* p_bd_addr */,
125               uint16_t /* sec_level */) { return 0; }};
operatorL2CA_ConnectReqWithSecurity126   uint16_t operator()(uint16_t psm, const RawAddress& p_bd_addr,
127                       uint16_t sec_level) {
128     return body(psm, p_bd_addr, sec_level);
129   };
130 };
131 extern struct L2CA_ConnectReqWithSecurity L2CA_ConnectReqWithSecurity;
132 // Name: L2CA_ConnectReq
133 // Params: uint16_t psm, const RawAddress& p_bd_addr
134 // Returns: uint16_t
135 struct L2CA_ConnectReq {
136   std::function<uint16_t(uint16_t psm, const RawAddress& p_bd_addr)> body{
137       [](uint16_t /* psm */, const RawAddress& /* p_bd_addr */) { return 0; }};
operatorL2CA_ConnectReq138   uint16_t operator()(uint16_t psm, const RawAddress& p_bd_addr) {
139     return body(psm, p_bd_addr);
140   };
141 };
142 extern struct L2CA_ConnectReq L2CA_ConnectReq;
143 // Name: L2CA_RegisterLECoc
144 // Params: uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info, uint16_t sec_level,
145 // tL2CAP_LE_CFG_INFO cfg Returns: uint16_t
146 struct L2CA_RegisterLECoc {
147   std::function<uint16_t(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info,
148                          uint16_t sec_level, tL2CAP_LE_CFG_INFO cfg)>
149       body{[](uint16_t /* psm */, const tL2CAP_APPL_INFO& /* p_cb_info */,
150               uint16_t /* sec_level */,
151               tL2CAP_LE_CFG_INFO /* cfg */) { return 0; }};
operatorL2CA_RegisterLECoc152   uint16_t operator()(uint16_t psm, const tL2CAP_APPL_INFO& p_cb_info,
153                       uint16_t sec_level, tL2CAP_LE_CFG_INFO cfg) {
154     return body(psm, p_cb_info, sec_level, cfg);
155   };
156 };
157 extern struct L2CA_RegisterLECoc L2CA_RegisterLECoc;
158 // Name: L2CA_DeregisterLECoc
159 // Params: uint16_t psm
160 // Returns: void
161 struct L2CA_DeregisterLECoc {
162   std::function<void(uint16_t psm)> body{[](uint16_t /* psm */) {}};
operatorL2CA_DeregisterLECoc163   void operator()(uint16_t psm) { body(psm); };
164 };
165 extern struct L2CA_DeregisterLECoc L2CA_DeregisterLECoc;
166 // Name: L2CA_ConnectLECocReq
167 // Params: uint16_t psm, const RawAddress& p_bd_addr, tL2CAP_LE_CFG_INFO* p_cfg,
168 // uint16_t sec_level Returns: uint16_t
169 struct L2CA_ConnectLECocReq {
170   std::function<uint16_t(uint16_t psm, const RawAddress& p_bd_addr,
171                          tL2CAP_LE_CFG_INFO* p_cfg, uint16_t sec_level)>
172       body{[](uint16_t /* psm */, const RawAddress& /* p_bd_addr */,
173               tL2CAP_LE_CFG_INFO* /* p_cfg */,
174               uint16_t /* sec_level */) { return 0; }};
operatorL2CA_ConnectLECocReq175   uint16_t operator()(uint16_t psm, const RawAddress& p_bd_addr,
176                       tL2CAP_LE_CFG_INFO* p_cfg, uint16_t sec_level) {
177     return body(psm, p_bd_addr, p_cfg, sec_level);
178   };
179 };
180 extern struct L2CA_ConnectLECocReq L2CA_ConnectLECocReq;
181 // Name: L2CA_GetPeerLECocConfig
182 // Params: uint16_t lcid, tL2CAP_LE_CFG_INFO* peer_cfg
183 // Returns: bool
184 struct L2CA_GetPeerLECocConfig {
185   std::function<bool(uint16_t lcid, tL2CAP_LE_CFG_INFO* peer_cfg)> body{
186       [](uint16_t /* lcid */, tL2CAP_LE_CFG_INFO* /* peer_cfg */) {
187         return false;
188       }};
operatorL2CA_GetPeerLECocConfig189   bool operator()(uint16_t lcid, tL2CAP_LE_CFG_INFO* peer_cfg) {
190     return body(lcid, peer_cfg);
191   };
192 };
193 extern struct L2CA_GetPeerLECocConfig L2CA_GetPeerLECocConfig;
194 // Name: L2CA_ConnectCreditBasedRsp
195 // Params: const RawAddress& p_bd_addr, uint8_t id, std::vector<uint16_t>&
196 // accepted_lcids, uint16_t result, tL2CAP_LE_CFG_INFO* p_cfg Returns: bool
197 struct L2CA_ConnectCreditBasedRsp {
198   std::function<bool(const RawAddress& p_bd_addr, uint8_t id,
199                      std::vector<uint16_t>& accepted_lcids, uint16_t result,
200                      tL2CAP_LE_CFG_INFO* p_cfg)>
201       body{[](const RawAddress& /* p_bd_addr */, uint8_t /* id */,
202               std::vector<uint16_t>& /* accepted_lcids */,
203               uint16_t /* result */,
204               tL2CAP_LE_CFG_INFO* /* p_cfg */) { return false; }};
operatorL2CA_ConnectCreditBasedRsp205   bool operator()(const RawAddress& p_bd_addr, uint8_t id,
206                   std::vector<uint16_t>& accepted_lcids, uint16_t result,
207                   tL2CAP_LE_CFG_INFO* p_cfg) {
208     return body(p_bd_addr, id, accepted_lcids, result, p_cfg);
209   };
210 };
211 extern struct L2CA_ConnectCreditBasedRsp L2CA_ConnectCreditBasedRsp;
212 // Name: L2CA_ConnectCreditBasedReq
213 // Params: uint16_t psm, const RawAddress& p_bd_addr, tL2CAP_LE_CFG_INFO* p_cfg
214 // Returns: std::vector<uint16_t>
215 struct L2CA_ConnectCreditBasedReq {
216   std::vector<uint16_t> cids;
217   std::function<std::vector<uint16_t>(uint16_t psm, const RawAddress& p_bd_addr,
218                                       tL2CAP_LE_CFG_INFO* p_cfg)>
219       body{[this](uint16_t /* psm */, const RawAddress& /* p_bd_addr */,
220                   tL2CAP_LE_CFG_INFO* /* p_cfg */) { return cids; }};
operatorL2CA_ConnectCreditBasedReq221   std::vector<uint16_t> operator()(uint16_t psm, const RawAddress& p_bd_addr,
222                                    tL2CAP_LE_CFG_INFO* p_cfg) {
223     return body(psm, p_bd_addr, p_cfg);
224   };
225 };
226 extern struct L2CA_ConnectCreditBasedReq L2CA_ConnectCreditBasedReq;
227 // Name: L2CA_ReconfigCreditBasedConnsReq
228 // Params: const RawAddress& bda, std::vector<uint16_t>& lcids,
229 // tL2CAP_LE_CFG_INFO* p_cfg Returns: bool
230 struct L2CA_ReconfigCreditBasedConnsReq {
231   std::function<bool(const RawAddress& bda, std::vector<uint16_t>& lcids,
232                      tL2CAP_LE_CFG_INFO* p_cfg)>
233       body{[](const RawAddress& /* bda */, std::vector<uint16_t>& /* lcids */,
234               tL2CAP_LE_CFG_INFO* /* p_cfg */) { return false; }};
operatorL2CA_ReconfigCreditBasedConnsReq235   bool operator()(const RawAddress& bda, std::vector<uint16_t>& lcids,
236                   tL2CAP_LE_CFG_INFO* p_cfg) {
237     return body(bda, lcids, p_cfg);
238   };
239 };
240 extern struct L2CA_ReconfigCreditBasedConnsReq L2CA_ReconfigCreditBasedConnsReq;
241 // Name: L2CA_DisconnectReq
242 // Params: uint16_t cid
243 // Returns: bool
244 struct L2CA_DisconnectReq {
245   std::function<bool(uint16_t cid)> body{
246       [](uint16_t /* cid */) { return false; }};
operatorL2CA_DisconnectReq247   bool operator()(uint16_t cid) { return body(cid); };
248 };
249 extern struct L2CA_DisconnectReq L2CA_DisconnectReq;
250 // Name: L2CA_DisconnectLECocReq
251 // Params: uint16_t cid
252 // Returns: bool
253 struct L2CA_DisconnectLECocReq {
254   std::function<bool(uint16_t cid)> body{
255       [](uint16_t /* cid */) { return false; }};
operatorL2CA_DisconnectLECocReq256   bool operator()(uint16_t cid) { return body(cid); };
257 };
258 extern struct L2CA_DisconnectLECocReq L2CA_DisconnectLECocReq;
259 // Name: L2CA_GetRemoteChannelId
260 // Params: uint16_t lcid, uint16_t* rcid
261 // Returns: bool
262 struct L2CA_GetRemoteChannelId {
263   std::function<bool(uint16_t lcid, uint16_t* rcid)> body{
264       [](uint16_t /* lcid */, uint16_t* /* rcid */) { return false; }};
operatorL2CA_GetRemoteChannelId265   bool operator()(uint16_t lcid, uint16_t* rcid) { return body(lcid, rcid); };
266 };
267 extern struct L2CA_GetRemoteChannelId L2CA_GetRemoteChannelId;
268 // Name: L2CA_SetIdleTimeoutByBdAddr
269 // Params: const RawAddress& bd_addr, uint16_t timeout, tBT_TRANSPORT transport
270 // Returns: bool
271 struct L2CA_SetIdleTimeoutByBdAddr {
272   std::function<bool(const RawAddress& bd_addr, uint16_t timeout,
273                      tBT_TRANSPORT transport)>
274       body{[](const RawAddress& /* bd_addr */, uint16_t /* timeout */,
275               tBT_TRANSPORT /* transport */) { return false; }};
operatorL2CA_SetIdleTimeoutByBdAddr276   bool operator()(const RawAddress& bd_addr, uint16_t timeout,
277                   tBT_TRANSPORT transport) {
278     return body(bd_addr, timeout, transport);
279   };
280 };
281 extern struct L2CA_SetIdleTimeoutByBdAddr L2CA_SetIdleTimeoutByBdAddr;
282 // Name: L2CA_UseLatencyMode
283 // Params: const RawAddress& bd_addr, bool use_latency_mode
284 // Returns: bool
285 struct L2CA_UseLatencyMode {
286   std::function<bool(const RawAddress& bd_addr, bool use_latency_mode)> body{
287       [](const RawAddress& /* bd_addr */, bool /* use_latency_mode */) {
288         return false;
289       }};
operatorL2CA_UseLatencyMode290   bool operator()(const RawAddress& bd_addr, bool use_latency_mode) {
291     return body(bd_addr, use_latency_mode);
292   };
293 };
294 extern struct L2CA_UseLatencyMode L2CA_UseLatencyMode;
295 // Name: L2CA_SetAclPriority
296 // Params: const RawAddress& bd_addr, tL2CAP_PRIORITY priority,
297 // Returns: bool
298 struct L2CA_SetAclPriority {
299   std::function<bool(const RawAddress& bd_addr, tL2CAP_PRIORITY priority)> body{
300       [](const RawAddress& /* bd_addr */, tL2CAP_PRIORITY /* priority */) {
301         return false;
302       }};
operatorL2CA_SetAclPriority303   bool operator()(const RawAddress& bd_addr, tL2CAP_PRIORITY priority) {
304     return body(bd_addr, priority);
305   };
306 };
307 extern struct L2CA_SetAclPriority L2CA_SetAclPriority;
308 // Name: L2CA_SetAclLatency
309 // Params: const RawAddress& bd_addr, tL2CAP_LATENCY latency
310 // Returns: bool
311 struct L2CA_SetAclLatency {
312   std::function<bool(const RawAddress& bd_addr, tL2CAP_LATENCY latency)> body{
313       [](const RawAddress& /* bd_addr */, tL2CAP_LATENCY /* latency */) {
314         return false;
315       }};
operatorL2CA_SetAclLatency316   bool operator()(const RawAddress& bd_addr, tL2CAP_LATENCY latency) {
317     return body(bd_addr, latency);
318   };
319 };
320 extern struct L2CA_SetAclLatency L2CA_SetAclLatency;
321 // Name: L2CA_SetTxPriority
322 // Params: uint16_t cid, tL2CAP_CHNL_PRIORITY priority
323 // Returns: bool
324 struct L2CA_SetTxPriority {
325   std::function<bool(uint16_t cid, tL2CAP_CHNL_PRIORITY priority)> body{
326       [](uint16_t /* cid */, tL2CAP_CHNL_PRIORITY /* priority */) {
327         return false;
328       }};
operatorL2CA_SetTxPriority329   bool operator()(uint16_t cid, tL2CAP_CHNL_PRIORITY priority) {
330     return body(cid, priority);
331   };
332 };
333 extern struct L2CA_SetTxPriority L2CA_SetTxPriority;
334 // Name: L2CA_GetPeerFeatures
335 // Params: const RawAddress& bd_addr, uint32_t* p_ext_feat, uint8_t* p_chnl_mask
336 // Returns: bool
337 struct L2CA_GetPeerFeatures {
338   std::function<bool(const RawAddress& bd_addr, uint32_t* p_ext_feat,
339                      uint8_t* p_chnl_mask)>
340       body{[](const RawAddress& /* bd_addr */, uint32_t* /* p_ext_feat */,
341               uint8_t* /* p_chnl_mask */) { return false; }};
operatorL2CA_GetPeerFeatures342   bool operator()(const RawAddress& bd_addr, uint32_t* p_ext_feat,
343                   uint8_t* p_chnl_mask) {
344     return body(bd_addr, p_ext_feat, p_chnl_mask);
345   };
346 };
347 extern struct L2CA_GetPeerFeatures L2CA_GetPeerFeatures;
348 // Name: L2CA_RegisterFixedChannel
349 // Params: uint16_t fixed_cid, tL2CAP_FIXED_CHNL_REG* p_freg
350 // Returns: bool
351 struct L2CA_RegisterFixedChannel {
352   std::function<bool(uint16_t fixed_cid, tL2CAP_FIXED_CHNL_REG* p_freg)> body{
353       [](uint16_t /* fixed_cid */, tL2CAP_FIXED_CHNL_REG* /* p_freg */) {
354         return false;
355       }};
operatorL2CA_RegisterFixedChannel356   bool operator()(uint16_t fixed_cid, tL2CAP_FIXED_CHNL_REG* p_freg) {
357     return body(fixed_cid, p_freg);
358   };
359 };
360 extern struct L2CA_RegisterFixedChannel L2CA_RegisterFixedChannel;
361 // Name: L2CA_ConnectFixedChnl
362 // Params: uint16_t fixed_cid, const RawAddress& rem_bda
363 // Returns: bool
364 struct L2CA_ConnectFixedChnl {
365   std::function<bool(uint16_t fixed_cid, const RawAddress& rem_bda)> body{
366       [](uint16_t /* fixed_cid */, const RawAddress& /* rem_bda */) {
367         return false;
368       }};
operatorL2CA_ConnectFixedChnl369   bool operator()(uint16_t fixed_cid, const RawAddress& rem_bda) {
370     return body(fixed_cid, rem_bda);
371   };
372 };
373 extern struct L2CA_ConnectFixedChnl L2CA_ConnectFixedChnl;
374 // Name: L2CA_SendFixedChnlData
375 // Params: uint16_t fixed_cid, const RawAddress& rem_bda, BT_HDR* p_buf
376 // Returns: uint16_t
377 struct L2CA_SendFixedChnlData {
378   std::function<uint16_t(uint16_t fixed_cid, const RawAddress& rem_bda,
379                          BT_HDR* p_buf)>
380       body{[](uint16_t /* fixed_cid */, const RawAddress& /* rem_bda */,
381               BT_HDR* /* p_buf */) { return 0; }};
operatorL2CA_SendFixedChnlData382   uint16_t operator()(uint16_t fixed_cid, const RawAddress& rem_bda,
383                       BT_HDR* p_buf) {
384     return body(fixed_cid, rem_bda, p_buf);
385   };
386 };
387 extern struct L2CA_SendFixedChnlData L2CA_SendFixedChnlData;
388 // Name: L2CA_RemoveFixedChnl
389 // Params: uint16_t fixed_cid, const RawAddress& rem_bda
390 // Returns: bool
391 struct L2CA_RemoveFixedChnl {
392   std::function<bool(uint16_t fixed_cid, const RawAddress& rem_bda)> body{
393       [](uint16_t /* fixed_cid */, const RawAddress& /* rem_bda */) {
394         return false;
395       }};
operatorL2CA_RemoveFixedChnl396   bool operator()(uint16_t fixed_cid, const RawAddress& rem_bda) {
397     return body(fixed_cid, rem_bda);
398   };
399 };
400 extern struct L2CA_RemoveFixedChnl L2CA_RemoveFixedChnl;
401 // Name: L2CA_SetLeGattTimeout
402 // Params: const RawAddress& rem_bda, uint16_t idle_tout
403 // Returns: bool
404 struct L2CA_SetLeGattTimeout {
405   std::function<bool(const RawAddress& rem_bda, uint16_t idle_tout)> body{
406       [](const RawAddress& /* rem_bda */, uint16_t /* idle_tout */) {
407         return false;
408       }};
operatorL2CA_SetLeGattTimeout409   bool operator()(const RawAddress& rem_bda, uint16_t idle_tout) {
410     return body(rem_bda, idle_tout);
411   };
412 };
413 extern struct L2CA_SetLeGattTimeout L2CA_SetLeGattTimeout;
414 // Name: L2CA_MarkLeLinkAsActive
415 // Params: const RawAddress& rem_bda
416 // Returns: bool
417 struct L2CA_MarkLeLinkAsActive {
418   std::function<bool(const RawAddress& rem_bda)> body{
419       [](const RawAddress& /* rem_bda */) { return false; }};
operatorL2CA_MarkLeLinkAsActive420   bool operator()(const RawAddress& rem_bda) { return body(rem_bda); };
421 };
422 extern struct L2CA_MarkLeLinkAsActive L2CA_MarkLeLinkAsActive;
423 // Name: L2CA_DataWrite
424 // Params: uint16_t cid, BT_HDR* p_data
425 // Returns: uint8_t
426 struct L2CA_DataWrite {
427   std::function<uint8_t(uint16_t cid, BT_HDR* p_data)> body{
428       [](uint16_t /* cid */, BT_HDR* /* p_data */) { return 0; }};
operatorL2CA_DataWrite429   uint8_t operator()(uint16_t cid, BT_HDR* p_data) {
430     return body(cid, p_data);
431   };
432 };
433 extern struct L2CA_DataWrite L2CA_DataWrite;
434 // Name: L2CA_LECocDataWrite
435 // Params: uint16_t cid, BT_HDR* p_data
436 // Returns: uint8_t
437 struct L2CA_LECocDataWrite {
438   std::function<uint8_t(uint16_t cid, BT_HDR* p_data)> body{
439       [](uint16_t /* cid */, BT_HDR* /* p_data */) { return 0; }};
operatorL2CA_LECocDataWrite440   uint8_t operator()(uint16_t cid, BT_HDR* p_data) {
441     return body(cid, p_data);
442   };
443 };
444 extern struct L2CA_LECocDataWrite L2CA_LECocDataWrite;
445 // Name: L2CA_SetChnlFlushability
446 // Params: uint16_t cid, bool is_flushable
447 // Returns: bool
448 struct L2CA_SetChnlFlushability {
449   std::function<bool(uint16_t cid, bool is_flushable)> body{
450       [](uint16_t /* cid */, bool /* is_flushable */) { return false; }};
operatorL2CA_SetChnlFlushability451   bool operator()(uint16_t cid, bool is_flushable) {
452     return body(cid, is_flushable);
453   };
454 };
455 extern struct L2CA_SetChnlFlushability L2CA_SetChnlFlushability;
456 // Name: L2CA_FlushChannel
457 // Params: uint16_t lcid, uint16_t num_to_flush
458 // Returns: uint16_t
459 struct L2CA_FlushChannel {
460   std::function<uint16_t(uint16_t lcid, uint16_t num_to_flush)> body{
461       [](uint16_t /* lcid */, uint16_t /* num_to_flush */) { return 0; }};
operatorL2CA_FlushChannel462   uint16_t operator()(uint16_t lcid, uint16_t num_to_flush) {
463     return body(lcid, num_to_flush);
464   };
465 };
466 extern struct L2CA_FlushChannel L2CA_FlushChannel;
467 // Name: L2CA_IsLinkEstablished
468 // Params: const RawAddress& bd_addr, tBT_TRANSPORT transport
469 // Returns: bool
470 struct L2CA_IsLinkEstablished {
471   std::function<bool(const RawAddress& bd_addr, tBT_TRANSPORT transport)> body{
472       [](const RawAddress& /* bd_addr */, tBT_TRANSPORT /* transport */) {
473         return false;
474       }};
operatorL2CA_IsLinkEstablished475   bool operator()(const RawAddress& bd_addr, tBT_TRANSPORT transport) {
476     return body(bd_addr, transport);
477   };
478 };
479 extern struct L2CA_IsLinkEstablished L2CA_IsLinkEstablished;
480 // Name: L2CA_SetMediaStreamChannel
481 // Params: uint16_t handle, uint16_t channel_id, bool is_local_cid
482 // Returns: void
483 struct L2CA_SetMediaStreamChannel {
484   std::function<void(uint16_t local_media_cid, bool status)> body{
485       [](uint16_t /* local_media_cid */, bool /* status */) {}};
operatorL2CA_SetMediaStreamChannel486   void operator()(uint16_t local_media_cid, bool status) {
487     body(local_media_cid, status);
488   };
489 };
490 extern struct L2CA_SetMediaStreamChannel L2CA_SetMediaStreamChannel;
491 // Name: L2CA_isMediaChannel
492 // Params: uint16_t handle, uint16_t channel_id, bool is_local_cid
493 // Returns: bool
494 struct L2CA_isMediaChannel {
495   std::function<bool(uint16_t handle, uint16_t channel_id, bool is_local_cid)>
496       body{[](uint16_t /* handle */, uint16_t /* channel_id */,
497               bool /* is_local_cid */) { return false; }};
operatorL2CA_isMediaChannel498   bool operator()(uint16_t handle, uint16_t channel_id, bool is_local_cid) {
499     return body(handle, channel_id, is_local_cid);
500   };
501 };
502 extern struct L2CA_isMediaChannel L2CA_isMediaChannel;
503 // Name: L2CA_LeCreditDefault
504 // Params:
505 // Returns: uint16_t
506 struct L2CA_LeCreditDefault {
507   std::function<uint16_t()> body{[]() { return 0; }};
operatorL2CA_LeCreditDefault508   uint16_t operator()() { return body(); };
509 };
510 extern struct L2CA_LeCreditDefault L2CA_LeCreditDefault;
511 // Name: L2CA_LeCreditThreshold
512 // Params:
513 // Returns: uint16_t
514 struct L2CA_LeCreditThreshold {
515   std::function<uint16_t()> body{[]() { return 0; }};
operatorL2CA_LeCreditThreshold516   uint16_t operator()() { return body(); };
517 };
518 extern struct L2CA_LeCreditThreshold L2CA_LeCreditThreshold;
519 
520 }  // namespace stack_l2cap_api
521 }  // namespace mock
522 }  // namespace test
523 
524 // END mockcify generation
525