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:44
20  */
21 
22 #include <cstdint>
23 #include <map>
24 #include <string>
25 
26 extern std::map<std::string, int> mock_function_count_map;
27 
28 #include "bta/include/bta_hearing_aid_api.h"
29 #include "stack/include/bt_types.h"
30 #include "types/ble_address_with_type.h"
31 #include "types/raw_address.h"
32 
33 #ifndef UNUSED_ATTR
34 #define UNUSED_ATTR
35 #endif
36 
btif_storage_get_gatt_cl_db_hash(const RawAddress & bd_addr)37 Octet16 btif_storage_get_gatt_cl_db_hash(const RawAddress& bd_addr) {
38   mock_function_count_map[__func__]++;
39   Octet16 octet;
40   return octet;
41 }
btif_has_ble_keys(const std::string & bdstr)42 bool btif_has_ble_keys(const std::string& bdstr) {
43   mock_function_count_map[__func__]++;
44   return false;
45 }
btif_storage_get_hearing_aid_prop(const RawAddress & address,uint8_t * capabilities,uint64_t * hi_sync_id,uint16_t * render_delay,uint16_t * preparation_delay,uint16_t * codecs)46 bool btif_storage_get_hearing_aid_prop(
47     const RawAddress& address, uint8_t* capabilities, uint64_t* hi_sync_id,
48     uint16_t* render_delay, uint16_t* preparation_delay, uint16_t* codecs) {
49   mock_function_count_map[__func__]++;
50   return false;
51 }
btif_storage_get_stored_remote_name(const RawAddress & bd_addr,char * name)52 bool btif_storage_get_stored_remote_name(const RawAddress& bd_addr,
53                                          char* name) {
54   mock_function_count_map[__func__]++;
55   return false;
56 }
btif_storage_is_restricted_device(const RawAddress * remote_bd_addr)57 bool btif_storage_is_restricted_device(const RawAddress* remote_bd_addr) {
58   mock_function_count_map[__func__]++;
59   return false;
60 }
btif_storage_add_ble_bonding_key(RawAddress * remote_bd_addr,const uint8_t * key,uint8_t key_type,uint8_t key_length)61 bt_status_t btif_storage_add_ble_bonding_key(RawAddress* remote_bd_addr,
62                                              const uint8_t* key,
63                                              uint8_t key_type,
64                                              uint8_t key_length) {
65   mock_function_count_map[__func__]++;
66   return BT_STATUS_SUCCESS;
67 }
btif_storage_add_ble_local_key(const Octet16 & key,uint8_t key_type)68 bt_status_t btif_storage_add_ble_local_key(const Octet16& key,
69                                            uint8_t key_type) {
70   mock_function_count_map[__func__]++;
71   return BT_STATUS_SUCCESS;
72 }
btif_storage_add_bonded_device(RawAddress * remote_bd_addr,LinkKey link_key,uint8_t key_type,uint8_t pin_length)73 bt_status_t btif_storage_add_bonded_device(RawAddress* remote_bd_addr,
74                                            LinkKey link_key, uint8_t key_type,
75                                            uint8_t pin_length) {
76   mock_function_count_map[__func__]++;
77   return BT_STATUS_SUCCESS;
78 }
btif_storage_add_hid_device_info(RawAddress * remote_bd_addr,uint16_t attr_mask,uint8_t sub_class,uint8_t app_id,uint16_t vendor_id,uint16_t product_id,uint16_t version,uint8_t ctry_code,uint16_t ssr_max_latency,uint16_t ssr_min_tout,uint16_t dl_len,uint8_t * dsc_list)79 bt_status_t btif_storage_add_hid_device_info(
80     RawAddress* remote_bd_addr, uint16_t attr_mask, uint8_t sub_class,
81     uint8_t app_id, uint16_t vendor_id, uint16_t product_id, uint16_t version,
82     uint8_t ctry_code, uint16_t ssr_max_latency, uint16_t ssr_min_tout,
83     uint16_t dl_len, uint8_t* dsc_list) {
84   mock_function_count_map[__func__]++;
85   return BT_STATUS_SUCCESS;
86 }
btif_storage_add_remote_device(const RawAddress * remote_bd_addr,uint32_t num_properties,bt_property_t * properties)87 bt_status_t btif_storage_add_remote_device(const RawAddress* remote_bd_addr,
88                                            uint32_t num_properties,
89                                            bt_property_t* properties) {
90   mock_function_count_map[__func__]++;
91   return BT_STATUS_SUCCESS;
92 }
btif_storage_get_adapter_property(bt_property_t * property)93 bt_status_t btif_storage_get_adapter_property(bt_property_t* property) {
94   mock_function_count_map[__func__]++;
95   return BT_STATUS_SUCCESS;
96 }
btif_storage_get_ble_bonding_key(const RawAddress & remote_bd_addr,uint8_t key_type,uint8_t * key_value,int key_length)97 bt_status_t btif_storage_get_ble_bonding_key(const RawAddress& remote_bd_addr,
98                                              uint8_t key_type,
99                                              uint8_t* key_value,
100                                              int key_length) {
101   mock_function_count_map[__func__]++;
102   return BT_STATUS_SUCCESS;
103 }
btif_storage_get_ble_local_key(uint8_t key_type,Octet16 * key_value)104 bt_status_t btif_storage_get_ble_local_key(uint8_t key_type,
105                                            Octet16* key_value) {
106   mock_function_count_map[__func__]++;
107   return BT_STATUS_SUCCESS;
108 }
btif_storage_get_remote_addr_type(const RawAddress * remote_bd_addr,tBLE_ADDR_TYPE * addr_type)109 bt_status_t btif_storage_get_remote_addr_type(const RawAddress* remote_bd_addr,
110                                               tBLE_ADDR_TYPE* addr_type) {
111   mock_function_count_map[__func__]++;
112   return BT_STATUS_SUCCESS;
113 }
btif_storage_get_remote_device_property(const RawAddress * remote_bd_addr,bt_property_t * property)114 bt_status_t btif_storage_get_remote_device_property(
115     const RawAddress* remote_bd_addr, bt_property_t* property) {
116   mock_function_count_map[__func__]++;
117   return BT_STATUS_SUCCESS;
118 }
btif_storage_load_bonded_devices(void)119 bt_status_t btif_storage_load_bonded_devices(void) {
120   mock_function_count_map[__func__]++;
121   return BT_STATUS_SUCCESS;
122 }
btif_storage_load_bonded_hid_info(void)123 bt_status_t btif_storage_load_bonded_hid_info(void) {
124   mock_function_count_map[__func__]++;
125   return BT_STATUS_SUCCESS;
126 }
btif_storage_load_hidd(void)127 bt_status_t btif_storage_load_hidd(void) {
128   mock_function_count_map[__func__]++;
129   return BT_STATUS_SUCCESS;
130 }
btif_storage_remove_ble_bonding_keys(const RawAddress * remote_bd_addr)131 bt_status_t btif_storage_remove_ble_bonding_keys(
132     const RawAddress* remote_bd_addr) {
133   mock_function_count_map[__func__]++;
134   return BT_STATUS_SUCCESS;
135 }
btif_storage_remove_ble_local_keys(void)136 bt_status_t btif_storage_remove_ble_local_keys(void) {
137   mock_function_count_map[__func__]++;
138   return BT_STATUS_SUCCESS;
139 }
btif_storage_remove_bonded_device(const RawAddress * remote_bd_addr)140 bt_status_t btif_storage_remove_bonded_device(
141     const RawAddress* remote_bd_addr) {
142   mock_function_count_map[__func__]++;
143   return BT_STATUS_SUCCESS;
144 }
btif_storage_remove_hid_info(const RawAddress & remote_bd_addr)145 bt_status_t btif_storage_remove_hid_info(const RawAddress& remote_bd_addr) {
146   mock_function_count_map[__func__]++;
147   return BT_STATUS_SUCCESS;
148 }
btif_storage_remove_hidd(RawAddress * remote_bd_addr)149 bt_status_t btif_storage_remove_hidd(RawAddress* remote_bd_addr) {
150   mock_function_count_map[__func__]++;
151   return BT_STATUS_SUCCESS;
152 }
btif_storage_set_adapter_property(bt_property_t * property)153 bt_status_t btif_storage_set_adapter_property(bt_property_t* property) {
154   mock_function_count_map[__func__]++;
155   return BT_STATUS_SUCCESS;
156 }
btif_storage_set_hidd(const RawAddress & remote_bd_addr)157 bt_status_t btif_storage_set_hidd(const RawAddress& remote_bd_addr) {
158   mock_function_count_map[__func__]++;
159   return BT_STATUS_SUCCESS;
160 }
btif_storage_set_remote_addr_type(const RawAddress * remote_bd_addr,tBLE_ADDR_TYPE addr_type)161 bt_status_t btif_storage_set_remote_addr_type(const RawAddress* remote_bd_addr,
162                                               tBLE_ADDR_TYPE addr_type) {
163   mock_function_count_map[__func__]++;
164   return BT_STATUS_SUCCESS;
165 }
btif_storage_set_remote_device_property(const RawAddress * remote_bd_addr,bt_property_t * property)166 bt_status_t btif_storage_set_remote_device_property(
167     const RawAddress* remote_bd_addr, bt_property_t* property) {
168   mock_function_count_map[__func__]++;
169   return BT_STATUS_SUCCESS;
170 }
btif_storage_add_hearing_aid(const HearingDevice & dev_info)171 void btif_storage_add_hearing_aid(const HearingDevice& dev_info) {
172   mock_function_count_map[__func__]++;
173 }
btif_storage_get_num_bonded_devices(void)174 int btif_storage_get_num_bonded_devices(void) {
175   mock_function_count_map[__func__]++;
176   return 0;
177 }
btif_split_uuids_string(const char * str,bluetooth::Uuid * p_uuid,size_t max_uuids)178 size_t btif_split_uuids_string(const char* str, bluetooth::Uuid* p_uuid,
179                                size_t max_uuids) {
180   mock_function_count_map[__func__]++;
181   return 0;
182 }
btif_storage_get_gatt_cl_supp_feat(const RawAddress & bd_addr)183 uint8_t btif_storage_get_gatt_cl_supp_feat(const RawAddress& bd_addr) {
184   mock_function_count_map[__func__]++;
185   return 0;
186 }
btif_storage_get_local_io_caps()187 uint8_t btif_storage_get_local_io_caps() {
188   mock_function_count_map[__func__]++;
189   return 0;
190 }
btif_storage_get_local_io_caps_ble()191 uint8_t btif_storage_get_local_io_caps_ble() {
192   mock_function_count_map[__func__]++;
193   return 0;
194 }
btif_storage_load_bonded_hearing_aids()195 void btif_storage_load_bonded_hearing_aids() {
196   mock_function_count_map[__func__]++;
197 }
btif_storage_remove_gatt_cl_db_hash(const RawAddress & bd_addr)198 void btif_storage_remove_gatt_cl_db_hash(const RawAddress& bd_addr) {
199   mock_function_count_map[__func__]++;
200 }
btif_storage_remove_gatt_cl_supp_feat(const RawAddress & bd_addr)201 void btif_storage_remove_gatt_cl_supp_feat(const RawAddress& bd_addr) {
202   mock_function_count_map[__func__]++;
203 }
btif_storage_remove_hearing_aid(const RawAddress & address)204 void btif_storage_remove_hearing_aid(const RawAddress& address) {
205   mock_function_count_map[__func__]++;
206 }
btif_storage_set_gatt_cl_db_hash(const RawAddress & bd_addr,Octet16 hash)207 void btif_storage_set_gatt_cl_db_hash(const RawAddress& bd_addr, Octet16 hash) {
208   mock_function_count_map[__func__]++;
209 }
btif_storage_set_gatt_cl_supp_feat(const RawAddress & bd_addr,uint8_t feat)210 void btif_storage_set_gatt_cl_supp_feat(const RawAddress& bd_addr,
211                                         uint8_t feat) {
212   mock_function_count_map[__func__]++;
213 }
btif_storage_set_hearing_aid_acceptlist(const RawAddress & address,bool add_to_acceptlist)214 void btif_storage_set_hearing_aid_acceptlist(const RawAddress& address,
215                                              bool add_to_acceptlist) {
216   mock_function_count_map[__func__]++;
217 }
btif_storage_set_gatt_sr_supp_feat(const RawAddress & addr,uint8_t feat)218 void btif_storage_set_gatt_sr_supp_feat(const RawAddress& addr, uint8_t feat) {
219   mock_function_count_map[__func__]++;
220 }
btif_storage_get_sr_supp_feat(const RawAddress & bd_addr)221 uint8_t btif_storage_get_sr_supp_feat(const RawAddress& bd_addr) {
222   mock_function_count_map[__func__]++;
223   return 0;
224 }
225