1 /*
2 * Copyright 2020 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:72
20 */
21
22 #include <cstdint>
23
24 #include "stack/include/bt_hdr.h"
25 #include "stack/l2cap/l2c_int.h"
26 #include "test/common/mock_functions.h"
27 #include "types/raw_address.h"
28
l2cu_build_header(tL2C_LCB *,uint16_t,uint8_t,uint8_t)29 BT_HDR* l2cu_build_header(tL2C_LCB* /* p_lcb */, uint16_t /* len */,
30 uint8_t /* cmd */, uint8_t /* signal_id */) {
31 inc_func_call_count(__func__);
32 return nullptr;
33 }
l2c_is_cmd_rejected(uint8_t,uint8_t,tL2C_LCB *)34 bool l2c_is_cmd_rejected(uint8_t /* cmd_code */, uint8_t /* signal_id */,
35 tL2C_LCB* /* p_lcb */) {
36 inc_func_call_count(__func__);
37 return false;
38 }
l2cu_create_conn_le(tL2C_LCB *)39 bool l2cu_create_conn_le(tL2C_LCB* /* p_lcb */) {
40 inc_func_call_count(__func__);
41 return false;
42 }
l2cu_create_conn_le(tL2C_LCB *,uint8_t)43 bool l2cu_create_conn_le(tL2C_LCB* /* p_lcb */, uint8_t /* initiating_phys */) {
44 inc_func_call_count(__func__);
45 return false;
46 }
l2cu_initialize_fixed_ccb(tL2C_LCB *,uint16_t)47 bool l2cu_initialize_fixed_ccb(tL2C_LCB* /* p_lcb */,
48 uint16_t /* fixed_cid */) {
49 inc_func_call_count(__func__);
50 return false;
51 }
l2cu_is_ccb_active(tL2C_CCB *)52 bool l2cu_is_ccb_active(tL2C_CCB* /* p_ccb */) {
53 inc_func_call_count(__func__);
54 return false;
55 }
l2cu_lcb_disconnecting(void)56 bool l2cu_lcb_disconnecting(void) {
57 inc_func_call_count(__func__);
58 return false;
59 }
l2cu_set_acl_priority(const RawAddress &,tL2CAP_PRIORITY,bool)60 bool l2cu_set_acl_priority(const RawAddress& /* bd_addr */,
61 tL2CAP_PRIORITY /* priority */,
62 bool /* reset_after_rs */) {
63 inc_func_call_count(__func__);
64 return false;
65 }
l2cu_start_post_bond_timer(uint16_t)66 bool l2cu_start_post_bond_timer(uint16_t /* handle */) {
67 inc_func_call_count(__func__);
68 return false;
69 }
l2cu_allocate_ccb(tL2C_LCB *,uint16_t,bool)70 tL2C_CCB* l2cu_allocate_ccb(tL2C_LCB* /* p_lcb */, uint16_t /* cid */,
71 bool /* is_eatt */) {
72 inc_func_call_count(__func__);
73 return nullptr;
74 }
l2cu_find_ccb_by_cid(tL2C_LCB *,uint16_t)75 tL2C_CCB* l2cu_find_ccb_by_cid(tL2C_LCB* /* p_lcb */,
76 uint16_t /* local_cid */) {
77 inc_func_call_count(__func__);
78 return nullptr;
79 }
l2cu_find_ccb_by_remote_cid(tL2C_LCB *,uint16_t)80 tL2C_CCB* l2cu_find_ccb_by_remote_cid(tL2C_LCB* /* p_lcb */,
81 uint16_t /* remote_cid */) {
82 inc_func_call_count(__func__);
83 return nullptr;
84 }
l2cu_allocate_lcb(const RawAddress &,bool,tBT_TRANSPORT)85 tL2C_LCB* l2cu_allocate_lcb(const RawAddress& /* p_bd_addr */,
86 bool /* is_bonding */,
87 tBT_TRANSPORT /* transport */) {
88 inc_func_call_count(__func__);
89 return nullptr;
90 }
l2cu_find_lcb_by_bd_addr(const RawAddress &,tBT_TRANSPORT)91 tL2C_LCB* l2cu_find_lcb_by_bd_addr(const RawAddress& /* p_bd_addr */,
92 tBT_TRANSPORT /* transport */) {
93 inc_func_call_count(__func__);
94 return nullptr;
95 }
l2cu_find_lcb_by_handle(uint16_t)96 tL2C_LCB* l2cu_find_lcb_by_handle(uint16_t /* handle */) {
97 inc_func_call_count(__func__);
98 return nullptr;
99 }
l2cu_find_lcb_by_state(tL2C_LINK_STATE)100 tL2C_LCB* l2cu_find_lcb_by_state(tL2C_LINK_STATE /* state */) {
101 inc_func_call_count(__func__);
102 return nullptr;
103 }
l2cu_allocate_ble_rcb(uint16_t)104 tL2C_RCB* l2cu_allocate_ble_rcb(uint16_t /* psm */) {
105 inc_func_call_count(__func__);
106 return nullptr;
107 }
l2cu_allocate_rcb(uint16_t)108 tL2C_RCB* l2cu_allocate_rcb(uint16_t /* psm */) {
109 inc_func_call_count(__func__);
110 return nullptr;
111 }
l2cu_find_ble_rcb_by_psm(uint16_t)112 tL2C_RCB* l2cu_find_ble_rcb_by_psm(uint16_t /* psm */) {
113 inc_func_call_count(__func__);
114 return nullptr;
115 }
l2cu_find_rcb_by_psm(uint16_t)116 tL2C_RCB* l2cu_find_rcb_by_psm(uint16_t /* psm */) {
117 inc_func_call_count(__func__);
118 return nullptr;
119 }
l2cu_get_num_hi_priority(void)120 uint8_t l2cu_get_num_hi_priority(void) {
121 inc_func_call_count(__func__);
122 return 0;
123 }
l2cu_process_peer_cfg_req(tL2C_CCB *,tL2CAP_CFG_INFO *)124 uint8_t l2cu_process_peer_cfg_req(tL2C_CCB* /* p_ccb */,
125 tL2CAP_CFG_INFO* /* p_cfg */) {
126 inc_func_call_count(__func__);
127 return 0;
128 }
l2cu_adj_id(tL2C_LCB *)129 void l2cu_adj_id(tL2C_LCB* /* p_lcb */) { inc_func_call_count(__func__); }
l2cu_adjust_out_mps(tL2C_CCB *)130 void l2cu_adjust_out_mps(tL2C_CCB* /* p_ccb */) {
131 inc_func_call_count(__func__);
132 }
l2cu_change_pri_ccb(tL2C_CCB *,tL2CAP_CHNL_PRIORITY)133 void l2cu_change_pri_ccb(tL2C_CCB* /* p_ccb */,
134 tL2CAP_CHNL_PRIORITY /* priority */) {
135 inc_func_call_count(__func__);
136 }
l2cu_check_channel_congestion(tL2C_CCB *)137 void l2cu_check_channel_congestion(tL2C_CCB* /* p_ccb */) {
138 inc_func_call_count(__func__);
139 }
l2cu_create_conn_after_switch(tL2C_LCB *)140 void l2cu_create_conn_after_switch(tL2C_LCB* /* p_lcb */) {
141 inc_func_call_count(__func__);
142 }
l2cu_create_conn_br_edr(tL2C_LCB *)143 void l2cu_create_conn_br_edr(tL2C_LCB* /* p_lcb */) {
144 inc_func_call_count(__func__);
145 }
l2cu_dequeue_ccb(tL2C_CCB *)146 void l2cu_dequeue_ccb(tL2C_CCB* /* p_ccb */) { inc_func_call_count(__func__); }
l2cu_device_reset(void)147 void l2cu_device_reset(void) { inc_func_call_count(__func__); }
l2cu_disconnect_chnl(tL2C_CCB *)148 void l2cu_disconnect_chnl(tL2C_CCB* /* p_ccb */) {
149 inc_func_call_count(__func__);
150 }
l2cu_enqueue_ccb(tL2C_CCB *)151 void l2cu_enqueue_ccb(tL2C_CCB* /* p_ccb */) { inc_func_call_count(__func__); }
l2cu_no_dynamic_ccbs(tL2C_LCB *)152 void l2cu_no_dynamic_ccbs(tL2C_LCB* /* p_lcb */) {
153 inc_func_call_count(__func__);
154 }
l2cu_process_fixed_chnl_resp(tL2C_LCB *)155 void l2cu_process_fixed_chnl_resp(tL2C_LCB* /* p_lcb */) {
156 inc_func_call_count(__func__);
157 }
l2cu_process_fixed_disc_cback(tL2C_LCB *)158 void l2cu_process_fixed_disc_cback(tL2C_LCB* /* p_lcb */) {
159 inc_func_call_count(__func__);
160 }
l2cu_process_our_cfg_req(tL2C_CCB *,tL2CAP_CFG_INFO *)161 void l2cu_process_our_cfg_req(tL2C_CCB* /* p_ccb */,
162 tL2CAP_CFG_INFO* /* p_cfg */) {
163 inc_func_call_count(__func__);
164 }
l2cu_process_our_cfg_rsp(tL2C_CCB *,tL2CAP_CFG_INFO *)165 void l2cu_process_our_cfg_rsp(tL2C_CCB* /* p_ccb */,
166 tL2CAP_CFG_INFO* /* p_cfg */) {
167 inc_func_call_count(__func__);
168 }
l2cu_process_peer_cfg_rsp(tL2C_CCB *,tL2CAP_CFG_INFO *)169 void l2cu_process_peer_cfg_rsp(tL2C_CCB* /* p_ccb */,
170 tL2CAP_CFG_INFO* /* p_cfg */) {
171 inc_func_call_count(__func__);
172 }
l2cu_reject_ble_coc_connection(tL2C_LCB *,uint8_t,uint16_t)173 void l2cu_reject_ble_coc_connection(tL2C_LCB* /* p_lcb */, uint8_t /* rem_id */,
174 uint16_t /* result */) {
175 inc_func_call_count(__func__);
176 }
l2cu_reject_ble_connection(tL2C_CCB *,uint8_t,uint16_t)177 void l2cu_reject_ble_connection(tL2C_CCB* /* p_ccb */, uint8_t /* rem_id */,
178 uint16_t /* result */) {
179 inc_func_call_count(__func__);
180 }
l2cu_reject_connection(tL2C_LCB *,uint16_t,uint8_t,uint16_t)181 void l2cu_reject_connection(tL2C_LCB* /* p_lcb */, uint16_t /* remote_cid */,
182 uint8_t /* rem_id */, uint16_t /* result */) {
183 inc_func_call_count(__func__);
184 }
l2cu_reject_credit_based_conn_req(tL2C_LCB *,uint8_t,uint8_t,uint16_t)185 void l2cu_reject_credit_based_conn_req(tL2C_LCB* /* p_lcb */,
186 uint8_t /* rem_id */,
187 uint8_t /* num_of_channels */,
188 uint16_t /* result */) {
189 inc_func_call_count(__func__);
190 }
l2cu_release_ble_rcb(tL2C_RCB *)191 void l2cu_release_ble_rcb(tL2C_RCB* /* p_rcb */) {
192 inc_func_call_count(__func__);
193 }
l2cu_release_ccb(tL2C_CCB *)194 void l2cu_release_ccb(tL2C_CCB* /* p_ccb */) { inc_func_call_count(__func__); }
l2cu_release_lcb(tL2C_LCB *)195 void l2cu_release_lcb(tL2C_LCB* /* p_lcb */) { inc_func_call_count(__func__); }
l2cu_release_rcb(tL2C_RCB *)196 void l2cu_release_rcb(tL2C_RCB* /* p_rcb */) { inc_func_call_count(__func__); }
l2cu_resubmit_pending_sec_req(const RawAddress *)197 void l2cu_resubmit_pending_sec_req(const RawAddress* /* p_bda */) {
198 inc_func_call_count(__func__);
199 }
l2cu_send_ble_reconfig_rsp(tL2C_LCB *,uint8_t,uint16_t)200 void l2cu_send_ble_reconfig_rsp(tL2C_LCB* /* p_lcb */, uint8_t /* rem_id */,
201 uint16_t /* result */) {
202 inc_func_call_count(__func__);
203 }
l2cu_send_credit_based_reconfig_req(tL2C_CCB *,tL2CAP_LE_CFG_INFO *)204 void l2cu_send_credit_based_reconfig_req(tL2C_CCB* /* p_ccb */,
205 tL2CAP_LE_CFG_INFO* /* p_cfg */) {
206 inc_func_call_count(__func__);
207 }
l2cu_send_peer_ble_credit_based_conn_req(tL2C_CCB *)208 void l2cu_send_peer_ble_credit_based_conn_req(tL2C_CCB* /* p_ccb */) {
209 inc_func_call_count(__func__);
210 }
l2cu_send_peer_ble_credit_based_conn_res(tL2C_CCB *,uint16_t)211 void l2cu_send_peer_ble_credit_based_conn_res(tL2C_CCB* /* p_ccb */,
212 uint16_t /* result */) {
213 inc_func_call_count(__func__);
214 }
l2cu_send_peer_ble_credit_based_disconn_req(tL2C_CCB *)215 void l2cu_send_peer_ble_credit_based_disconn_req(tL2C_CCB* /* p_ccb */) {
216 inc_func_call_count(__func__);
217 }
l2cu_send_peer_ble_flow_control_credit(tL2C_CCB *,uint16_t)218 void l2cu_send_peer_ble_flow_control_credit(tL2C_CCB* /* p_ccb */,
219 uint16_t /* credit_value */) {
220 inc_func_call_count(__func__);
221 }
l2cu_send_peer_ble_par_req(tL2C_LCB *,uint16_t,uint16_t,uint16_t,uint16_t)222 void l2cu_send_peer_ble_par_req(tL2C_LCB* /* p_lcb */, uint16_t /* min_int */,
223 uint16_t /* max_int */, uint16_t /* latency */,
224 uint16_t /* timeout */) {
225 inc_func_call_count(__func__);
226 }
l2cu_send_peer_ble_par_rsp(tL2C_LCB *,uint16_t,uint8_t)227 void l2cu_send_peer_ble_par_rsp(tL2C_LCB* /* p_lcb */, uint16_t /* reason */,
228 uint8_t /* rem_id */) {
229 inc_func_call_count(__func__);
230 }
l2cu_send_peer_cmd_reject(tL2C_LCB *,uint16_t,uint8_t,uint16_t,uint16_t)231 void l2cu_send_peer_cmd_reject(tL2C_LCB* /* p_lcb */, uint16_t /* reason */,
232 uint8_t /* rem_id */, uint16_t /* p1 */,
233 uint16_t /* p2 */) {
234 inc_func_call_count(__func__);
235 }
l2cu_send_peer_config_rej(tL2C_CCB *,uint8_t *,uint16_t,uint16_t)236 void l2cu_send_peer_config_rej(tL2C_CCB* /* p_ccb */, uint8_t* /* p_data */,
237 uint16_t /* data_len */,
238 uint16_t /* rej_len */) {
239 inc_func_call_count(__func__);
240 }
l2cu_send_peer_config_req(tL2C_CCB *,tL2CAP_CFG_INFO *)241 void l2cu_send_peer_config_req(tL2C_CCB* /* p_ccb */,
242 tL2CAP_CFG_INFO* /* p_cfg */) {
243 inc_func_call_count(__func__);
244 }
l2cu_send_peer_config_rsp(tL2C_CCB *,tL2CAP_CFG_INFO *)245 void l2cu_send_peer_config_rsp(tL2C_CCB* /* p_ccb */,
246 tL2CAP_CFG_INFO* /* p_cfg */) {
247 inc_func_call_count(__func__);
248 }
l2cu_send_peer_connect_req(tL2C_CCB *)249 void l2cu_send_peer_connect_req(tL2C_CCB* /* p_ccb */) {
250 inc_func_call_count(__func__);
251 }
l2cu_send_peer_connect_rsp(tL2C_CCB *,uint16_t,uint16_t)252 void l2cu_send_peer_connect_rsp(tL2C_CCB* /* p_ccb */, uint16_t /* result */,
253 uint16_t /* status */) {
254 inc_func_call_count(__func__);
255 }
l2cu_send_peer_credit_based_conn_req(tL2C_CCB *)256 void l2cu_send_peer_credit_based_conn_req(tL2C_CCB* /* p_ccb */) {
257 inc_func_call_count(__func__);
258 }
l2cu_send_peer_credit_based_conn_res(tL2C_CCB *,std::vector<uint16_t> &,uint16_t)259 void l2cu_send_peer_credit_based_conn_res(
260 tL2C_CCB* /* p_ccb */, std::vector<uint16_t>& /* accepted_cids */,
261 uint16_t /* result */) {
262 inc_func_call_count(__func__);
263 }
l2cu_send_peer_disc_req(tL2C_CCB *)264 void l2cu_send_peer_disc_req(tL2C_CCB* /* p_ccb */) {
265 inc_func_call_count(__func__);
266 }
l2cu_send_peer_disc_rsp(tL2C_LCB *,uint8_t,uint16_t,uint16_t)267 void l2cu_send_peer_disc_rsp(tL2C_LCB* /* p_lcb */, uint8_t /* remote_id */,
268 uint16_t /* local_cid */,
269 uint16_t /* remote_cid */) {
270 inc_func_call_count(__func__);
271 }
l2cu_send_peer_echo_rsp(tL2C_LCB *,uint8_t,uint8_t *,uint16_t)272 void l2cu_send_peer_echo_rsp(tL2C_LCB* /* p_lcb */, uint8_t /* signal_id */,
273 uint8_t* /* p_data */, uint16_t /* data_len */) {
274 inc_func_call_count(__func__);
275 }
l2cu_send_peer_info_req(tL2C_LCB *,uint16_t)276 void l2cu_send_peer_info_req(tL2C_LCB* /* p_lcb */, uint16_t /* info_type */) {
277 inc_func_call_count(__func__);
278 }
l2cu_send_peer_info_rsp(tL2C_LCB *,uint8_t,uint16_t)279 void l2cu_send_peer_info_rsp(tL2C_LCB* /* p_lcb */, uint8_t /* remote_id */,
280 uint16_t /* info_type */) {
281 inc_func_call_count(__func__);
282 }
l2cu_set_acl_hci_header(BT_HDR *,tL2C_CCB *)283 void l2cu_set_acl_hci_header(BT_HDR* /* p_buf */, tL2C_CCB* /* p_ccb */) {
284 inc_func_call_count(__func__);
285 }
l2cu_set_lcb_handle(struct t_l2c_linkcb &,uint16_t)286 void l2cu_set_lcb_handle(struct t_l2c_linkcb& /* p_lcb */,
287 uint16_t /* handle */) {
288 inc_func_call_count(__func__);
289 }
l2cu_set_non_flushable_pbf(bool)290 void l2cu_set_non_flushable_pbf(bool /* is_supported */) {
291 inc_func_call_count(__func__);
292 }
l2cu_update_lcb_4_bonding(const RawAddress &,bool)293 void l2cu_update_lcb_4_bonding(const RawAddress& /* p_bd_addr */,
294 bool /* is_bonding */) {
295 inc_func_call_count(__func__);
296 }
297