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:12
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_hh_api.h"
29 #include "bta/include/bta_hh_co.h"
30 #include "btif/include/btif_hh.h"
31
32 #ifndef UNUSED_ATTR
33 #define UNUSED_ATTR
34 #endif
35
bta_hh_co_write(int fd,uint8_t * rpt,uint16_t len)36 int bta_hh_co_write(int fd, uint8_t* rpt, uint16_t len) {
37 mock_function_count_map[__func__]++;
38 return 0;
39 }
bta_hh_le_co_cache_load(const RawAddress & remote_bda,uint8_t * p_num_rpt,UNUSED_ATTR uint8_t app_id)40 tBTA_HH_RPT_CACHE_ENTRY* bta_hh_le_co_cache_load(const RawAddress& remote_bda,
41 uint8_t* p_num_rpt,
42 UNUSED_ATTR uint8_t app_id) {
43 mock_function_count_map[__func__]++;
44 return nullptr;
45 }
bta_hh_co_close(uint8_t dev_handle,uint8_t app_id)46 void bta_hh_co_close(uint8_t dev_handle, uint8_t app_id) {
47 mock_function_count_map[__func__]++;
48 }
bta_hh_co_data(uint8_t dev_handle,uint8_t * p_rpt,uint16_t len,tBTA_HH_PROTO_MODE mode,uint8_t sub_class,uint8_t ctry_code,UNUSED_ATTR const RawAddress & peer_addr,uint8_t app_id)49 void bta_hh_co_data(uint8_t dev_handle, uint8_t* p_rpt, uint16_t len,
50 tBTA_HH_PROTO_MODE mode, uint8_t sub_class,
51 uint8_t ctry_code, UNUSED_ATTR const RawAddress& peer_addr,
52 uint8_t app_id) {
53 mock_function_count_map[__func__]++;
54 }
bta_hh_co_destroy(int fd)55 void bta_hh_co_destroy(int fd) { mock_function_count_map[__func__]++; }
bta_hh_co_get_rpt_rsp(uint8_t dev_handle,uint8_t status,uint8_t * p_rpt,uint16_t len)56 void bta_hh_co_get_rpt_rsp(uint8_t dev_handle, uint8_t status, uint8_t* p_rpt,
57 uint16_t len) {
58 mock_function_count_map[__func__]++;
59 }
bta_hh_co_open(uint8_t dev_handle,uint8_t sub_class,tBTA_HH_ATTR_MASK attr_mask,uint8_t app_id)60 void bta_hh_co_open(uint8_t dev_handle, uint8_t sub_class,
61 tBTA_HH_ATTR_MASK attr_mask, uint8_t app_id) {
62 mock_function_count_map[__func__]++;
63 }
bta_hh_co_send_hid_info(btif_hh_device_t * p_dev,const char * dev_name,uint16_t vendor_id,uint16_t product_id,uint16_t version,uint8_t ctry_code,int dscp_len,uint8_t * p_dscp)64 void bta_hh_co_send_hid_info(btif_hh_device_t* p_dev, const char* dev_name,
65 uint16_t vendor_id, uint16_t product_id,
66 uint16_t version, uint8_t ctry_code, int dscp_len,
67 uint8_t* p_dscp) {
68 mock_function_count_map[__func__]++;
69 }
bta_hh_co_set_rpt_rsp(uint8_t dev_handle,uint8_t status)70 void bta_hh_co_set_rpt_rsp(uint8_t dev_handle, uint8_t status) {
71 mock_function_count_map[__func__]++;
72 }
bta_hh_le_co_reset_rpt_cache(const RawAddress & remote_bda,UNUSED_ATTR uint8_t app_id)73 void bta_hh_le_co_reset_rpt_cache(const RawAddress& remote_bda,
74 UNUSED_ATTR uint8_t app_id) {
75 mock_function_count_map[__func__]++;
76 }
bta_hh_le_co_rpt_info(const RawAddress & remote_bda,tBTA_HH_RPT_CACHE_ENTRY * p_entry,UNUSED_ATTR uint8_t app_id)77 void bta_hh_le_co_rpt_info(const RawAddress& remote_bda,
78 tBTA_HH_RPT_CACHE_ENTRY* p_entry,
79 UNUSED_ATTR uint8_t app_id) {
80 mock_function_count_map[__func__]++;
81 }
uhid_set_non_blocking(int fd)82 void uhid_set_non_blocking(int fd) { mock_function_count_map[__func__]++; }
83