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