1 /*
2  * Copyright 2022 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 #pragma once
17 
18 /*
19  * Generated mock file from original source file
20  *   Functions generated:34
21  *
22  *  mockcify.pl ver 0.5.0
23  */
24 
25 #include <cstdint>
26 #include <functional>
27 #include <string>
28 
29 // Original included files, if any
30 #include "stack/include/a2dp_codec_api.h"
31 #include "stack/include/bt_hdr.h"
32 
33 // Original usings
34 
35 // Mocked compile conditionals, if any
36 
37 namespace test {
38 namespace mock {
39 namespace stack_a2dp_sbc {
40 
41 // Shared state between mocked functions and tests
42 // Name: A2DP_AdjustCodecSbc
43 // Params: uint8_t* p_codec_info
44 // Return: bool
45 struct A2DP_AdjustCodecSbc {
46   static bool return_value;
47   std::function<bool(uint8_t* p_codec_info)> body{
48       [](uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_AdjustCodecSbc49   bool operator()(uint8_t* p_codec_info) { return body(p_codec_info); };
50 };
51 extern struct A2DP_AdjustCodecSbc A2DP_AdjustCodecSbc;
52 
53 // Name: A2DP_BuildCodecHeaderSbc
54 // Params:  const uint8_t* p_codec_info, BT_HDR* p_buf, uint16_t
55 // frames_per_packet Return: bool
56 struct A2DP_BuildCodecHeaderSbc {
57   static bool return_value;
58   std::function<bool(const uint8_t* p_codec_info, BT_HDR* p_buf,
59                      uint16_t frames_per_packet)>
60       body{[](const uint8_t* /* p_codec_info */, BT_HDR* /* p_buf */,
61               uint16_t /* frames_per_packet */) { return return_value; }};
operatorA2DP_BuildCodecHeaderSbc62   bool operator()(const uint8_t* p_codec_info, BT_HDR* p_buf,
63                   uint16_t frames_per_packet) {
64     return body(p_codec_info, p_buf, frames_per_packet);
65   };
66 };
67 extern struct A2DP_BuildCodecHeaderSbc A2DP_BuildCodecHeaderSbc;
68 
69 // Name: A2DP_CodecEqualsSbc
70 // Params: const uint8_t* p_codec_info_a, const uint8_t* p_codec_info_b
71 // Return: bool
72 struct A2DP_CodecEqualsSbc {
73   static bool return_value;
74   std::function<bool(const uint8_t* p_codec_info_a,
75                      const uint8_t* p_codec_info_b)>
76       body{[](const uint8_t* /* p_codec_info_a */,
77               const uint8_t* /* p_codec_info_b */) { return return_value; }};
operatorA2DP_CodecEqualsSbc78   bool operator()(const uint8_t* p_codec_info_a,
79                   const uint8_t* p_codec_info_b) {
80     return body(p_codec_info_a, p_codec_info_b);
81   };
82 };
83 extern struct A2DP_CodecEqualsSbc A2DP_CodecEqualsSbc;
84 
85 // Name: A2DP_CodecIndexStrSbc
86 // Params: void
87 // Return: const char*
88 struct A2DP_CodecIndexStrSbc {
89   static const char* return_value;
90   std::function<const char*(void)> body{[](void) { return return_value; }};
operatorA2DP_CodecIndexStrSbc91   const char* operator()(void) { return body(); };
92 };
93 extern struct A2DP_CodecIndexStrSbc A2DP_CodecIndexStrSbc;
94 
95 // Name: A2DP_CodecIndexStrSbcSink
96 // Params: void
97 // Return: const char*
98 struct A2DP_CodecIndexStrSbcSink {
99   static const char* return_value;
100   std::function<const char*(void)> body{[](void) { return return_value; }};
operatorA2DP_CodecIndexStrSbcSink101   const char* operator()(void) { return body(); };
102 };
103 extern struct A2DP_CodecIndexStrSbcSink A2DP_CodecIndexStrSbcSink;
104 
105 // Name: A2DP_CodecInfoStringSbc
106 // Params: const uint8_t* p_codec_info
107 // Return: std::string
108 struct A2DP_CodecInfoStringSbc {
109   static std::string return_value;
110   std::function<std::string(const uint8_t* p_codec_info)> body{
111       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_CodecInfoStringSbc112   std::string operator()(const uint8_t* p_codec_info) {
113     return body(p_codec_info);
114   };
115 };
116 extern struct A2DP_CodecInfoStringSbc A2DP_CodecInfoStringSbc;
117 
118 // Name: A2DP_CodecNameSbc
119 // Params:  const uint8_t* p_codec_info
120 // Return: const char*
121 struct A2DP_CodecNameSbc {
122   static const char* return_value;
123   std::function<const char*(const uint8_t* p_codec_info)> body{
124       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_CodecNameSbc125   const char* operator()(const uint8_t* p_codec_info) {
126     return body(p_codec_info);
127   };
128 };
129 extern struct A2DP_CodecNameSbc A2DP_CodecNameSbc;
130 
131 // Name: A2DP_CodecTypeEqualsSbc
132 // Params: const uint8_t* p_codec_info_a, const uint8_t* p_codec_info_b
133 // Return: bool
134 struct A2DP_CodecTypeEqualsSbc {
135   static bool return_value;
136   std::function<bool(const uint8_t* p_codec_info_a,
137                      const uint8_t* p_codec_info_b)>
138       body{[](const uint8_t* /* p_codec_info_a */,
139               const uint8_t* /* p_codec_info_b */) { return return_value; }};
operatorA2DP_CodecTypeEqualsSbc140   bool operator()(const uint8_t* p_codec_info_a,
141                   const uint8_t* p_codec_info_b) {
142     return body(p_codec_info_a, p_codec_info_b);
143   };
144 };
145 extern struct A2DP_CodecTypeEqualsSbc A2DP_CodecTypeEqualsSbc;
146 
147 // Name: A2DP_GetAllocationMethodCodeSbc
148 // Params: const uint8_t* p_codec_info
149 // Return: int
150 struct A2DP_GetAllocationMethodCodeSbc {
151   static int return_value;
152   std::function<int(const uint8_t* p_codec_info)> body{
153       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_GetAllocationMethodCodeSbc154   int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); };
155 };
156 extern struct A2DP_GetAllocationMethodCodeSbc A2DP_GetAllocationMethodCodeSbc;
157 
158 // Name: A2DP_GetBitrateSbc
159 // Params:
160 // Return: uint32_t
161 struct A2DP_GetBitrateSbc {
162   static uint32_t return_value;
163   std::function<uint32_t()> body{[]() { return return_value; }};
operatorA2DP_GetBitrateSbc164   uint32_t operator()() { return body(); };
165 };
166 extern struct A2DP_GetBitrateSbc A2DP_GetBitrateSbc;
167 
168 // Name: A2DP_GetChannelModeCodeSbc
169 // Params: const uint8_t* p_codec_info
170 // Return: int
171 struct A2DP_GetChannelModeCodeSbc {
172   static int return_value;
173   std::function<int(const uint8_t* p_codec_info)> body{
174       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_GetChannelModeCodeSbc175   int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); };
176 };
177 extern struct A2DP_GetChannelModeCodeSbc A2DP_GetChannelModeCodeSbc;
178 
179 // Name: A2DP_GetDecoderInterfaceSbc
180 // Params: const uint8_t* p_codec_info
181 // Return: const tA2DP_DECODER_INTERFACE*
182 struct A2DP_GetDecoderInterfaceSbc {
183   static const tA2DP_DECODER_INTERFACE* return_value;
184   std::function<const tA2DP_DECODER_INTERFACE*(const uint8_t* p_codec_info)>
185       body{[](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_GetDecoderInterfaceSbc186   const tA2DP_DECODER_INTERFACE* operator()(const uint8_t* p_codec_info) {
187     return body(p_codec_info);
188   };
189 };
190 extern struct A2DP_GetDecoderInterfaceSbc A2DP_GetDecoderInterfaceSbc;
191 
192 // Name: A2DP_GetEncoderInterfaceSbc
193 // Params: const uint8_t* p_codec_info
194 // Return: const tA2DP_ENCODER_INTERFACE*
195 struct A2DP_GetEncoderInterfaceSbc {
196   static const tA2DP_ENCODER_INTERFACE* return_value;
197   std::function<const tA2DP_ENCODER_INTERFACE*(const uint8_t* p_codec_info)>
198       body{[](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_GetEncoderInterfaceSbc199   const tA2DP_ENCODER_INTERFACE* operator()(const uint8_t* p_codec_info) {
200     return body(p_codec_info);
201   };
202 };
203 extern struct A2DP_GetEncoderInterfaceSbc A2DP_GetEncoderInterfaceSbc;
204 
205 // Name: A2DP_GetMaxBitpoolSbc
206 // Params: const uint8_t* p_codec_info
207 // Return: int
208 struct A2DP_GetMaxBitpoolSbc {
209   static int return_value;
210   std::function<int(const uint8_t* p_codec_info)> body{
211       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_GetMaxBitpoolSbc212   int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); };
213 };
214 extern struct A2DP_GetMaxBitpoolSbc A2DP_GetMaxBitpoolSbc;
215 
216 // Name: A2DP_GetMinBitpoolSbc
217 // Params: const uint8_t* p_codec_info
218 // Return: int
219 struct A2DP_GetMinBitpoolSbc {
220   static int return_value;
221   std::function<int(const uint8_t* p_codec_info)> body{
222       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_GetMinBitpoolSbc223   int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); };
224 };
225 extern struct A2DP_GetMinBitpoolSbc A2DP_GetMinBitpoolSbc;
226 
227 // Name: A2DP_GetNumberOfBlocksSbc
228 // Params: const uint8_t* p_codec_info
229 // Return: int
230 struct A2DP_GetNumberOfBlocksSbc {
231   static int return_value;
232   std::function<int(const uint8_t* p_codec_info)> body{
233       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_GetNumberOfBlocksSbc234   int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); };
235 };
236 extern struct A2DP_GetNumberOfBlocksSbc A2DP_GetNumberOfBlocksSbc;
237 
238 // Name: A2DP_GetNumberOfSubbandsSbc
239 // Params: const uint8_t* p_codec_info
240 // Return: int
241 struct A2DP_GetNumberOfSubbandsSbc {
242   static int return_value;
243   std::function<int(const uint8_t* p_codec_info)> body{
244       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_GetNumberOfSubbandsSbc245   int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); };
246 };
247 extern struct A2DP_GetNumberOfSubbandsSbc A2DP_GetNumberOfSubbandsSbc;
248 
249 // Name: A2DP_GetPacketTimestampSbc
250 // Params:  const uint8_t* p_codec_info, const uint8_t* p_data, uint32_t*
251 // p_timestamp Return: bool
252 struct A2DP_GetPacketTimestampSbc {
253   static bool return_value;
254   std::function<bool(const uint8_t* p_codec_info, const uint8_t* p_data,
255                      uint32_t* p_timestamp)>
256       body{[](const uint8_t* /* p_codec_info */, const uint8_t* /* p_data */,
257               uint32_t* /* p_timestamp */) { return return_value; }};
operatorA2DP_GetPacketTimestampSbc258   bool operator()(const uint8_t* p_codec_info, const uint8_t* p_data,
259                   uint32_t* p_timestamp) {
260     return body(p_codec_info, p_data, p_timestamp);
261   };
262 };
263 extern struct A2DP_GetPacketTimestampSbc A2DP_GetPacketTimestampSbc;
264 
265 // Name: A2DP_GetSamplingFrequencyCodeSbc
266 // Params: const uint8_t* p_codec_info
267 // Return: int
268 struct A2DP_GetSamplingFrequencyCodeSbc {
269   static int return_value;
270   std::function<int(const uint8_t* p_codec_info)> body{
271       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_GetSamplingFrequencyCodeSbc272   int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); };
273 };
274 extern struct A2DP_GetSamplingFrequencyCodeSbc A2DP_GetSamplingFrequencyCodeSbc;
275 
276 // Name: A2DP_GetSinkTrackChannelTypeSbc
277 // Params: const uint8_t* p_codec_info
278 // Return: int
279 struct A2DP_GetSinkTrackChannelTypeSbc {
280   static int return_value;
281   std::function<int(const uint8_t* p_codec_info)> body{
282       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_GetSinkTrackChannelTypeSbc283   int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); };
284 };
285 extern struct A2DP_GetSinkTrackChannelTypeSbc A2DP_GetSinkTrackChannelTypeSbc;
286 
287 // Name: A2DP_GetTrackBitsPerSampleSbc
288 // Params: const uint8_t* p_codec_info
289 // Return: int
290 struct A2DP_GetTrackBitsPerSampleSbc {
291   static int return_value;
292   std::function<int(const uint8_t* p_codec_info)> body{
293       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_GetTrackBitsPerSampleSbc294   int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); };
295 };
296 extern struct A2DP_GetTrackBitsPerSampleSbc A2DP_GetTrackBitsPerSampleSbc;
297 
298 // Name: A2DP_GetTrackChannelCountSbc
299 // Params: const uint8_t* p_codec_info
300 // Return: int
301 struct A2DP_GetTrackChannelCountSbc {
302   static int return_value;
303   std::function<int(const uint8_t* p_codec_info)> body{
304       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_GetTrackChannelCountSbc305   int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); };
306 };
307 extern struct A2DP_GetTrackChannelCountSbc A2DP_GetTrackChannelCountSbc;
308 
309 // Name: A2DP_GetTrackSampleRateSbc
310 // Params: const uint8_t* p_codec_info
311 // Return: int
312 struct A2DP_GetTrackSampleRateSbc {
313   static int return_value;
314   std::function<int(const uint8_t* p_codec_info)> body{
315       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_GetTrackSampleRateSbc316   int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); };
317 };
318 extern struct A2DP_GetTrackSampleRateSbc A2DP_GetTrackSampleRateSbc;
319 
320 // Name: A2DP_InitCodecConfigSbc
321 // Params: AvdtpSepConfig* p_cfg
322 // Return: bool
323 struct A2DP_InitCodecConfigSbc {
324   static bool return_value;
325   std::function<bool(AvdtpSepConfig* p_cfg)> body{
326       [](AvdtpSepConfig* /* p_cfg */) { return return_value; }};
operatorA2DP_InitCodecConfigSbc327   bool operator()(AvdtpSepConfig* p_cfg) { return body(p_cfg); };
328 };
329 extern struct A2DP_InitCodecConfigSbc A2DP_InitCodecConfigSbc;
330 
331 // Name: A2DP_InitCodecConfigSbcSink
332 // Params: AvdtpSepConfig* p_cfg
333 // Return: bool
334 struct A2DP_InitCodecConfigSbcSink {
335   static bool return_value;
336   std::function<bool(AvdtpSepConfig* p_cfg)> body{
337       [](AvdtpSepConfig* /* p_cfg */) { return return_value; }};
operatorA2DP_InitCodecConfigSbcSink338   bool operator()(AvdtpSepConfig* p_cfg) { return body(p_cfg); };
339 };
340 extern struct A2DP_InitCodecConfigSbcSink A2DP_InitCodecConfigSbcSink;
341 
342 // Name: A2DP_InitDefaultCodecSbc
343 // Params: uint8_t* p_codec_info
344 // Return: void
345 struct A2DP_InitDefaultCodecSbc {
346   std::function<void(uint8_t* p_codec_info)> body{
347       [](uint8_t* /* p_codec_info */) {}};
operatorA2DP_InitDefaultCodecSbc348   void operator()(uint8_t* p_codec_info) { body(p_codec_info); };
349 };
350 extern struct A2DP_InitDefaultCodecSbc A2DP_InitDefaultCodecSbc;
351 
352 // Name: A2DP_IsPeerSinkCodecValidSbc
353 // Params: const uint8_t* p_codec_info
354 // Return: bool
355 struct A2DP_IsPeerSinkCodecValidSbc {
356   static bool return_value;
357   std::function<bool(const uint8_t* p_codec_info)> body{
358       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_IsPeerSinkCodecValidSbc359   bool operator()(const uint8_t* p_codec_info) { return body(p_codec_info); };
360 };
361 extern struct A2DP_IsPeerSinkCodecValidSbc A2DP_IsPeerSinkCodecValidSbc;
362 
363 // Name: A2DP_IsPeerSourceCodecSupportedSbc
364 // Params: const uint8_t* p_codec_info
365 // Return: bool
366 struct A2DP_IsPeerSourceCodecSupportedSbc {
367   static bool return_value;
368   std::function<bool(const uint8_t* p_codec_info)> body{
369       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_IsPeerSourceCodecSupportedSbc370   bool operator()(const uint8_t* p_codec_info) { return body(p_codec_info); };
371 };
372 extern struct A2DP_IsPeerSourceCodecSupportedSbc
373     A2DP_IsPeerSourceCodecSupportedSbc;
374 
375 // Name: A2DP_IsPeerSourceCodecValidSbc
376 // Params: const uint8_t* p_codec_info
377 // Return: bool
378 struct A2DP_IsPeerSourceCodecValidSbc {
379   static bool return_value;
380   std::function<bool(const uint8_t* p_codec_info)> body{
381       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_IsPeerSourceCodecValidSbc382   bool operator()(const uint8_t* p_codec_info) { return body(p_codec_info); };
383 };
384 extern struct A2DP_IsPeerSourceCodecValidSbc A2DP_IsPeerSourceCodecValidSbc;
385 
386 // Name: A2DP_IsSinkCodecSupportedSbc
387 // Params: const uint8_t* p_codec_info
388 // Return: bool
389 struct A2DP_IsSinkCodecSupportedSbc {
390   static bool return_value;
391   std::function<bool(const uint8_t* p_codec_info)> body{
392       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_IsSinkCodecSupportedSbc393   bool operator()(const uint8_t* p_codec_info) { return body(p_codec_info); };
394 };
395 extern struct A2DP_IsSinkCodecSupportedSbc A2DP_IsSinkCodecSupportedSbc;
396 
397 // Name: A2DP_IsSinkCodecValidSbc
398 // Params: const uint8_t* p_codec_info
399 // Return: bool
400 struct A2DP_IsSinkCodecValidSbc {
401   static bool return_value;
402   std::function<bool(const uint8_t* p_codec_info)> body{
403       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_IsSinkCodecValidSbc404   bool operator()(const uint8_t* p_codec_info) { return body(p_codec_info); };
405 };
406 extern struct A2DP_IsSinkCodecValidSbc A2DP_IsSinkCodecValidSbc;
407 
408 // Name: A2DP_IsSourceCodecValidSbc
409 // Params: const uint8_t* p_codec_info
410 // Return: bool
411 struct A2DP_IsSourceCodecValidSbc {
412   static bool return_value;
413   std::function<bool(const uint8_t* p_codec_info)> body{
414       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_IsSourceCodecValidSbc415   bool operator()(const uint8_t* p_codec_info) { return body(p_codec_info); };
416 };
417 extern struct A2DP_IsSourceCodecValidSbc A2DP_IsSourceCodecValidSbc;
418 
419 // Name: A2DP_SinkCodecIndexSbc
420 // Params:  const uint8_t* p_codec_info
421 // Return: btav_a2dp_codec_index_t
422 struct A2DP_SinkCodecIndexSbc {
423   static btav_a2dp_codec_index_t return_value;
424   std::function<btav_a2dp_codec_index_t(const uint8_t* p_codec_info)> body{
425       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_SinkCodecIndexSbc426   btav_a2dp_codec_index_t operator()(const uint8_t* p_codec_info) {
427     return body(p_codec_info);
428   };
429 };
430 extern struct A2DP_SinkCodecIndexSbc A2DP_SinkCodecIndexSbc;
431 
432 // Name: A2DP_SourceCodecIndexSbc
433 // Params:  const uint8_t* p_codec_info
434 // Return: btav_a2dp_codec_index_t
435 struct A2DP_SourceCodecIndexSbc {
436   static btav_a2dp_codec_index_t return_value;
437   std::function<btav_a2dp_codec_index_t(const uint8_t* p_codec_info)> body{
438       [](const uint8_t* /* p_codec_info */) { return return_value; }};
operatorA2DP_SourceCodecIndexSbc439   btav_a2dp_codec_index_t operator()(const uint8_t* p_codec_info) {
440     return body(p_codec_info);
441   };
442 };
443 extern struct A2DP_SourceCodecIndexSbc A2DP_SourceCodecIndexSbc;
444 
445 }  // namespace stack_a2dp_sbc
446 }  // namespace mock
447 }  // namespace test
448 
449 // END mockcify generation
450