1 /*
2  * Copyright 2023 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  * Generated mock file from original source file
18  *   Functions generated:40
19  *
20  *  mockcify.pl ver 0.7.0
21  */
22 
23 // Mock include file to share data between tests and mock
24 #include "test/mock/mock_btif_profile_storage.h"
25 
26 #include <cstdint>
27 
28 #include "test/common/mock_functions.h"
29 
30 // Original usings
31 using bluetooth::Uuid;
32 
33 // Mocked internal structures, if any
34 
35 namespace test {
36 namespace mock {
37 namespace btif_profile_storage {
38 
39 // Function state capture and return values, if needed
40 struct btif_storage_add_groups btif_storage_add_groups;
41 struct btif_storage_add_hearing_aid btif_storage_add_hearing_aid;
42 struct btif_storage_add_hid_device_info btif_storage_add_hid_device_info;
43 struct btif_storage_add_leaudio_has_device btif_storage_add_leaudio_has_device;
44 struct btif_storage_get_hearing_aid_prop btif_storage_get_hearing_aid_prop;
45 struct btif_storage_get_le_hid_devices btif_storage_get_le_hid_devices;
46 struct btif_storage_get_leaudio_has_features
47     btif_storage_get_leaudio_has_features;
48 struct btif_storage_get_leaudio_has_presets
49     btif_storage_get_leaudio_has_presets;
50 struct btif_storage_get_wake_capable_classic_hid_devices
51     btif_storage_get_wake_capable_classic_hid_devices;
52 struct btif_storage_is_pce_version_102 btif_storage_is_pce_version_102;
53 struct btif_storage_leaudio_clear_service_data
54     btif_storage_leaudio_clear_service_data;
55 struct btif_storage_leaudio_update_ase_bin btif_storage_leaudio_update_ase_bin;
56 struct btif_storage_leaudio_update_handles_bin
57     btif_storage_leaudio_update_handles_bin;
58 struct btif_storage_leaudio_update_pacs_bin
59     btif_storage_leaudio_update_pacs_bin;
60 struct btif_storage_load_bonded_csis_devices
61     btif_storage_load_bonded_csis_devices;
62 struct btif_storage_load_bonded_groups btif_storage_load_bonded_groups;
63 struct btif_storage_load_bonded_hearing_aids
64     btif_storage_load_bonded_hearing_aids;
65 struct btif_storage_load_bonded_hid_info btif_storage_load_bonded_hid_info;
66 struct btif_storage_load_bonded_leaudio btif_storage_load_bonded_leaudio;
67 struct btif_storage_load_bonded_leaudio_has_devices
68     btif_storage_load_bonded_leaudio_has_devices;
69 struct btif_storage_load_bonded_volume_control_devices
70     btif_storage_load_bonded_volume_control_devices;
71 struct btif_storage_load_hidd btif_storage_load_hidd;
72 struct btif_storage_remove_csis_device btif_storage_remove_csis_device;
73 struct btif_storage_remove_groups btif_storage_remove_groups;
74 struct btif_storage_remove_hearing_aid btif_storage_remove_hearing_aid;
75 struct btif_storage_remove_hid_info btif_storage_remove_hid_info;
76 struct btif_storage_remove_hidd btif_storage_remove_hidd;
77 struct btif_storage_remove_leaudio btif_storage_remove_leaudio;
78 struct btif_storage_remove_leaudio_has btif_storage_remove_leaudio_has;
79 struct btif_storage_set_hearing_aid_acceptlist
80     btif_storage_set_hearing_aid_acceptlist;
81 struct btif_storage_set_hidd btif_storage_set_hidd;
82 struct btif_storage_set_leaudio_audio_location
83     btif_storage_set_leaudio_audio_location;
84 struct btif_storage_set_leaudio_autoconnect
85     btif_storage_set_leaudio_autoconnect;
86 struct btif_storage_set_leaudio_has_acceptlist
87     btif_storage_set_leaudio_has_acceptlist;
88 struct btif_storage_set_leaudio_has_active_preset
89     btif_storage_set_leaudio_has_active_preset;
90 struct btif_storage_set_leaudio_has_features
91     btif_storage_set_leaudio_has_features;
92 struct btif_storage_set_leaudio_has_presets
93     btif_storage_set_leaudio_has_presets;
94 struct btif_storage_set_leaudio_supported_context_types
95     btif_storage_set_leaudio_supported_context_types;
96 struct btif_storage_set_pce_profile_version
97     btif_storage_set_pce_profile_version;
98 struct btif_storage_update_csis_info btif_storage_update_csis_info;
99 
100 }  // namespace btif_profile_storage
101 }  // namespace mock
102 }  // namespace test
103 
104 // Mocked function return values, if any
105 namespace test {
106 namespace mock {
107 namespace btif_profile_storage {
108 
109 bt_status_t btif_storage_add_hid_device_info::return_value = BT_STATUS_SUCCESS;
110 bool btif_storage_get_hearing_aid_prop::return_value = false;
111 std::vector<std::pair<RawAddress, uint8_t>>
112     btif_storage_get_le_hid_devices::return_value = {};
113 bool btif_storage_get_leaudio_has_features::return_value = false;
114 bool btif_storage_get_leaudio_has_presets::return_value = false;
115 std::vector<RawAddress>
116     btif_storage_get_wake_capable_classic_hid_devices::return_value = {};
117 bool btif_storage_is_pce_version_102::return_value = false;
118 bt_status_t btif_storage_load_bonded_hid_info::return_value = BT_STATUS_SUCCESS;
119 bt_status_t btif_storage_load_hidd::return_value = BT_STATUS_SUCCESS;
120 bt_status_t btif_storage_remove_hid_info::return_value = BT_STATUS_SUCCESS;
121 bt_status_t btif_storage_remove_hidd::return_value = BT_STATUS_SUCCESS;
122 bt_status_t btif_storage_set_hidd::return_value = BT_STATUS_SUCCESS;
123 
124 }  // namespace btif_profile_storage
125 }  // namespace mock
126 }  // namespace test
127 
128 // Mocked functions, if any
btif_storage_add_groups(const RawAddress & addr)129 void btif_storage_add_groups(const RawAddress& addr) {
130   inc_func_call_count(__func__);
131   test::mock::btif_profile_storage::btif_storage_add_groups(addr);
132 }
btif_storage_add_hearing_aid(const HearingDevice & dev_info)133 void btif_storage_add_hearing_aid(const HearingDevice& dev_info) {
134   inc_func_call_count(__func__);
135   test::mock::btif_profile_storage::btif_storage_add_hearing_aid(dev_info);
136 }
btif_storage_add_hid_device_info(const tAclLinkSpec & link_spec,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)137 bt_status_t btif_storage_add_hid_device_info(
138     const tAclLinkSpec& link_spec, uint16_t attr_mask, uint8_t sub_class,
139     uint8_t app_id, uint16_t vendor_id, uint16_t product_id, uint16_t version,
140     uint8_t ctry_code, uint16_t ssr_max_latency, uint16_t ssr_min_tout,
141     uint16_t dl_len, uint8_t* dsc_list) {
142   inc_func_call_count(__func__);
143   return test::mock::btif_profile_storage::btif_storage_add_hid_device_info(
144       link_spec, attr_mask, sub_class, app_id, vendor_id, product_id, version,
145       ctry_code, ssr_max_latency, ssr_min_tout, dl_len, dsc_list);
146 }
btif_storage_add_leaudio_has_device(const RawAddress & address,std::vector<uint8_t> presets_bin,uint8_t features,uint8_t active_preset)147 void btif_storage_add_leaudio_has_device(const RawAddress& address,
148                                          std::vector<uint8_t> presets_bin,
149                                          uint8_t features,
150                                          uint8_t active_preset) {
151   inc_func_call_count(__func__);
152   test::mock::btif_profile_storage::btif_storage_add_leaudio_has_device(
153       address, presets_bin, features, active_preset);
154 }
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)155 bool btif_storage_get_hearing_aid_prop(
156     const RawAddress& address, uint8_t* capabilities, uint64_t* hi_sync_id,
157     uint16_t* render_delay, uint16_t* preparation_delay, uint16_t* codecs) {
158   inc_func_call_count(__func__);
159   return test::mock::btif_profile_storage::btif_storage_get_hearing_aid_prop(
160       address, capabilities, hi_sync_id, render_delay, preparation_delay,
161       codecs);
162 }
btif_storage_get_le_hid_devices(void)163 std::vector<std::pair<RawAddress, uint8_t>> btif_storage_get_le_hid_devices(
164     void) {
165   inc_func_call_count(__func__);
166   return test::mock::btif_profile_storage::btif_storage_get_le_hid_devices();
167 }
btif_storage_get_leaudio_has_features(const RawAddress & address,uint8_t & features)168 bool btif_storage_get_leaudio_has_features(const RawAddress& address,
169                                            uint8_t& features) {
170   inc_func_call_count(__func__);
171   return test::mock::btif_profile_storage::
172       btif_storage_get_leaudio_has_features(address, features);
173 }
btif_storage_get_leaudio_has_presets(const RawAddress & address,std::vector<uint8_t> & presets_bin,uint8_t & active_preset)174 bool btif_storage_get_leaudio_has_presets(const RawAddress& address,
175                                           std::vector<uint8_t>& presets_bin,
176                                           uint8_t& active_preset) {
177   inc_func_call_count(__func__);
178   return test::mock::btif_profile_storage::btif_storage_get_leaudio_has_presets(
179       address, presets_bin, active_preset);
180 }
btif_storage_get_wake_capable_classic_hid_devices(void)181 std::vector<RawAddress> btif_storage_get_wake_capable_classic_hid_devices(
182     void) {
183   inc_func_call_count(__func__);
184   return test::mock::btif_profile_storage::
185       btif_storage_get_wake_capable_classic_hid_devices();
186 }
btif_storage_is_pce_version_102(const RawAddress & remote_bd_addr)187 bool btif_storage_is_pce_version_102(const RawAddress& remote_bd_addr) {
188   inc_func_call_count(__func__);
189   return test::mock::btif_profile_storage::btif_storage_is_pce_version_102(
190       remote_bd_addr);
191 }
btif_storage_leaudio_clear_service_data(const RawAddress & address)192 void btif_storage_leaudio_clear_service_data(const RawAddress& address) {
193   inc_func_call_count(__func__);
194   test::mock::btif_profile_storage::btif_storage_leaudio_clear_service_data(
195       address);
196 }
btif_storage_leaudio_update_ase_bin(const RawAddress & addr)197 void btif_storage_leaudio_update_ase_bin(const RawAddress& addr) {
198   inc_func_call_count(__func__);
199   test::mock::btif_profile_storage::btif_storage_leaudio_update_ase_bin(addr);
200 }
btif_storage_leaudio_update_handles_bin(const RawAddress & addr)201 void btif_storage_leaudio_update_handles_bin(const RawAddress& addr) {
202   inc_func_call_count(__func__);
203   test::mock::btif_profile_storage::btif_storage_leaudio_update_handles_bin(
204       addr);
205 }
btif_storage_leaudio_update_pacs_bin(const RawAddress & addr)206 void btif_storage_leaudio_update_pacs_bin(const RawAddress& addr) {
207   inc_func_call_count(__func__);
208   test::mock::btif_profile_storage::btif_storage_leaudio_update_pacs_bin(addr);
209 }
btif_storage_load_bonded_csis_devices(void)210 void btif_storage_load_bonded_csis_devices(void) {
211   inc_func_call_count(__func__);
212   test::mock::btif_profile_storage::btif_storage_load_bonded_csis_devices();
213 }
btif_storage_load_bonded_groups(void)214 void btif_storage_load_bonded_groups(void) {
215   inc_func_call_count(__func__);
216   test::mock::btif_profile_storage::btif_storage_load_bonded_groups();
217 }
btif_storage_load_bonded_hearing_aids()218 void btif_storage_load_bonded_hearing_aids() {
219   inc_func_call_count(__func__);
220   test::mock::btif_profile_storage::btif_storage_load_bonded_hearing_aids();
221 }
btif_storage_load_bonded_hid_info(void)222 bt_status_t btif_storage_load_bonded_hid_info(void) {
223   inc_func_call_count(__func__);
224   return test::mock::btif_profile_storage::btif_storage_load_bonded_hid_info();
225 }
btif_storage_load_bonded_leaudio()226 void btif_storage_load_bonded_leaudio() {
227   inc_func_call_count(__func__);
228   test::mock::btif_profile_storage::btif_storage_load_bonded_leaudio();
229 }
btif_storage_load_bonded_leaudio_has_devices()230 void btif_storage_load_bonded_leaudio_has_devices() {
231   inc_func_call_count(__func__);
232   test::mock::btif_profile_storage::
233       btif_storage_load_bonded_leaudio_has_devices();
234 }
btif_storage_load_bonded_volume_control_devices(void)235 void btif_storage_load_bonded_volume_control_devices(void) {
236   inc_func_call_count(__func__);
237   test::mock::btif_profile_storage::
238       btif_storage_load_bonded_volume_control_devices();
239 }
btif_storage_load_hidd(void)240 bt_status_t btif_storage_load_hidd(void) {
241   inc_func_call_count(__func__);
242   return test::mock::btif_profile_storage::btif_storage_load_hidd();
243 }
btif_storage_remove_csis_device(const RawAddress & address)244 void btif_storage_remove_csis_device(const RawAddress& address) {
245   inc_func_call_count(__func__);
246   test::mock::btif_profile_storage::btif_storage_remove_csis_device(address);
247 }
btif_storage_remove_groups(const RawAddress & address)248 void btif_storage_remove_groups(const RawAddress& address) {
249   inc_func_call_count(__func__);
250   test::mock::btif_profile_storage::btif_storage_remove_groups(address);
251 }
btif_storage_remove_hearing_aid(const RawAddress & address)252 void btif_storage_remove_hearing_aid(const RawAddress& address) {
253   inc_func_call_count(__func__);
254   test::mock::btif_profile_storage::btif_storage_remove_hearing_aid(address);
255 }
btif_storage_remove_hid_info(const tAclLinkSpec & link_spec)256 bt_status_t btif_storage_remove_hid_info(const tAclLinkSpec& link_spec) {
257   inc_func_call_count(__func__);
258   return test::mock::btif_profile_storage::btif_storage_remove_hid_info(
259       link_spec);
260 }
btif_storage_remove_hidd(RawAddress * remote_bd_addr)261 bt_status_t btif_storage_remove_hidd(RawAddress* remote_bd_addr) {
262   inc_func_call_count(__func__);
263   return test::mock::btif_profile_storage::btif_storage_remove_hidd(
264       remote_bd_addr);
265 }
btif_storage_remove_leaudio(const RawAddress & address)266 void btif_storage_remove_leaudio(const RawAddress& address) {
267   inc_func_call_count(__func__);
268   test::mock::btif_profile_storage::btif_storage_remove_leaudio(address);
269 }
btif_storage_remove_leaudio_has(const RawAddress & address)270 void btif_storage_remove_leaudio_has(const RawAddress& address) {
271   inc_func_call_count(__func__);
272   test::mock::btif_profile_storage::btif_storage_remove_leaudio_has(address);
273 }
btif_storage_set_hearing_aid_acceptlist(const RawAddress & address,bool add_to_acceptlist)274 void btif_storage_set_hearing_aid_acceptlist(const RawAddress& address,
275                                              bool add_to_acceptlist) {
276   inc_func_call_count(__func__);
277   test::mock::btif_profile_storage::btif_storage_set_hearing_aid_acceptlist(
278       address, add_to_acceptlist);
279 }
btif_storage_set_hidd(const RawAddress & remote_bd_addr)280 bt_status_t btif_storage_set_hidd(const RawAddress& remote_bd_addr) {
281   inc_func_call_count(__func__);
282   return test::mock::btif_profile_storage::btif_storage_set_hidd(
283       remote_bd_addr);
284 }
btif_storage_set_leaudio_audio_location(const RawAddress & addr,uint32_t sink_location,uint32_t source_location)285 void btif_storage_set_leaudio_audio_location(const RawAddress& addr,
286                                              uint32_t sink_location,
287                                              uint32_t source_location) {
288   inc_func_call_count(__func__);
289   test::mock::btif_profile_storage::btif_storage_set_leaudio_audio_location(
290       addr, sink_location, source_location);
291 }
btif_storage_set_leaudio_autoconnect(const RawAddress & addr,bool autoconnect)292 void btif_storage_set_leaudio_autoconnect(const RawAddress& addr,
293                                           bool autoconnect) {
294   inc_func_call_count(__func__);
295   test::mock::btif_profile_storage::btif_storage_set_leaudio_autoconnect(
296       addr, autoconnect);
297 }
btif_storage_set_leaudio_has_acceptlist(const RawAddress & address,bool add_to_acceptlist)298 void btif_storage_set_leaudio_has_acceptlist(const RawAddress& address,
299                                              bool add_to_acceptlist) {
300   inc_func_call_count(__func__);
301   test::mock::btif_profile_storage::btif_storage_set_leaudio_has_acceptlist(
302       address, add_to_acceptlist);
303 }
btif_storage_set_leaudio_has_active_preset(const RawAddress & address,uint8_t active_preset)304 void btif_storage_set_leaudio_has_active_preset(const RawAddress& address,
305                                                 uint8_t active_preset) {
306   inc_func_call_count(__func__);
307   test::mock::btif_profile_storage::btif_storage_set_leaudio_has_active_preset(
308       address, active_preset);
309 }
btif_storage_set_leaudio_has_features(const RawAddress & address,uint8_t features)310 void btif_storage_set_leaudio_has_features(const RawAddress& address,
311                                            uint8_t features) {
312   inc_func_call_count(__func__);
313   test::mock::btif_profile_storage::btif_storage_set_leaudio_has_features(
314       address, features);
315 }
btif_storage_set_leaudio_has_presets(const RawAddress & address,std::vector<uint8_t> presets_bin)316 void btif_storage_set_leaudio_has_presets(const RawAddress& address,
317                                           std::vector<uint8_t> presets_bin) {
318   inc_func_call_count(__func__);
319   test::mock::btif_profile_storage::btif_storage_set_leaudio_has_presets(
320       address, presets_bin);
321 }
btif_storage_set_leaudio_supported_context_types(const RawAddress & addr,uint16_t sink_supported_context_type,uint16_t source_supported_context_type)322 void btif_storage_set_leaudio_supported_context_types(
323     const RawAddress& addr, uint16_t sink_supported_context_type,
324     uint16_t source_supported_context_type) {
325   inc_func_call_count(__func__);
326   test::mock::btif_profile_storage::
327       btif_storage_set_leaudio_supported_context_types(
328           addr, sink_supported_context_type, source_supported_context_type);
329 }
btif_storage_set_pce_profile_version(const RawAddress & remote_bd_addr,uint16_t peer_pce_version)330 void btif_storage_set_pce_profile_version(const RawAddress& remote_bd_addr,
331                                           uint16_t peer_pce_version) {
332   inc_func_call_count(__func__);
333   test::mock::btif_profile_storage::btif_storage_set_pce_profile_version(
334       remote_bd_addr, peer_pce_version);
335 }
btif_storage_update_csis_info(const RawAddress & addr)336 void btif_storage_update_csis_info(const RawAddress& addr) {
337   inc_func_call_count(__func__);
338   test::mock::btif_profile_storage::btif_storage_update_csis_info(addr);
339 }
340 // Mocked functions complete
341 // END mockcify generation
342