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 <cstdint>
28 #include "bt_target.h"
29 #include "bta/av/bta_av_int.h"
30 #include "bta/include/bta_ar_api.h"
31 #include "bta/include/utl.h"
32 #include "btif/avrcp/avrcp_service.h"
33 #include "btif/include/btif_av_co.h"
34 #include "btif/include/btif_config.h"
35 #include "main/shim/dumpsys.h"
36 #include "osi/include/log.h"
37 #include "osi/include/osi.h"
38 #include "osi/include/properties.h"
39 #include "stack/include/acl_api.h"
40 #include "types/hci_role.h"
41 
42 #ifndef UNUSED_ATTR
43 #define UNUSED_ATTR
44 #endif
45 
bta_av_chk_start(tBTA_AV_SCB * p_scb)46 bool bta_av_chk_start(tBTA_AV_SCB* p_scb) {
47   mock_function_count_map[__func__]++;
48   return false;
49 }
bta_av_hdl_event(BT_HDR * p_msg)50 bool bta_av_hdl_event(BT_HDR* p_msg) {
51   mock_function_count_map[__func__]++;
52   return false;
53 }
bta_av_link_role_ok(tBTA_AV_SCB * p_scb,uint8_t bits)54 bool bta_av_link_role_ok(tBTA_AV_SCB* p_scb, uint8_t bits) {
55   mock_function_count_map[__func__]++;
56   return false;
57 }
bta_av_switch_if_needed(tBTA_AV_SCB * p_scb)58 bool bta_av_switch_if_needed(tBTA_AV_SCB* p_scb) {
59   mock_function_count_map[__func__]++;
60   return false;
61 }
bta_av_evt_code(uint16_t evt_code)62 const char* bta_av_evt_code(uint16_t evt_code) {
63   mock_function_count_map[__func__]++;
64   return nullptr;
65 }
BTA_AvObtainPeerChannelIndex(const RawAddress & peer_address)66 int BTA_AvObtainPeerChannelIndex(const RawAddress& peer_address) {
67   mock_function_count_map[__func__]++;
68   return 0;
69 }
bta_av_addr_to_scb(const RawAddress & bd_addr)70 tBTA_AV_SCB* bta_av_addr_to_scb(const RawAddress& bd_addr) {
71   mock_function_count_map[__func__]++;
72   return nullptr;
73 }
bta_av_hndl_to_scb(uint16_t handle)74 tBTA_AV_SCB* bta_av_hndl_to_scb(uint16_t handle) {
75   mock_function_count_map[__func__]++;
76   return nullptr;
77 }
bta_av_api_deregister(tBTA_AV_DATA * p_data)78 void bta_av_api_deregister(tBTA_AV_DATA* p_data) {
79   mock_function_count_map[__func__]++;
80 }
bta_av_conn_cback(UNUSED_ATTR uint8_t handle,const RawAddress & bd_addr,uint8_t event,tAVDT_CTRL * p_data,uint8_t scb_index)81 void bta_av_conn_cback(UNUSED_ATTR uint8_t handle, const RawAddress& bd_addr,
82                        uint8_t event, tAVDT_CTRL* p_data, uint8_t scb_index) {
83   mock_function_count_map[__func__]++;
84 }
bta_av_dup_audio_buf(tBTA_AV_SCB * p_scb,BT_HDR * p_buf)85 void bta_av_dup_audio_buf(tBTA_AV_SCB* p_scb, BT_HDR* p_buf) {
86   mock_function_count_map[__func__]++;
87 }
bta_av_free_scb(tBTA_AV_SCB * p_scb)88 void bta_av_free_scb(tBTA_AV_SCB* p_scb) {
89   mock_function_count_map[__func__]++;
90 }
bta_av_restore_switch(void)91 void bta_av_restore_switch(void) { mock_function_count_map[__func__]++; }
bta_av_sm_execute(tBTA_AV_CB * p_cb,uint16_t event,tBTA_AV_DATA * p_data)92 void bta_av_sm_execute(tBTA_AV_CB* p_cb, uint16_t event, tBTA_AV_DATA* p_data) {
93   mock_function_count_map[__func__]++;
94 }
bta_debug_av_dump(int fd)95 void bta_debug_av_dump(int fd) { mock_function_count_map[__func__]++; }
OnConnected(const RawAddress & peer_address)96 void tBTA_AV_SCB::OnConnected(const RawAddress& peer_address) {
97   mock_function_count_map[__func__]++;
98 }
OnDisconnected()99 void tBTA_AV_SCB::OnDisconnected() { mock_function_count_map[__func__]++; }
SetAvdtpVersion(uint16_t avdtp_version)100 void tBTA_AV_SCB::SetAvdtpVersion(uint16_t avdtp_version) {
101   mock_function_count_map[__func__]++;
102 }
103