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:11
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 "stack/include/hiddefs.h"
29 #include "stack/include/hidh_api.h"
30 #include "stack/include/sdp_api.h"
31 #include "types/raw_address.h"
32
33 #ifndef UNUSED_ATTR
34 #define UNUSED_ATTR
35 #endif
36
HID_HostAddDev(const RawAddress & addr,uint16_t attr_mask,uint8_t * handle)37 tHID_STATUS HID_HostAddDev(const RawAddress& addr, uint16_t attr_mask,
38 uint8_t* handle) {
39 mock_function_count_map[__func__]++;
40 return HID_SUCCESS;
41 }
HID_HostCloseDev(uint8_t dev_handle)42 tHID_STATUS HID_HostCloseDev(uint8_t dev_handle) {
43 mock_function_count_map[__func__]++;
44 return HID_SUCCESS;
45 }
HID_HostDeregister(void)46 tHID_STATUS HID_HostDeregister(void) {
47 mock_function_count_map[__func__]++;
48 return HID_SUCCESS;
49 }
HID_HostGetSDPRecord(const RawAddress & addr,tSDP_DISCOVERY_DB * p_db,uint32_t db_len,tHID_HOST_SDP_CALLBACK * sdp_cback)50 tHID_STATUS HID_HostGetSDPRecord(const RawAddress& addr,
51 tSDP_DISCOVERY_DB* p_db, uint32_t db_len,
52 tHID_HOST_SDP_CALLBACK* sdp_cback) {
53 mock_function_count_map[__func__]++;
54 return HID_SUCCESS;
55 }
HID_HostOpenDev(uint8_t dev_handle)56 tHID_STATUS HID_HostOpenDev(uint8_t dev_handle) {
57 mock_function_count_map[__func__]++;
58 return HID_SUCCESS;
59 }
HID_HostRegister(tHID_HOST_DEV_CALLBACK * dev_cback)60 tHID_STATUS HID_HostRegister(tHID_HOST_DEV_CALLBACK* dev_cback) {
61 mock_function_count_map[__func__]++;
62 return HID_SUCCESS;
63 }
HID_HostRemoveDev(uint8_t dev_handle)64 tHID_STATUS HID_HostRemoveDev(uint8_t dev_handle) {
65 mock_function_count_map[__func__]++;
66 return HID_SUCCESS;
67 }
HID_HostWriteDev(uint8_t dev_handle,uint8_t t_type,uint8_t param,uint16_t data,uint8_t report_id,BT_HDR * pbuf)68 tHID_STATUS HID_HostWriteDev(uint8_t dev_handle, uint8_t t_type, uint8_t param,
69 uint16_t data, uint8_t report_id, BT_HDR* pbuf) {
70 mock_function_count_map[__func__]++;
71 return HID_SUCCESS;
72 }
HID_HostSetTraceLevel(uint8_t new_level)73 uint8_t HID_HostSetTraceLevel(uint8_t new_level) {
74 mock_function_count_map[__func__]++;
75 return HID_SUCCESS;
76 }
HID_HostInit(void)77 void HID_HostInit(void) { mock_function_count_map[__func__]++; }
hidh_get_str_attr(tSDP_DISC_REC * p_rec,uint16_t attr_id,uint16_t max_len,char * str)78 void hidh_get_str_attr(tSDP_DISC_REC* p_rec, uint16_t attr_id, uint16_t max_len,
79 char* str) {
80 mock_function_count_map[__func__]++;
81 }
82