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:26
20 */
21
22 #include <map>
23 #include <string>
24
25 extern std::map<std::string, int> mock_function_count_map;
26
27 #include <string.h>
28 #include "avdt_api.h"
29 #include "avdtc_api.h"
30 #include "bt_target.h"
31 #include "bt_types.h"
32 #include "bta/include/bta_api.h"
33 #include "btm_api.h"
34 #include "btu.h"
35 #include "l2c_api.h"
36 #include "main/shim/dumpsys.h"
37 #include "osi/include/log.h"
38 #include "stack/avdt/avdt_int.h"
39 #include "stack/btm/btm_sec.h"
40 #include "stack/include/a2dp_codec_api.h"
41
42 #ifndef UNUSED_ATTR
43 #define UNUSED_ATTR
44 #endif
45
AVDT_CloseReq(uint8_t handle)46 uint16_t AVDT_CloseReq(uint8_t handle) {
47 mock_function_count_map[__func__]++;
48 return 0;
49 }
AVDT_ConfigRsp(uint8_t handle,uint8_t label,uint8_t error_code,uint8_t category)50 uint16_t AVDT_ConfigRsp(uint8_t handle, uint8_t label, uint8_t error_code,
51 uint8_t category) {
52 mock_function_count_map[__func__]++;
53 return 0;
54 }
AVDT_ConnectReq(const RawAddress & bd_addr,uint8_t channel_index,tAVDT_CTRL_CBACK * p_cback)55 uint16_t AVDT_ConnectReq(const RawAddress& bd_addr, uint8_t channel_index,
56 tAVDT_CTRL_CBACK* p_cback) {
57 mock_function_count_map[__func__]++;
58 return 0;
59 }
AVDT_CreateStream(uint8_t peer_id,uint8_t * p_handle,const AvdtpStreamConfig & avdtp_stream_config)60 uint16_t AVDT_CreateStream(uint8_t peer_id, uint8_t* p_handle,
61 const AvdtpStreamConfig& avdtp_stream_config) {
62 mock_function_count_map[__func__]++;
63 return 0;
64 }
AVDT_DelayReport(uint8_t handle,uint8_t seid,uint16_t delay)65 uint16_t AVDT_DelayReport(uint8_t handle, uint8_t seid, uint16_t delay) {
66 mock_function_count_map[__func__]++;
67 return 0;
68 }
AVDT_DisconnectReq(const RawAddress & bd_addr,tAVDT_CTRL_CBACK * p_cback)69 uint16_t AVDT_DisconnectReq(const RawAddress& bd_addr,
70 tAVDT_CTRL_CBACK* p_cback) {
71 mock_function_count_map[__func__]++;
72 return 0;
73 }
AVDT_DiscoverReq(const RawAddress & bd_addr,uint8_t channel_index,tAVDT_SEP_INFO * p_sep_info,uint8_t max_seps,tAVDT_CTRL_CBACK * p_cback)74 uint16_t AVDT_DiscoverReq(const RawAddress& bd_addr, uint8_t channel_index,
75 tAVDT_SEP_INFO* p_sep_info, uint8_t max_seps,
76 tAVDT_CTRL_CBACK* p_cback) {
77 mock_function_count_map[__func__]++;
78 return 0;
79 }
AVDT_GetCapReq(const RawAddress & bd_addr,uint8_t channel_index,uint8_t seid,AvdtpSepConfig * p_cfg,tAVDT_CTRL_CBACK * p_cback,bool get_all_cap)80 uint16_t AVDT_GetCapReq(const RawAddress& bd_addr, uint8_t channel_index,
81 uint8_t seid, AvdtpSepConfig* p_cfg,
82 tAVDT_CTRL_CBACK* p_cback, bool get_all_cap) {
83 mock_function_count_map[__func__]++;
84 return 0;
85 }
AVDT_GetL2CapChannel(uint8_t handle)86 uint16_t AVDT_GetL2CapChannel(uint8_t handle) {
87 mock_function_count_map[__func__]++;
88 return 0;
89 }
AVDT_OpenReq(uint8_t handle,const RawAddress & bd_addr,uint8_t channel_index,uint8_t seid,AvdtpSepConfig * p_cfg)90 uint16_t AVDT_OpenReq(uint8_t handle, const RawAddress& bd_addr,
91 uint8_t channel_index, uint8_t seid,
92 AvdtpSepConfig* p_cfg) {
93 mock_function_count_map[__func__]++;
94 return 0;
95 }
AVDT_ReconfigReq(uint8_t handle,AvdtpSepConfig * p_cfg)96 uint16_t AVDT_ReconfigReq(uint8_t handle, AvdtpSepConfig* p_cfg) {
97 mock_function_count_map[__func__]++;
98 return 0;
99 }
AVDT_RemoveStream(uint8_t handle)100 uint16_t AVDT_RemoveStream(uint8_t handle) {
101 mock_function_count_map[__func__]++;
102 return 0;
103 }
AVDT_SecurityReq(uint8_t handle,uint8_t * p_data,uint16_t len)104 uint16_t AVDT_SecurityReq(uint8_t handle, uint8_t* p_data, uint16_t len) {
105 mock_function_count_map[__func__]++;
106 return 0;
107 }
AVDT_SecurityRsp(uint8_t handle,uint8_t label,uint8_t error_code,uint8_t * p_data,uint16_t len)108 uint16_t AVDT_SecurityRsp(uint8_t handle, uint8_t label, uint8_t error_code,
109 uint8_t* p_data, uint16_t len) {
110 mock_function_count_map[__func__]++;
111 return 0;
112 }
AVDT_StartReq(uint8_t * p_handles,uint8_t num_handles)113 uint16_t AVDT_StartReq(uint8_t* p_handles, uint8_t num_handles) {
114 mock_function_count_map[__func__]++;
115 return 0;
116 }
AVDT_SuspendReq(uint8_t * p_handles,uint8_t num_handles)117 uint16_t AVDT_SuspendReq(uint8_t* p_handles, uint8_t num_handles) {
118 mock_function_count_map[__func__]++;
119 return 0;
120 }
AVDT_WriteReqOpt(uint8_t handle,BT_HDR * p_pkt,uint32_t time_stamp,uint8_t m_pt,tAVDT_DATA_OPT_MASK opt)121 uint16_t AVDT_WriteReqOpt(uint8_t handle, BT_HDR* p_pkt, uint32_t time_stamp,
122 uint8_t m_pt, tAVDT_DATA_OPT_MASK opt) {
123 mock_function_count_map[__func__]++;
124 return 0;
125 }
AVDT_SetTraceLevel(uint8_t new_level)126 uint8_t AVDT_SetTraceLevel(uint8_t new_level) {
127 mock_function_count_map[__func__]++;
128 return 0;
129 }
AVDT_AbortReq(uint8_t handle)130 void AVDT_AbortReq(uint8_t handle) { mock_function_count_map[__func__]++; }
AVDT_Deregister(void)131 void AVDT_Deregister(void) { mock_function_count_map[__func__]++; }
AVDT_Register(AvdtpRcb * p_reg,tAVDT_CTRL_CBACK * p_cback)132 void AVDT_Register(AvdtpRcb* p_reg, tAVDT_CTRL_CBACK* p_cback) {
133 mock_function_count_map[__func__]++;
134 }
avdt_ccb_idle_ccb_timer_timeout(void * data)135 void avdt_ccb_idle_ccb_timer_timeout(void* data) {
136 mock_function_count_map[__func__]++;
137 }
avdt_ccb_ret_ccb_timer_timeout(void * data)138 void avdt_ccb_ret_ccb_timer_timeout(void* data) {
139 mock_function_count_map[__func__]++;
140 }
avdt_ccb_rsp_ccb_timer_timeout(void * data)141 void avdt_ccb_rsp_ccb_timer_timeout(void* data) {
142 mock_function_count_map[__func__]++;
143 }
avdt_scb_transport_channel_timer_timeout(void * data)144 void avdt_scb_transport_channel_timer_timeout(void* data) {
145 mock_function_count_map[__func__]++;
146 }
stack_debug_avdtp_api_dump(int fd)147 void stack_debug_avdtp_api_dump(int fd) { mock_function_count_map[__func__]++; }
148