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:67
20 */
21
22 #include <string>
23
24 #include "a2dp_codec_api.h"
25 #include "bta/av/bta_av_int.h"
26 #include "stack/include/bt_hdr.h"
27 #include "test/common/mock_functions.h"
28
createCodec(btav_a2dp_codec_index_t,btav_a2dp_codec_priority_t)29 A2dpCodecConfig* A2dpCodecConfig::createCodec(
30 btav_a2dp_codec_index_t /* codec_index */,
31 btav_a2dp_codec_priority_t /* codec_priority */) {
32 inc_func_call_count(__func__);
33 return nullptr;
34 }
findSinkCodecConfig(const uint8_t *)35 A2dpCodecConfig* A2dpCodecs::findSinkCodecConfig(
36 const uint8_t* /* p_codec_info */) {
37 inc_func_call_count(__func__);
38 return nullptr;
39 }
findSourceCodecConfig(const uint8_t *)40 A2dpCodecConfig* A2dpCodecs::findSourceCodecConfig(
41 const uint8_t* /* p_codec_info */) {
42 inc_func_call_count(__func__);
43 return nullptr;
44 }
findSourceCodecConfig(btav_a2dp_codec_index_t)45 A2dpCodecConfig* A2dpCodecs::findSourceCodecConfig(
46 btav_a2dp_codec_index_t /* codec_index */) {
47 inc_func_call_count(__func__);
48 return nullptr;
49 }
A2dpCodecConfig(btav_a2dp_codec_index_t codec_index,uint64_t codec_id,const std::string & name,btav_a2dp_codec_priority_t codec_priority)50 A2dpCodecConfig::A2dpCodecConfig(btav_a2dp_codec_index_t codec_index,
51 uint64_t codec_id, const std::string& name,
52 btav_a2dp_codec_priority_t codec_priority)
53 : codec_index_(codec_index),
54 codec_id_(codec_id),
55 name_(name),
56 default_codec_priority_(codec_priority) {
57 inc_func_call_count(__func__);
58 }
~A2dpCodecConfig()59 A2dpCodecConfig::~A2dpCodecConfig() { inc_func_call_count(__func__); }
A2dpCodecs(const std::vector<btav_a2dp_codec_config_t> &)60 A2dpCodecs::A2dpCodecs(
61 const std::vector<btav_a2dp_codec_config_t>& /* codec_priorities */)
62 : current_codec_config_(nullptr) {
63 inc_func_call_count(__func__);
64 }
~A2dpCodecs()65 A2dpCodecs::~A2dpCodecs() { inc_func_call_count(__func__); }
A2DP_AdjustCodec(uint8_t *)66 bool A2DP_AdjustCodec(uint8_t* /* p_codec_info */) {
67 inc_func_call_count(__func__);
68 return false;
69 }
A2DP_BuildCodecHeader(const uint8_t *,BT_HDR *,uint16_t)70 bool A2DP_BuildCodecHeader(const uint8_t* /* p_codec_info */,
71 BT_HDR* /* p_buf */,
72 uint16_t /* frames_per_packet */) {
73 inc_func_call_count(__func__);
74 return false;
75 }
A2DP_CodecEquals(const uint8_t *,const uint8_t *)76 bool A2DP_CodecEquals(const uint8_t* /* p_codec_info_a */,
77 const uint8_t* /* p_codec_info_b */) {
78 inc_func_call_count(__func__);
79 return false;
80 }
A2DP_CodecTypeEquals(const uint8_t *,const uint8_t *)81 bool A2DP_CodecTypeEquals(const uint8_t* /* p_codec_info_a */,
82 const uint8_t* /* p_codec_info_b */) {
83 inc_func_call_count(__func__);
84 return false;
85 }
A2DP_GetPacketTimestamp(const uint8_t *,const uint8_t *,uint32_t *)86 bool A2DP_GetPacketTimestamp(const uint8_t* /* p_codec_info */,
87 const uint8_t* /* p_data */,
88 uint32_t* /* p_timestamp */) {
89 inc_func_call_count(__func__);
90 return false;
91 }
A2DP_InitCodecConfig(btav_a2dp_codec_index_t,AvdtpSepConfig *)92 bool A2DP_InitCodecConfig(btav_a2dp_codec_index_t /* codec_index */,
93 AvdtpSepConfig* /* p_cfg */) {
94 inc_func_call_count(__func__);
95 return false;
96 }
A2DP_GetEecoderEffectiveFrameSize(const uint8_t *)97 int A2DP_GetEecoderEffectiveFrameSize(const uint8_t* /* p_codec_info */) {
98 inc_func_call_count(__func__);
99 return 0;
100 }
A2DP_IsPeerSinkCodecValid(const uint8_t *)101 bool A2DP_IsPeerSinkCodecValid(const uint8_t* /* p_codec_info */) {
102 inc_func_call_count(__func__);
103 return false;
104 }
A2DP_IsPeerSourceCodecSupported(const uint8_t *)105 bool A2DP_IsPeerSourceCodecSupported(const uint8_t* /* p_codec_info */) {
106 inc_func_call_count(__func__);
107 return false;
108 }
A2DP_IsPeerSourceCodecValid(const uint8_t *)109 bool A2DP_IsPeerSourceCodecValid(const uint8_t* /* p_codec_info */) {
110 inc_func_call_count(__func__);
111 return false;
112 }
A2DP_IsSinkCodecSupported(const uint8_t *)113 bool A2DP_IsSinkCodecSupported(const uint8_t* /* p_codec_info */) {
114 inc_func_call_count(__func__);
115 return false;
116 }
A2DP_IsSinkCodecValid(const uint8_t *)117 bool A2DP_IsSinkCodecValid(const uint8_t* /* p_codec_info */) {
118 inc_func_call_count(__func__);
119 return false;
120 }
A2DP_IsSourceCodecValid(const uint8_t *)121 bool A2DP_IsSourceCodecValid(const uint8_t* /* p_codec_info */) {
122 inc_func_call_count(__func__);
123 return false;
124 }
A2DP_UsesRtpHeader(bool,const uint8_t *)125 bool A2DP_UsesRtpHeader(bool /* content_protection_enabled */,
126 const uint8_t* /* p_codec_info */) {
127 inc_func_call_count(__func__);
128 return false;
129 }
codecConfigIsValid(const btav_a2dp_codec_config_t &)130 bool A2dpCodecConfig::codecConfigIsValid(
131 const btav_a2dp_codec_config_t& /* codec_config */) {
132 inc_func_call_count(__func__);
133 return false;
134 }
copyOutOtaCodecConfig(uint8_t *)135 bool A2dpCodecConfig::copyOutOtaCodecConfig(uint8_t* /* p_codec_info */) {
136 inc_func_call_count(__func__);
137 return false;
138 }
getCodecSpecificConfig(tBT_A2DP_OFFLOAD *)139 bool A2dpCodecConfig::getCodecSpecificConfig(
140 tBT_A2DP_OFFLOAD* /* p_a2dp_offload */) {
141 inc_func_call_count(__func__);
142 return false;
143 }
isCodecConfigEmpty(const btav_a2dp_codec_config_t &)144 bool A2dpCodecConfig::isCodecConfigEmpty(
145 const btav_a2dp_codec_config_t& /* codec_config */) {
146 inc_func_call_count(__func__);
147 return false;
148 }
isValid() const149 bool A2dpCodecConfig::isValid() const {
150 inc_func_call_count(__func__);
151 return false;
152 }
setCodecUserConfig(const btav_a2dp_codec_config_t &,const btav_a2dp_codec_config_t &,const tA2DP_ENCODER_INIT_PEER_PARAMS *,const uint8_t *,bool,uint8_t *,bool *,bool *,bool *)153 bool A2dpCodecConfig::setCodecUserConfig(
154 const btav_a2dp_codec_config_t& /* codec_user_config */,
155 const btav_a2dp_codec_config_t& /* codec_audio_config */,
156 const tA2DP_ENCODER_INIT_PEER_PARAMS* /* p_peer_params */,
157 const uint8_t* /* p_peer_codec_info */, bool /* is_capability */,
158 uint8_t* /* p_result_codec_config */, bool* /* p_restart_input */,
159 bool* /* p_restart_output */, bool* /* p_config_updated */) {
160 inc_func_call_count(__func__);
161 return false;
162 }
getCodecConfigAndCapabilities(btav_a2dp_codec_config_t *,std::vector<btav_a2dp_codec_config_t> *,std::vector<btav_a2dp_codec_config_t> *)163 bool A2dpCodecs::getCodecConfigAndCapabilities(
164 btav_a2dp_codec_config_t* /* p_codec_config */,
165 std::vector<btav_a2dp_codec_config_t>* /* p_codecs_local_capabilities */,
166 std::vector<
167 btav_a2dp_codec_config_t>* /* p_codecs_selectable_capabilities */) {
168 inc_func_call_count(__func__);
169 return false;
170 }
init()171 bool A2dpCodecs::init() {
172 inc_func_call_count(__func__);
173 return false;
174 }
isSupportedCodec(btav_a2dp_codec_index_t)175 bool A2dpCodecs::isSupportedCodec(btav_a2dp_codec_index_t /* codec_index */) {
176 inc_func_call_count(__func__);
177 return false;
178 }
setCodecAudioConfig(const btav_a2dp_codec_config_t &,const tA2DP_ENCODER_INIT_PEER_PARAMS *,const uint8_t *,uint8_t *,bool *,bool *)179 bool A2dpCodecs::setCodecAudioConfig(
180 const btav_a2dp_codec_config_t& /* codec_audio_config */,
181 const tA2DP_ENCODER_INIT_PEER_PARAMS* /* p_peer_params */,
182 const uint8_t* /* p_peer_sink_capabilities */,
183 uint8_t* /* p_result_codec_config */, bool* /* p_restart_output */,
184 bool* /* p_config_updated */) {
185 inc_func_call_count(__func__);
186 return false;
187 }
setCodecConfig(const uint8_t *,bool,uint8_t *,bool)188 bool A2dpCodecs::setCodecConfig(const uint8_t* /* p_peer_codec_info */,
189 bool /* is_capability */,
190 uint8_t* /* p_result_codec_config */,
191 bool /* select_current_codec */) {
192 inc_func_call_count(__func__);
193 return false;
194 }
setCodecOtaConfig(const uint8_t *,const tA2DP_ENCODER_INIT_PEER_PARAMS *,uint8_t *,bool *,bool *,bool *)195 bool A2dpCodecs::setCodecOtaConfig(
196 const uint8_t* /* p_ota_codec_config */,
197 const tA2DP_ENCODER_INIT_PEER_PARAMS* /* p_peer_params */,
198 uint8_t* /* p_result_codec_config */, bool* /* p_restart_input */,
199 bool* /* p_restart_output */, bool* /* p_config_updated */) {
200 inc_func_call_count(__func__);
201 return false;
202 }
setCodecUserConfig(const btav_a2dp_codec_config_t &,const tA2DP_ENCODER_INIT_PEER_PARAMS *,const uint8_t *,uint8_t *,bool *,bool *,bool *)203 bool A2dpCodecs::setCodecUserConfig(
204 const btav_a2dp_codec_config_t& /* codec_user_config */,
205 const tA2DP_ENCODER_INIT_PEER_PARAMS* /* p_peer_params */,
206 const uint8_t* /* p_peer_sink_capabilities */,
207 uint8_t* /* p_result_codec_config */, bool* /* p_restart_input */,
208 bool* /* p_restart_output */, bool* /* p_config_updated */) {
209 inc_func_call_count(__func__);
210 return false;
211 }
setPeerSinkCodecCapabilities(const uint8_t *)212 bool A2dpCodecs::setPeerSinkCodecCapabilities(
213 const uint8_t* /* p_peer_codec_capabilities */) {
214 inc_func_call_count(__func__);
215 return false;
216 }
setPeerSourceCodecCapabilities(const uint8_t *)217 bool A2dpCodecs::setPeerSourceCodecCapabilities(
218 const uint8_t* /* p_peer_codec_capabilities */) {
219 inc_func_call_count(__func__);
220 return false;
221 }
setSinkCodecConfig(const uint8_t *,bool,uint8_t *,bool)222 bool A2dpCodecs::setSinkCodecConfig(const uint8_t* /* p_peer_codec_info */,
223 bool /* is_capability */,
224 uint8_t* /* p_result_codec_config */,
225 bool /* select_current_codec */) {
226 inc_func_call_count(__func__);
227 return false;
228 }
getCodecAudioConfig()229 btav_a2dp_codec_config_t A2dpCodecConfig::getCodecAudioConfig() {
230 inc_func_call_count(__func__);
231 btav_a2dp_codec_config_t config;
232 return config;
233 }
getCodecCapability()234 btav_a2dp_codec_config_t A2dpCodecConfig::getCodecCapability() {
235 inc_func_call_count(__func__);
236 btav_a2dp_codec_config_t config;
237 return config;
238 }
getCodecConfig()239 btav_a2dp_codec_config_t A2dpCodecConfig::getCodecConfig() {
240 inc_func_call_count(__func__);
241 btav_a2dp_codec_config_t config;
242 return config;
243 }
getCodecLocalCapability()244 btav_a2dp_codec_config_t A2dpCodecConfig::getCodecLocalCapability() {
245 inc_func_call_count(__func__);
246 btav_a2dp_codec_config_t config;
247 return config;
248 }
getCodecSelectableCapability()249 btav_a2dp_codec_config_t A2dpCodecConfig::getCodecSelectableCapability() {
250 inc_func_call_count(__func__);
251 btav_a2dp_codec_config_t config;
252 return config;
253 }
getCodecUserConfig()254 btav_a2dp_codec_config_t A2dpCodecConfig::getCodecUserConfig() {
255 inc_func_call_count(__func__);
256 btav_a2dp_codec_config_t config;
257 return config;
258 }
A2DP_SinkCodecIndex(const uint8_t *)259 btav_a2dp_codec_index_t A2DP_SinkCodecIndex(const uint8_t* /* p_codec_info */) {
260 inc_func_call_count(__func__);
261 return BTAV_A2DP_CODEC_INDEX_MAX;
262 }
A2DP_SourceCodecIndex(const uint8_t *)263 btav_a2dp_codec_index_t A2DP_SourceCodecIndex(
264 const uint8_t* /* p_codec_info */) {
265 inc_func_call_count(__func__);
266 return BTAV_A2DP_CODEC_INDEX_MAX;
267 }
A2DP_CodecIndexStr(btav_a2dp_codec_index_t)268 const char* A2DP_CodecIndexStr(btav_a2dp_codec_index_t /* codec_index */) {
269 inc_func_call_count(__func__);
270 return nullptr;
271 }
A2DP_CodecName(const uint8_t *)272 const char* A2DP_CodecName(const uint8_t* /* p_codec_info */) {
273 inc_func_call_count(__func__);
274 return nullptr;
275 }
A2DP_GetDecoderInterface(const uint8_t *)276 const tA2DP_DECODER_INTERFACE* A2DP_GetDecoderInterface(
277 const uint8_t* /* p_codec_info */) {
278 inc_func_call_count(__func__);
279 return nullptr;
280 }
A2DP_GetEncoderInterface(const uint8_t *)281 const tA2DP_ENCODER_INTERFACE* A2DP_GetEncoderInterface(
282 const uint8_t* /* p_codec_info */) {
283 inc_func_call_count(__func__);
284 return nullptr;
285 }
A2DP_GetSinkTrackChannelType(const uint8_t *)286 int A2DP_GetSinkTrackChannelType(const uint8_t* /* p_codec_info */) {
287 inc_func_call_count(__func__);
288 return 0;
289 }
A2DP_GetTrackBitsPerSample(const uint8_t *)290 int A2DP_GetTrackBitsPerSample(const uint8_t* /* p_codec_info */) {
291 inc_func_call_count(__func__);
292 return 0;
293 }
A2DP_GetTrackChannelCount(const uint8_t *)294 int A2DP_GetTrackChannelCount(const uint8_t* /* p_codec_info */) {
295 inc_func_call_count(__func__);
296 return 0;
297 }
A2DP_GetTrackSampleRate(const uint8_t *)298 int A2DP_GetTrackSampleRate(const uint8_t* /* p_codec_info */) {
299 inc_func_call_count(__func__);
300 return 0;
301 }
getTrackBitRate() const302 int A2dpCodecConfig::getTrackBitRate() const {
303 inc_func_call_count(__func__);
304 return 0;
305 }
A2DP_CodecInfoString(const uint8_t *)306 std::string A2DP_CodecInfoString(const uint8_t* /* p_codec_info */) {
307 inc_func_call_count(__func__);
308 return 0;
309 }
codecBitsPerSample2Str(btav_a2dp_codec_bits_per_sample_t)310 std::string A2dpCodecConfig::codecBitsPerSample2Str(
311 btav_a2dp_codec_bits_per_sample_t /* codec_bits_per_sample */) {
312 inc_func_call_count(__func__);
313 return 0;
314 }
codecChannelMode2Str(btav_a2dp_codec_channel_mode_t)315 std::string A2dpCodecConfig::codecChannelMode2Str(
316 btav_a2dp_codec_channel_mode_t /* codec_channel_mode */) {
317 inc_func_call_count(__func__);
318 return 0;
319 }
codecConfig2Str(const btav_a2dp_codec_config_t &)320 std::string A2dpCodecConfig::codecConfig2Str(
321 const btav_a2dp_codec_config_t& /* codec_config */) {
322 inc_func_call_count(__func__);
323 return 0;
324 }
codecSampleRate2Str(btav_a2dp_codec_sample_rate_t)325 std::string A2dpCodecConfig::codecSampleRate2Str(
326 btav_a2dp_codec_sample_rate_t /* codec_sample_rate */) {
327 inc_func_call_count(__func__);
328 return 0;
329 }
A2DP_GetCodecType(const uint8_t *)330 tA2DP_CODEC_TYPE A2DP_GetCodecType(const uint8_t* /* p_codec_info */) {
331 inc_func_call_count(__func__);
332 return 0;
333 }
A2DP_GetMediaType(const uint8_t *)334 uint8_t A2DP_GetMediaType(const uint8_t* /* p_codec_info */) {
335 inc_func_call_count(__func__);
336 return 0;
337 }
getAudioBitsPerSample()338 uint8_t A2dpCodecConfig::getAudioBitsPerSample() {
339 inc_func_call_count(__func__);
340 return 0;
341 }
A2DP_InitDefaultCodec(uint8_t *)342 void A2DP_InitDefaultCodec(uint8_t* /* p_codec_info */) {
343 inc_func_call_count(__func__);
344 }
debug_codec_dump(int)345 void A2dpCodecConfig::debug_codec_dump(int /* fd */) {
346 inc_func_call_count(__func__);
347 }
A2DP_IotGetPeerSinkCodecType(const uint8_t *)348 int A2DP_IotGetPeerSinkCodecType(const uint8_t* /* p_codec_info */) {
349 inc_func_call_count(__func__);
350 return 0;
351 }
setCodecPriority(btav_a2dp_codec_priority_t)352 void A2dpCodecConfig::setCodecPriority(
353 btav_a2dp_codec_priority_t /* codec_priority */) {
354 inc_func_call_count(__func__);
355 }
setDefaultCodecPriority()356 void A2dpCodecConfig::setDefaultCodecPriority() {
357 inc_func_call_count(__func__);
358 }
debug_codec_dump(int)359 void A2dpCodecs::debug_codec_dump(int /* fd */) {
360 inc_func_call_count(__func__);
361 }
362