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:23
20 */
21
22 #include <map>
23 #include <string>
24
25 extern std::map<std::string, int> mock_function_count_map;
26
27 #include "bt_common.h"
28 #include "bt_target.h"
29 #include "btm_ble_int.h"
30 #include "device/include/interop.h"
31 #include "l2c_api.h"
32 #include "osi/include/osi.h"
33 #include "stack/btm/btm_dev.h"
34 #include "stack/btm/btm_sec.h"
35 #include "stack/gatt/gatt_int.h"
36 #include "stack/include/l2cap_acl_interface.h"
37
38 #ifndef UNUSED_ATTR
39 #define UNUSED_ATTR
40 #endif
41
gatt_act_connect(tGATT_REG * p_reg,const RawAddress & bd_addr,tBT_TRANSPORT transport,int8_t initiating_phys)42 bool gatt_act_connect(tGATT_REG* p_reg, const RawAddress& bd_addr,
43 tBT_TRANSPORT transport, int8_t initiating_phys) {
44 mock_function_count_map[__func__]++;
45 return false;
46 }
gatt_connect(const RawAddress & rem_bda,tGATT_TCB * p_tcb,tBT_TRANSPORT transport,uint8_t initiating_phys,tGATT_IF gatt_if)47 bool gatt_connect(const RawAddress& rem_bda, tGATT_TCB* p_tcb,
48 tBT_TRANSPORT transport, uint8_t initiating_phys,
49 tGATT_IF gatt_if) {
50 mock_function_count_map[__func__]++;
51 return false;
52 }
gatt_disconnect(tGATT_TCB * p_tcb)53 bool gatt_disconnect(tGATT_TCB* p_tcb) {
54 mock_function_count_map[__func__]++;
55 return false;
56 }
gatt_update_app_hold_link_status(tGATT_IF gatt_if,tGATT_TCB * p_tcb,bool is_add)57 bool gatt_update_app_hold_link_status(tGATT_IF gatt_if, tGATT_TCB* p_tcb,
58 bool is_add) {
59 mock_function_count_map[__func__]++;
60 return false;
61 }
gatt_get_ch_state(tGATT_TCB * p_tcb)62 tGATT_CH_STATE gatt_get_ch_state(tGATT_TCB* p_tcb) {
63 mock_function_count_map[__func__]++;
64 return GATT_CH_CLOSE;
65 }
gatt_add_a_bonded_dev_for_srv_chg(const RawAddress & bda)66 void gatt_add_a_bonded_dev_for_srv_chg(const RawAddress& bda) {
67 mock_function_count_map[__func__]++;
68 }
gatt_chk_srv_chg(tGATTS_SRV_CHG * p_srv_chg_clt)69 void gatt_chk_srv_chg(tGATTS_SRV_CHG* p_srv_chg_clt) {
70 mock_function_count_map[__func__]++;
71 }
gatt_data_process(tGATT_TCB & tcb,uint16_t cid,BT_HDR * p_buf)72 void gatt_data_process(tGATT_TCB& tcb, uint16_t cid, BT_HDR* p_buf) {
73 mock_function_count_map[__func__]++;
74 }
gatt_find_in_device_record(const RawAddress & bd_addr,tBLE_BD_ADDR * address_with_type)75 void gatt_find_in_device_record(const RawAddress& bd_addr,
76 tBLE_BD_ADDR* address_with_type) {
77 mock_function_count_map[__func__]++;
78 }
gatt_free(void)79 void gatt_free(void) { mock_function_count_map[__func__]++; }
gatt_init(void)80 void gatt_init(void) { mock_function_count_map[__func__]++; }
gatt_init_srv_chg(void)81 void gatt_init_srv_chg(void) { mock_function_count_map[__func__]++; }
gatt_l2cif_config_cfm_cback(uint16_t lcid,uint16_t initiator,tL2CAP_CFG_INFO * p_cfg)82 void gatt_l2cif_config_cfm_cback(uint16_t lcid, uint16_t initiator,
83 tL2CAP_CFG_INFO* p_cfg) {
84 mock_function_count_map[__func__]++;
85 }
gatt_l2cif_config_ind_cback(uint16_t lcid,tL2CAP_CFG_INFO * p_cfg)86 void gatt_l2cif_config_ind_cback(uint16_t lcid, tL2CAP_CFG_INFO* p_cfg) {
87 mock_function_count_map[__func__]++;
88 }
gatt_l2cif_disconnect_ind_cback(uint16_t lcid,bool ack_needed)89 void gatt_l2cif_disconnect_ind_cback(uint16_t lcid, bool ack_needed) {
90 mock_function_count_map[__func__]++;
91 }
gatt_notify_conn_update(const RawAddress &,uint16_t interval,uint16_t latency,uint16_t timeout,tHCI_STATUS status)92 void gatt_notify_conn_update(const RawAddress&, uint16_t interval,
93 uint16_t latency, uint16_t timeout,
94 tHCI_STATUS status) {
95 mock_function_count_map[__func__]++;
96 }
gatt_notify_phy_updated(tGATT_STATUS status,uint16_t handle,uint8_t tx_phy,uint8_t rx_phy)97 void gatt_notify_phy_updated(tGATT_STATUS status, uint16_t handle,
98 uint8_t tx_phy, uint8_t rx_phy) {
99 mock_function_count_map[__func__]++;
100 }
gatt_proc_srv_chg(void)101 void gatt_proc_srv_chg(void) { mock_function_count_map[__func__]++; }
gatt_send_srv_chg_ind(const RawAddress & peer_bda)102 void gatt_send_srv_chg_ind(const RawAddress& peer_bda) {
103 mock_function_count_map[__func__]++;
104 }
gatt_set_ch_state(tGATT_TCB * p_tcb,tGATT_CH_STATE ch_state)105 void gatt_set_ch_state(tGATT_TCB* p_tcb, tGATT_CH_STATE ch_state) {
106 mock_function_count_map[__func__]++;
107 }
gatt_update_app_use_link_flag(tGATT_IF gatt_if,tGATT_TCB * p_tcb,bool is_add,bool check_acl_link)108 void gatt_update_app_use_link_flag(tGATT_IF gatt_if, tGATT_TCB* p_tcb,
109 bool is_add, bool check_acl_link) {
110 mock_function_count_map[__func__]++;
111 }
112