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:10
20 *
21 * mockcify.pl ver 0.3.0
22 */
23 // Mock include file to share data between tests and mock
24 #include "test/mock/mock_bta_hh_utils.h"
25
26 #include <cstdint>
27
28 #include "test/common/mock_functions.h"
29 #include "types/raw_address.h"
30
31 // Mocked internal structures, if any
32
33 namespace test {
34 namespace mock {
35 namespace bta_hh_utils {
36
37 // Function state capture and return values, if needed
38 struct bta_hh_add_device_to_list bta_hh_add_device_to_list;
39 struct bta_hh_clean_up_kdev bta_hh_clean_up_kdev;
40 struct bta_hh_cleanup_disable bta_hh_cleanup_disable;
41 struct bta_hh_dev_handle_to_cb_idx bta_hh_dev_handle_to_cb_idx;
42 struct bta_hh_find_cb bta_hh_find_cb;
43 struct bta_hh_get_cb bta_hh_get_cb;
44 struct bta_hh_read_ssr_param bta_hh_read_ssr_param;
45 struct bta_hh_tod_spt bta_hh_tod_spt;
46 struct bta_hh_trace_dev_db bta_hh_trace_dev_db;
47 struct bta_hh_update_di_info bta_hh_update_di_info;
48 struct bta_hh_le_is_hh_gatt_if bta_hh_le_is_hh_gatt_if;
49
50 } // namespace bta_hh_utils
51 } // namespace mock
52 } // namespace test
53
54 // Mocked functions, if any
bta_hh_add_device_to_list(tBTA_HH_DEV_CB * p_cb,uint8_t handle,uint16_t attr_mask,const tHID_DEV_DSCP_INFO * p_dscp_info,uint8_t sub_class,uint16_t ssr_max_latency,uint16_t ssr_min_tout,uint8_t app_id)55 void bta_hh_add_device_to_list(tBTA_HH_DEV_CB* p_cb, uint8_t handle,
56 uint16_t attr_mask,
57 const tHID_DEV_DSCP_INFO* p_dscp_info,
58 uint8_t sub_class, uint16_t ssr_max_latency,
59 uint16_t ssr_min_tout, uint8_t app_id) {
60 inc_func_call_count(__func__);
61 test::mock::bta_hh_utils::bta_hh_add_device_to_list(
62 p_cb, handle, attr_mask, p_dscp_info, sub_class, ssr_max_latency,
63 ssr_min_tout, app_id);
64 }
bta_hh_clean_up_kdev(tBTA_HH_DEV_CB * p_cb)65 void bta_hh_clean_up_kdev(tBTA_HH_DEV_CB* p_cb) {
66 inc_func_call_count(__func__);
67 test::mock::bta_hh_utils::bta_hh_clean_up_kdev(p_cb);
68 }
bta_hh_cleanup_disable(tBTA_HH_STATUS status)69 void bta_hh_cleanup_disable(tBTA_HH_STATUS status) {
70 inc_func_call_count(__func__);
71 test::mock::bta_hh_utils::bta_hh_cleanup_disable(status);
72 }
bta_hh_dev_handle_to_cb_idx(uint8_t dev_handle)73 uint8_t bta_hh_dev_handle_to_cb_idx(uint8_t dev_handle) {
74 inc_func_call_count(__func__);
75 return test::mock::bta_hh_utils::bta_hh_dev_handle_to_cb_idx(dev_handle);
76 }
bta_hh_find_cb(const tAclLinkSpec & link_spec)77 uint8_t bta_hh_find_cb(const tAclLinkSpec& link_spec) {
78 inc_func_call_count(__func__);
79 return test::mock::bta_hh_utils::bta_hh_find_cb(link_spec);
80 }
bta_hh_get_cb(const tAclLinkSpec & link_spec)81 tBTA_HH_DEV_CB* bta_hh_get_cb(const tAclLinkSpec& link_spec) {
82 inc_func_call_count(__func__);
83 return test::mock::bta_hh_utils::bta_hh_get_cb(link_spec);
84 }
bta_hh_read_ssr_param(const tAclLinkSpec & link_spec,uint16_t * p_max_ssr_lat,uint16_t * p_min_ssr_tout)85 tBTA_HH_STATUS bta_hh_read_ssr_param(const tAclLinkSpec& link_spec,
86 uint16_t* p_max_ssr_lat,
87 uint16_t* p_min_ssr_tout) {
88 inc_func_call_count(__func__);
89 return test::mock::bta_hh_utils::bta_hh_read_ssr_param(
90 link_spec, p_max_ssr_lat, p_min_ssr_tout);
91 }
bta_hh_tod_spt(tBTA_HH_DEV_CB * p_cb,uint8_t sub_class)92 bool bta_hh_tod_spt(tBTA_HH_DEV_CB* p_cb, uint8_t sub_class) {
93 inc_func_call_count(__func__);
94 return test::mock::bta_hh_utils::bta_hh_tod_spt(p_cb, sub_class);
95 }
bta_hh_trace_dev_db(void)96 void bta_hh_trace_dev_db(void) {
97 inc_func_call_count(__func__);
98 test::mock::bta_hh_utils::bta_hh_trace_dev_db();
99 }
bta_hh_update_di_info(tBTA_HH_DEV_CB * p_cb,uint16_t vendor_id,uint16_t product_id,uint16_t version,uint8_t flag,uint8_t ctry_code)100 void bta_hh_update_di_info(tBTA_HH_DEV_CB* p_cb, uint16_t vendor_id,
101 uint16_t product_id, uint16_t version, uint8_t flag,
102 uint8_t ctry_code) {
103 inc_func_call_count(__func__);
104 test::mock::bta_hh_utils::bta_hh_update_di_info(p_cb, vendor_id, product_id,
105 version, flag, ctry_code);
106 }
bta_hh_le_is_hh_gatt_if(tGATT_IF client_if)107 bool bta_hh_le_is_hh_gatt_if(tGATT_IF client_if) {
108 inc_func_call_count(__func__);
109 test::mock::bta_hh_utils::bta_hh_le_is_hh_gatt_if(client_if);
110 return false;
111 }
112 // Mocked functions complete
113 // END mockcify generation
114