1 /*
2  * Copyright 2020 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:27
20  */
21 
22 #include <map>
23 #include <string>
24 
25 extern std::map<std::string, int> mock_function_count_map;
26 
27 #include <base/at_exit.h>
28 #include <base/bind.h>
29 #include <base/threading/platform_thread.h>
30 #include <signal.h>
31 #include <sys/types.h>
32 #include <cstdint>
33 #include "bt_target.h"
34 #include "btif/include/btif_av.h"
35 #include "btif/include/btif_common.h"
36 #include "btif/include/btif_config.h"
37 #include "btif/include/btif_dm.h"
38 #include "btif/include/btif_pan.h"
39 #include "btif/include/btif_profile_queue.h"
40 #include "btif/include/btif_sock.h"
41 #include "btif/include/btif_storage.h"
42 #include "btif/include/stack_manager.h"
43 #include "common/message_loop_thread.h"
44 #include "device/include/controller.h"
45 #include "osi/include/future.h"
46 #include "osi/include/log.h"
47 #include "osi/include/properties.h"
48 #include "stack/include/a2dp_api.h"
49 #include "stack/include/btm_api.h"
50 #include "stack/include/btm_ble_api.h"
51 #include "types/bluetooth/uuid.h"
52 
53 #ifndef UNUSED_ATTR
54 #define UNUSED_ATTR
55 #endif
56 
btif_is_dut_mode()57 bool btif_is_dut_mode() {
58   mock_function_count_map[__func__]++;
59   return false;
60 }
is_on_jni_thread()61 bool is_on_jni_thread() {
62   mock_function_count_map[__func__]++;
63   return false;
64 }
property_deep_copy(const bt_property_t * prop)65 bt_property_t* property_deep_copy(const bt_property_t* prop) {
66   mock_function_count_map[__func__]++;
67   return nullptr;
68 }
btif_cleanup_bluetooth()69 bt_status_t btif_cleanup_bluetooth() {
70   mock_function_count_map[__func__]++;
71   return BT_STATUS_SUCCESS;
72 }
btif_init_bluetooth()73 bt_status_t btif_init_bluetooth() {
74   mock_function_count_map[__func__]++;
75   return BT_STATUS_SUCCESS;
76 }
btif_set_dynamic_audio_buffer_size(int codec,int size)77 bt_status_t btif_set_dynamic_audio_buffer_size(int codec, int size) {
78   mock_function_count_map[__func__]++;
79   return BT_STATUS_SUCCESS;
80 }
btif_transfer_context(tBTIF_CBACK * p_cback,uint16_t event,char * p_params,int param_len,tBTIF_COPY_CBACK * p_copy_cback)81 bt_status_t btif_transfer_context(tBTIF_CBACK* p_cback, uint16_t event,
82                                   char* p_params, int param_len,
83                                   tBTIF_COPY_CBACK* p_copy_cback) {
84   mock_function_count_map[__func__]++;
85   return BT_STATUS_SUCCESS;
86 }
do_in_jni_thread(base::OnceClosure task)87 bt_status_t do_in_jni_thread(base::OnceClosure task) {
88   mock_function_count_map[__func__]++;
89   return BT_STATUS_SUCCESS;
90 }
do_in_jni_thread(const base::Location & from_here,base::OnceClosure task)91 bt_status_t do_in_jni_thread(const base::Location& from_here,
92                              base::OnceClosure task) {
93   mock_function_count_map[__func__]++;
94   return BT_STATUS_SUCCESS;
95 }
get_jni_message_loop()96 btbase::AbstractMessageLoop* get_jni_message_loop() {
97   mock_function_count_map[__func__]++;
98   return nullptr;
99 }
btif_is_enabled(void)100 int btif_is_enabled(void) {
101   mock_function_count_map[__func__]++;
102   return 0;
103 }
btif_get_enabled_services_mask(void)104 tBTA_SERVICE_MASK btif_get_enabled_services_mask(void) {
105   mock_function_count_map[__func__]++;
106   return 0;
107 }
DynamicAudiobufferSizeCompleteCallback(tBTM_VSC_CMPL * p_vsc_cmpl_params)108 void DynamicAudiobufferSizeCompleteCallback(tBTM_VSC_CMPL* p_vsc_cmpl_params) {
109   mock_function_count_map[__func__]++;
110 }
btif_adapter_properties_evt(bt_status_t status,uint32_t num_props,bt_property_t * p_props)111 void btif_adapter_properties_evt(bt_status_t status, uint32_t num_props,
112                                  bt_property_t* p_props) {
113   mock_function_count_map[__func__]++;
114 }
btif_disable_service(tBTA_SERVICE_ID service_id)115 void btif_disable_service(tBTA_SERVICE_ID service_id) {
116   mock_function_count_map[__func__]++;
117 }
btif_dut_mode_configure(uint8_t enable)118 void btif_dut_mode_configure(uint8_t enable) {
119   mock_function_count_map[__func__]++;
120 }
btif_dut_mode_send(uint16_t opcode,uint8_t * buf,uint8_t len)121 void btif_dut_mode_send(uint16_t opcode, uint8_t* buf, uint8_t len) {
122   mock_function_count_map[__func__]++;
123 }
btif_enable_bluetooth_evt()124 void btif_enable_bluetooth_evt() { mock_function_count_map[__func__]++; }
btif_enable_service(tBTA_SERVICE_ID service_id)125 void btif_enable_service(tBTA_SERVICE_ID service_id) {
126   mock_function_count_map[__func__]++;
127 }
btif_get_adapter_properties(void)128 void btif_get_adapter_properties(void) { mock_function_count_map[__func__]++; }
btif_get_adapter_property(bt_property_type_t type)129 void btif_get_adapter_property(bt_property_type_t type) {
130   mock_function_count_map[__func__]++;
131 }
btif_get_remote_device_properties(RawAddress remote_addr)132 void btif_get_remote_device_properties(RawAddress remote_addr) {
133   mock_function_count_map[__func__]++;
134 }
btif_get_remote_device_property(RawAddress remote_addr,bt_property_type_t type)135 void btif_get_remote_device_property(RawAddress remote_addr,
136                                      bt_property_type_t type) {
137   mock_function_count_map[__func__]++;
138 }
btif_init_ok()139 void btif_init_ok() { mock_function_count_map[__func__]++; }
btif_remote_properties_evt(bt_status_t status,RawAddress * remote_addr,uint32_t num_props,bt_property_t * p_props)140 void btif_remote_properties_evt(bt_status_t status, RawAddress* remote_addr,
141                                 uint32_t num_props, bt_property_t* p_props) {
142   mock_function_count_map[__func__]++;
143 }
btif_set_adapter_property(bt_property_t * property)144 void btif_set_adapter_property(bt_property_t* property) {
145   mock_function_count_map[__func__]++;
146 }
btif_set_remote_device_property(RawAddress * remote_addr,bt_property_t * property)147 void btif_set_remote_device_property(RawAddress* remote_addr,
148                                      bt_property_t* property) {
149   mock_function_count_map[__func__]++;
150 }
151