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:21
20 */
21
22 #include <map>
23 #include <string>
24
25 extern std::map<std::string, int> mock_function_count_map;
26
27 #include <base/logging.h>
28 #include <stddef.h>
29 #include <stdlib.h>
30 #include <string.h>
31 #include "bt_types.h"
32 #include "bta/dm/bta_dm_int.h"
33 #include "bta/sys/bta_sys.h"
34 #include "btcore/include/module.h"
35 #include "btif/include/btif_bqr.h"
36 #include "btu.h"
37 #include "common/message_loop_thread.h"
38 #include "device/include/controller.h"
39 #include "hci/include/hci_layer.h"
40 #include "hcimsgs.h"
41 #include "main/shim/btm_api.h"
42 #include "main/shim/controller.h"
43 #include "main/shim/shim.h"
44 #include "osi/include/osi.h"
45 #include "stack/btm/btm_ble_int.h"
46 #include "stack/gatt/connection_manager.h"
47 #include "stack/include/acl_api.h"
48 #include "stack/include/l2cap_controller_interface.h"
49
50 #ifndef UNUSED_ATTR
51 #define UNUSED_ATTR
52 #endif
53
BTM_IsDeviceUp(void)54 bool BTM_IsDeviceUp(void) {
55 mock_function_count_map[__func__]++;
56 return false;
57 }
BTM_BT_Quality_Report_VSE_Register(bool is_register,tBTM_BT_QUALITY_REPORT_RECEIVER * p_bqr_report_receiver)58 tBTM_STATUS BTM_BT_Quality_Report_VSE_Register(
59 bool is_register, tBTM_BT_QUALITY_REPORT_RECEIVER* p_bqr_report_receiver) {
60 mock_function_count_map[__func__]++;
61 return BTM_SUCCESS;
62 }
BTM_DeleteStoredLinkKey(const RawAddress * bd_addr,tBTM_CMPL_CB * p_cb)63 tBTM_STATUS BTM_DeleteStoredLinkKey(const RawAddress* bd_addr,
64 tBTM_CMPL_CB* p_cb) {
65 mock_function_count_map[__func__]++;
66 return BTM_SUCCESS;
67 }
BTM_EnableTestMode(void)68 tBTM_STATUS BTM_EnableTestMode(void) {
69 mock_function_count_map[__func__]++;
70 return BTM_SUCCESS;
71 }
BTM_ReadLocalDeviceName(char ** p_name)72 tBTM_STATUS BTM_ReadLocalDeviceName(char** p_name) {
73 mock_function_count_map[__func__]++;
74 return BTM_SUCCESS;
75 }
BTM_ReadLocalDeviceNameFromController(tBTM_CMPL_CB * p_rln_cmpl_cback)76 tBTM_STATUS BTM_ReadLocalDeviceNameFromController(
77 tBTM_CMPL_CB* p_rln_cmpl_cback) {
78 mock_function_count_map[__func__]++;
79 return BTM_SUCCESS;
80 }
BTM_RegisterForVSEvents(tBTM_VS_EVT_CB * p_cb,bool is_register)81 tBTM_STATUS BTM_RegisterForVSEvents(tBTM_VS_EVT_CB* p_cb, bool is_register) {
82 mock_function_count_map[__func__]++;
83 return BTM_SUCCESS;
84 }
BTM_SetDeviceClass(DEV_CLASS dev_class)85 tBTM_STATUS BTM_SetDeviceClass(DEV_CLASS dev_class) {
86 mock_function_count_map[__func__]++;
87 return BTM_SUCCESS;
88 }
BTM_SetLocalDeviceName(char * p_name)89 tBTM_STATUS BTM_SetLocalDeviceName(char* p_name) {
90 mock_function_count_map[__func__]++;
91 return BTM_SUCCESS;
92 }
BTM_ReadDeviceClass(void)93 uint8_t* BTM_ReadDeviceClass(void) {
94 mock_function_count_map[__func__]++;
95 return nullptr;
96 }
BTM_VendorSpecificCommand(uint16_t opcode,uint8_t param_len,uint8_t * p_param_buf,tBTM_VSC_CMPL_CB * p_cb)97 void BTM_VendorSpecificCommand(uint16_t opcode, uint8_t param_len,
98 uint8_t* p_param_buf, tBTM_VSC_CMPL_CB* p_cb) {
99 mock_function_count_map[__func__]++;
100 }
BTM_WritePageTimeout(uint16_t timeout)101 void BTM_WritePageTimeout(uint16_t timeout) {
102 mock_function_count_map[__func__]++;
103 }
BTM_WriteVoiceSettings(uint16_t settings)104 void BTM_WriteVoiceSettings(uint16_t settings) {
105 mock_function_count_map[__func__]++;
106 }
BTM_db_reset(void)107 void BTM_db_reset(void) { mock_function_count_map[__func__]++; }
BTM_reset_complete()108 void BTM_reset_complete() { mock_function_count_map[__func__]++; }
btm_delete_stored_link_key_complete(uint8_t * p)109 void btm_delete_stored_link_key_complete(uint8_t* p) {
110 mock_function_count_map[__func__]++;
111 }
btm_dev_free()112 void btm_dev_free() { mock_function_count_map[__func__]++; }
btm_dev_init()113 void btm_dev_init() { mock_function_count_map[__func__]++; }
btm_read_local_name_complete(uint8_t * p,UNUSED_ATTR uint16_t evt_len)114 void btm_read_local_name_complete(uint8_t* p, UNUSED_ATTR uint16_t evt_len) {
115 mock_function_count_map[__func__]++;
116 }
btm_vendor_specific_evt(uint8_t * p,uint8_t evt_len)117 void btm_vendor_specific_evt(uint8_t* p, uint8_t evt_len) {
118 mock_function_count_map[__func__]++;
119 }
btm_vsc_complete(uint8_t * p,uint16_t opcode,uint16_t evt_len,tBTM_VSC_CMPL_CB * p_vsc_cplt_cback)120 void btm_vsc_complete(uint8_t* p, uint16_t opcode, uint16_t evt_len,
121 tBTM_VSC_CMPL_CB* p_vsc_cplt_cback) {
122 mock_function_count_map[__func__]++;
123 }
124