• 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: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_find_cb bta_hh_find_cb;
42 struct bta_hh_get_cb bta_hh_get_cb;
43 struct bta_hh_read_ssr_param bta_hh_read_ssr_param;
44 struct bta_hh_tod_spt bta_hh_tod_spt;
45 struct bta_hh_trace_dev_db bta_hh_trace_dev_db;
46 struct bta_hh_update_di_info bta_hh_update_di_info;
47 
48 }  // namespace bta_hh_utils
49 }  // namespace mock
50 }  // namespace test
51 
52 // 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)53 void bta_hh_add_device_to_list(tBTA_HH_DEV_CB* p_cb, uint8_t handle, uint16_t attr_mask,
54                                const tHID_DEV_DSCP_INFO* p_dscp_info, uint8_t sub_class,
55                                uint16_t ssr_max_latency, uint16_t ssr_min_tout, uint8_t app_id) {
56   inc_func_call_count(__func__);
57   test::mock::bta_hh_utils::bta_hh_add_device_to_list(
58           p_cb, handle, attr_mask, p_dscp_info, sub_class, ssr_max_latency, ssr_min_tout, app_id);
59 }
bta_hh_clean_up_kdev(tBTA_HH_DEV_CB * p_cb)60 void bta_hh_clean_up_kdev(tBTA_HH_DEV_CB* p_cb) {
61   inc_func_call_count(__func__);
62   test::mock::bta_hh_utils::bta_hh_clean_up_kdev(p_cb);
63 }
bta_hh_cleanup_disable(tBTA_HH_STATUS status)64 void bta_hh_cleanup_disable(tBTA_HH_STATUS status) {
65   inc_func_call_count(__func__);
66   test::mock::bta_hh_utils::bta_hh_cleanup_disable(status);
67 }
bta_hh_find_cb(const tAclLinkSpec & link_spec)68 tBTA_HH_DEV_CB* bta_hh_find_cb(const tAclLinkSpec& link_spec) {
69   inc_func_call_count(__func__);
70   return test::mock::bta_hh_utils::bta_hh_find_cb(link_spec);
71 }
bta_hh_get_cb(const tAclLinkSpec & link_spec)72 tBTA_HH_DEV_CB* bta_hh_get_cb(const tAclLinkSpec& link_spec) {
73   inc_func_call_count(__func__);
74   return test::mock::bta_hh_utils::bta_hh_get_cb(link_spec);
75 }
bta_hh_read_ssr_param(const tAclLinkSpec & link_spec,uint16_t * p_max_ssr_lat,uint16_t * p_min_ssr_tout)76 tBTA_HH_STATUS bta_hh_read_ssr_param(const tAclLinkSpec& link_spec, uint16_t* p_max_ssr_lat,
77                                      uint16_t* p_min_ssr_tout) {
78   inc_func_call_count(__func__);
79   return test::mock::bta_hh_utils::bta_hh_read_ssr_param(link_spec, p_max_ssr_lat, p_min_ssr_tout);
80 }
bta_hh_tod_spt(tBTA_HH_DEV_CB * p_cb,uint8_t sub_class)81 bool bta_hh_tod_spt(tBTA_HH_DEV_CB* p_cb, uint8_t sub_class) {
82   inc_func_call_count(__func__);
83   return test::mock::bta_hh_utils::bta_hh_tod_spt(p_cb, sub_class);
84 }
bta_hh_trace_dev_db(void)85 void bta_hh_trace_dev_db(void) {
86   inc_func_call_count(__func__);
87   test::mock::bta_hh_utils::bta_hh_trace_dev_db();
88 }
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)89 void bta_hh_update_di_info(tBTA_HH_DEV_CB* p_cb, uint16_t vendor_id, uint16_t product_id,
90                            uint16_t version, uint8_t flag, uint8_t ctry_code) {
91   inc_func_call_count(__func__);
92   test::mock::bta_hh_utils::bta_hh_update_di_info(p_cb, vendor_id, product_id, version, flag,
93                                                   ctry_code);
94 }
95 // Mocked functions complete
96 // END mockcify generation
97