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  */
20 
21 #include <map>
22 #include <string>
23 
24 extern std::map<std::string, int> mock_function_count_map;
25 #define UNUSED_ATTR
26 
27 #include <cstdint>
28 #include "stack/l2cap/l2c_int.h"
l2cu_get_next_buffer_to_send(tL2C_LCB * p_lcb)29 BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* p_lcb) {
30   mock_function_count_map[__func__]++;
31   return nullptr;
32 }
l2c_link_hci_disc_comp(uint16_t handle,tHCI_REASON reason)33 bool l2c_link_hci_disc_comp(uint16_t handle, tHCI_REASON reason) {
34   mock_function_count_map[__func__]++;
35   return false;
36 }
l2cu_ConnectAclForSecurity(const RawAddress & bd_addr)37 tBTM_STATUS l2cu_ConnectAclForSecurity(const RawAddress& bd_addr) {
38   mock_function_count_map[__func__]++;
39   return BTM_SUCCESS;
40 }
l2cu_get_next_channel_in_rr(tL2C_LCB * p_lcb)41 tL2C_CCB* l2cu_get_next_channel_in_rr(tL2C_LCB* p_lcb) {
42   mock_function_count_map[__func__]++;
43   return nullptr;
44 }
l2c_OnHciModeChangeSendPendingPackets(RawAddress remote)45 void l2c_OnHciModeChangeSendPendingPackets(RawAddress remote) {
46   mock_function_count_map[__func__]++;
47 }
l2c_info_resp_timer_timeout(void * data)48 void l2c_info_resp_timer_timeout(void* data) {
49   mock_function_count_map[__func__]++;
50 }
l2c_link_adjust_allocation(void)51 void l2c_link_adjust_allocation(void) { mock_function_count_map[__func__]++; }
l2c_link_adjust_chnl_allocation(void)52 void l2c_link_adjust_chnl_allocation(void) {
53   mock_function_count_map[__func__]++;
54 }
l2c_link_check_send_pkts(tL2C_LCB * p_lcb,uint16_t local_cid,BT_HDR * p_buf)55 void l2c_link_check_send_pkts(tL2C_LCB* p_lcb, uint16_t local_cid,
56                               BT_HDR* p_buf) {
57   mock_function_count_map[__func__]++;
58 }
l2c_link_hci_conn_comp(tHCI_STATUS status,uint16_t handle,const RawAddress & p_bda)59 void l2c_link_hci_conn_comp(tHCI_STATUS status, uint16_t handle,
60                             const RawAddress& p_bda) {
61   mock_function_count_map[__func__]++;
62 }
l2c_link_hci_conn_req(const RawAddress & bd_addr)63 void l2c_link_hci_conn_req(const RawAddress& bd_addr) {
64   mock_function_count_map[__func__]++;
65 }
l2c_link_init()66 void l2c_link_init() { mock_function_count_map[__func__]++; }
l2c_link_process_num_completed_pkts(uint8_t * p,uint8_t evt_len)67 void l2c_link_process_num_completed_pkts(uint8_t* p, uint8_t evt_len) {
68   mock_function_count_map[__func__]++;
69 }
l2c_link_role_changed(const RawAddress * bd_addr,uint8_t new_role,uint8_t hci_status)70 void l2c_link_role_changed(const RawAddress* bd_addr, uint8_t new_role,
71                            uint8_t hci_status) {
72   mock_function_count_map[__func__]++;
73 }
l2c_link_sec_comp(const RawAddress * p_bda,UNUSED_ATTR tBT_TRANSPORT transport,void * p_ref_data,uint8_t status)74 void l2c_link_sec_comp(const RawAddress* p_bda,
75                        UNUSED_ATTR tBT_TRANSPORT transport, void* p_ref_data,
76                        uint8_t status) {
77   mock_function_count_map[__func__]++;
78 }
l2c_link_sec_comp2(const RawAddress & p_bda,UNUSED_ATTR tBT_TRANSPORT transport,void * p_ref_data,uint8_t status)79 void l2c_link_sec_comp2(const RawAddress& p_bda,
80                         UNUSED_ATTR tBT_TRANSPORT transport, void* p_ref_data,
81                         uint8_t status) {
82   mock_function_count_map[__func__]++;
83 }
l2c_link_segments_xmitted(BT_HDR * p_msg)84 void l2c_link_segments_xmitted(BT_HDR* p_msg) {
85   mock_function_count_map[__func__]++;
86 }
l2c_link_timeout(tL2C_LCB * p_lcb)87 void l2c_link_timeout(tL2C_LCB* p_lcb) { mock_function_count_map[__func__]++; }
l2c_packets_completed(uint16_t handle,uint16_t num_sent)88 void l2c_packets_completed(uint16_t handle, uint16_t num_sent) {
89   mock_function_count_map[__func__]++;
90 }
l2c_pin_code_request(const RawAddress & bd_addr)91 void l2c_pin_code_request(const RawAddress& bd_addr) {
92   mock_function_count_map[__func__]++;
93 }
l2cble_update_sec_act(const RawAddress & bd_addr,uint16_t sec_act)94 void l2cble_update_sec_act(const RawAddress& bd_addr, uint16_t sec_act) {
95   mock_function_count_map[__func__]++;
96 }
97