• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include "bta/include/bta_hearing_aid_api.h"
27 #include "stack/include/bt_octets.h"
28 #include "test/common/mock_functions.h"
29 #include "types/ble_address_with_type.h"
30 #include "types/bluetooth/uuid.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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__func__);
117   return BT_STATUS_SUCCESS;
118 }
btif_storage_load_bonded_devices(void)119 bt_status_t btif_storage_load_bonded_devices(void) {
120   inc_func_call_count(__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   inc_func_call_count(__func__);
125   return BT_STATUS_SUCCESS;
126 }
btif_storage_load_hidd(void)127 bt_status_t btif_storage_load_hidd(void) {
128   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__func__);
173 }
btif_storage_get_num_bonded_devices(void)174 int btif_storage_get_num_bonded_devices(void) {
175   inc_func_call_count(__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   inc_func_call_count(__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   inc_func_call_count(__func__);
185   return 0;
186 }
btif_storage_get_local_io_caps()187 uint8_t btif_storage_get_local_io_caps() {
188   inc_func_call_count(__func__);
189   return 0;
190 }
btif_storage_get_local_io_caps_ble()191 uint8_t btif_storage_get_local_io_caps_ble() {
192   inc_func_call_count(__func__);
193   return 0;
194 }
btif_storage_load_bonded_hearing_aids()195 void btif_storage_load_bonded_hearing_aids() { inc_func_call_count(__func__); }
btif_storage_remove_gatt_cl_db_hash(const RawAddress & bd_addr)196 void btif_storage_remove_gatt_cl_db_hash(const RawAddress& bd_addr) {
197   inc_func_call_count(__func__);
198 }
btif_storage_remove_gatt_cl_supp_feat(const RawAddress & bd_addr)199 void btif_storage_remove_gatt_cl_supp_feat(const RawAddress& bd_addr) {
200   inc_func_call_count(__func__);
201 }
btif_storage_remove_hearing_aid(const RawAddress & address)202 void btif_storage_remove_hearing_aid(const RawAddress& address) {
203   inc_func_call_count(__func__);
204 }
btif_storage_set_gatt_cl_db_hash(const RawAddress & bd_addr,Octet16 hash)205 void btif_storage_set_gatt_cl_db_hash(const RawAddress& bd_addr, Octet16 hash) {
206   inc_func_call_count(__func__);
207 }
btif_storage_set_gatt_cl_supp_feat(const RawAddress & bd_addr,uint8_t feat)208 void btif_storage_set_gatt_cl_supp_feat(const RawAddress& bd_addr,
209                                         uint8_t feat) {
210   inc_func_call_count(__func__);
211 }
btif_storage_set_hearing_aid_acceptlist(const RawAddress & address,bool add_to_acceptlist)212 void btif_storage_set_hearing_aid_acceptlist(const RawAddress& address,
213                                              bool add_to_acceptlist) {
214   inc_func_call_count(__func__);
215 }
btif_storage_set_gatt_sr_supp_feat(const RawAddress & addr,uint8_t feat)216 void btif_storage_set_gatt_sr_supp_feat(const RawAddress& addr, uint8_t feat) {
217   inc_func_call_count(__func__);
218 }
btif_storage_get_sr_supp_feat(const RawAddress & bd_addr)219 uint8_t btif_storage_get_sr_supp_feat(const RawAddress& bd_addr) {
220   inc_func_call_count(__func__);
221   return 0;
222 }
btif_storage_add_groups(RawAddress const &)223 void btif_storage_add_groups(RawAddress const&) {
224   inc_func_call_count(__func__);
225 }
btif_storage_remove_groups(RawAddress const &)226 void btif_storage_remove_groups(RawAddress const&) {
227   inc_func_call_count(__func__);
228 }
btif_storage_load_bonded_groups()229 void btif_storage_load_bonded_groups() { inc_func_call_count(__func__); }
btif_storage_set_csis_autoconnect(const RawAddress & addr,bool autoconnect)230 void btif_storage_set_csis_autoconnect(const RawAddress& addr,
231                                        bool autoconnect) {
232   inc_func_call_count(__func__);
233 }
btif_storage_update_csis_info(const RawAddress & addr)234 void btif_storage_update_csis_info(const RawAddress& addr) {
235   inc_func_call_count(__func__);
236 }
btif_storage_load_bonded_csis_devices()237 void btif_storage_load_bonded_csis_devices() { inc_func_call_count(__func__); }
btif_storage_remove_csis_device(const RawAddress & address)238 void btif_storage_remove_csis_device(const RawAddress& address) {
239   inc_func_call_count(__func__);
240 }
btif_storage_set_pce_profile_version(const RawAddress & remote_bd_addr,uint16_t peer_pce_version)241 void btif_storage_set_pce_profile_version(const RawAddress& remote_bd_addr,
242                                           uint16_t peer_pce_version) {
243   inc_func_call_count(__func__);
244 }
btif_storage_is_pce_version_102(const RawAddress & remote_bd_addr)245 bool btif_storage_is_pce_version_102(const RawAddress& remote_bd_addr) {
246   inc_func_call_count(__func__);
247   return false;
248 }
249