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, uint16_t frames_per_packet)> body{ 59 [](const uint8_t* /* p_codec_info */, BT_HDR* /* p_buf */, 60 uint16_t /* frames_per_packet */) { return return_value; }}; operatorA2DP_BuildCodecHeaderSbc61 bool operator()(const uint8_t* p_codec_info, BT_HDR* p_buf, uint16_t frames_per_packet) { 62 return body(p_codec_info, p_buf, frames_per_packet); 63 } 64 }; 65 extern struct A2DP_BuildCodecHeaderSbc A2DP_BuildCodecHeaderSbc; 66 67 // Name: A2DP_CodecEqualsSbc 68 // Params: const uint8_t* p_codec_info_a, const uint8_t* p_codec_info_b 69 // Return: bool 70 struct A2DP_CodecEqualsSbc { 71 static bool return_value; 72 std::function<bool(const uint8_t* p_codec_info_a, const uint8_t* p_codec_info_b)> body{ 73 [](const uint8_t* /* p_codec_info_a */, const uint8_t* /* p_codec_info_b */) { 74 return return_value; 75 }}; operatorA2DP_CodecEqualsSbc76 bool operator()(const uint8_t* p_codec_info_a, const uint8_t* p_codec_info_b) { 77 return body(p_codec_info_a, p_codec_info_b); 78 } 79 }; 80 extern struct A2DP_CodecEqualsSbc A2DP_CodecEqualsSbc; 81 82 // Name: A2DP_CodecIndexStrSbc 83 // Params: void 84 // Return: const char* 85 struct A2DP_CodecIndexStrSbc { 86 static const char* return_value; 87 std::function<const char*(void)> body{[](void) { return return_value; }}; operatorA2DP_CodecIndexStrSbc88 const char* operator()(void) { return body(); } 89 }; 90 extern struct A2DP_CodecIndexStrSbc A2DP_CodecIndexStrSbc; 91 92 // Name: A2DP_CodecIndexStrSbcSink 93 // Params: void 94 // Return: const char* 95 struct A2DP_CodecIndexStrSbcSink { 96 static const char* return_value; 97 std::function<const char*(void)> body{[](void) { return return_value; }}; operatorA2DP_CodecIndexStrSbcSink98 const char* operator()(void) { return body(); } 99 }; 100 extern struct A2DP_CodecIndexStrSbcSink A2DP_CodecIndexStrSbcSink; 101 102 // Name: A2DP_CodecInfoStringSbc 103 // Params: const uint8_t* p_codec_info 104 // Return: std::string 105 struct A2DP_CodecInfoStringSbc { 106 static std::string return_value; 107 std::function<std::string(const uint8_t* p_codec_info)> body{ 108 [](const uint8_t* /* p_codec_info */) { return return_value; }}; operatorA2DP_CodecInfoStringSbc109 std::string operator()(const uint8_t* p_codec_info) { return body(p_codec_info); } 110 }; 111 extern struct A2DP_CodecInfoStringSbc A2DP_CodecInfoStringSbc; 112 113 // Name: A2DP_CodecNameSbc 114 // Params: const uint8_t* p_codec_info 115 // Return: const char* 116 struct A2DP_CodecNameSbc { 117 static const char* return_value; 118 std::function<const char*(const uint8_t* p_codec_info)> body{ 119 [](const uint8_t* /* p_codec_info */) { return return_value; }}; operatorA2DP_CodecNameSbc120 const char* operator()(const uint8_t* p_codec_info) { return body(p_codec_info); } 121 }; 122 extern struct A2DP_CodecNameSbc A2DP_CodecNameSbc; 123 124 // Name: A2DP_CodecTypeEqualsSbc 125 // Params: const uint8_t* p_codec_info_a, const uint8_t* p_codec_info_b 126 // Return: bool 127 struct A2DP_CodecTypeEqualsSbc { 128 static bool return_value; 129 std::function<bool(const uint8_t* p_codec_info_a, const uint8_t* p_codec_info_b)> body{ 130 [](const uint8_t* /* p_codec_info_a */, const uint8_t* /* p_codec_info_b */) { 131 return return_value; 132 }}; operatorA2DP_CodecTypeEqualsSbc133 bool operator()(const uint8_t* p_codec_info_a, const uint8_t* p_codec_info_b) { 134 return body(p_codec_info_a, p_codec_info_b); 135 } 136 }; 137 extern struct A2DP_CodecTypeEqualsSbc A2DP_CodecTypeEqualsSbc; 138 139 // Name: A2DP_GetAllocationMethodCodeSbc 140 // Params: const uint8_t* p_codec_info 141 // Return: int 142 struct A2DP_GetAllocationMethodCodeSbc { 143 static int return_value; 144 std::function<int(const uint8_t* p_codec_info)> body{ 145 [](const uint8_t* /* p_codec_info */) { return return_value; }}; operatorA2DP_GetAllocationMethodCodeSbc146 int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); } 147 }; 148 extern struct A2DP_GetAllocationMethodCodeSbc A2DP_GetAllocationMethodCodeSbc; 149 150 // Name: A2DP_GetBitrateSbc 151 // Params: 152 // Return: uint32_t 153 struct A2DP_GetBitrateSbc { 154 static uint32_t return_value; 155 std::function<uint32_t()> body{[]() { return return_value; }}; operatorA2DP_GetBitrateSbc156 uint32_t operator()() { return body(); } 157 }; 158 extern struct A2DP_GetBitrateSbc A2DP_GetBitrateSbc; 159 160 // Name: A2DP_GetChannelModeCodeSbc 161 // Params: const uint8_t* p_codec_info 162 // Return: int 163 struct A2DP_GetChannelModeCodeSbc { 164 static int return_value; 165 std::function<int(const uint8_t* p_codec_info)> body{ 166 [](const uint8_t* /* p_codec_info */) { return return_value; }}; operatorA2DP_GetChannelModeCodeSbc167 int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); } 168 }; 169 extern struct A2DP_GetChannelModeCodeSbc A2DP_GetChannelModeCodeSbc; 170 171 // Name: A2DP_GetDecoderInterfaceSbc 172 // Params: const uint8_t* p_codec_info 173 // Return: const tA2DP_DECODER_INTERFACE* 174 struct A2DP_GetDecoderInterfaceSbc { 175 static const tA2DP_DECODER_INTERFACE* return_value; 176 std::function<const tA2DP_DECODER_INTERFACE*(const uint8_t* p_codec_info)> body{ 177 [](const uint8_t* /* p_codec_info */) { return return_value; }}; operatorA2DP_GetDecoderInterfaceSbc178 const tA2DP_DECODER_INTERFACE* operator()(const uint8_t* p_codec_info) { 179 return body(p_codec_info); 180 } 181 }; 182 extern struct A2DP_GetDecoderInterfaceSbc A2DP_GetDecoderInterfaceSbc; 183 184 // Name: A2DP_GetEncoderInterfaceSbc 185 // Params: const uint8_t* p_codec_info 186 // Return: const tA2DP_ENCODER_INTERFACE* 187 struct A2DP_GetEncoderInterfaceSbc { 188 static const tA2DP_ENCODER_INTERFACE* return_value; 189 std::function<const tA2DP_ENCODER_INTERFACE*(const uint8_t* p_codec_info)> body{ 190 [](const uint8_t* /* p_codec_info */) { return return_value; }}; operatorA2DP_GetEncoderInterfaceSbc191 const tA2DP_ENCODER_INTERFACE* operator()(const uint8_t* p_codec_info) { 192 return body(p_codec_info); 193 } 194 }; 195 extern struct A2DP_GetEncoderInterfaceSbc A2DP_GetEncoderInterfaceSbc; 196 197 // Name: A2DP_GetMaxBitpoolSbc 198 // Params: const uint8_t* p_codec_info 199 // Return: int 200 struct A2DP_GetMaxBitpoolSbc { 201 static int return_value; 202 std::function<int(const uint8_t* p_codec_info)> body{ 203 [](const uint8_t* /* p_codec_info */) { return return_value; }}; operatorA2DP_GetMaxBitpoolSbc204 int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); } 205 }; 206 extern struct A2DP_GetMaxBitpoolSbc A2DP_GetMaxBitpoolSbc; 207 208 // Name: A2DP_GetMinBitpoolSbc 209 // Params: const uint8_t* p_codec_info 210 // Return: int 211 struct A2DP_GetMinBitpoolSbc { 212 static int return_value; 213 std::function<int(const uint8_t* p_codec_info)> body{ 214 [](const uint8_t* /* p_codec_info */) { return return_value; }}; operatorA2DP_GetMinBitpoolSbc215 int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); } 216 }; 217 extern struct A2DP_GetMinBitpoolSbc A2DP_GetMinBitpoolSbc; 218 219 // Name: A2DP_GetNumberOfBlocksSbc 220 // Params: const uint8_t* p_codec_info 221 // Return: int 222 struct A2DP_GetNumberOfBlocksSbc { 223 static int return_value; 224 std::function<int(const uint8_t* p_codec_info)> body{ 225 [](const uint8_t* /* p_codec_info */) { return return_value; }}; operatorA2DP_GetNumberOfBlocksSbc226 int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); } 227 }; 228 extern struct A2DP_GetNumberOfBlocksSbc A2DP_GetNumberOfBlocksSbc; 229 230 // Name: A2DP_GetNumberOfSubbandsSbc 231 // Params: const uint8_t* p_codec_info 232 // Return: int 233 struct A2DP_GetNumberOfSubbandsSbc { 234 static int return_value; 235 std::function<int(const uint8_t* p_codec_info)> body{ 236 [](const uint8_t* /* p_codec_info */) { return return_value; }}; operatorA2DP_GetNumberOfSubbandsSbc237 int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); } 238 }; 239 extern struct A2DP_GetNumberOfSubbandsSbc A2DP_GetNumberOfSubbandsSbc; 240 241 // Name: A2DP_GetPacketTimestampSbc 242 // Params: const uint8_t* p_codec_info, const uint8_t* p_data, uint32_t* 243 // p_timestamp Return: bool 244 struct A2DP_GetPacketTimestampSbc { 245 static bool return_value; 246 std::function<bool(const uint8_t* p_codec_info, const uint8_t* p_data, uint32_t* p_timestamp)> 247 body{[](const uint8_t* /* p_codec_info */, const uint8_t* /* p_data */, 248 uint32_t* /* p_timestamp */) { return return_value; }}; operatorA2DP_GetPacketTimestampSbc249 bool operator()(const uint8_t* p_codec_info, const uint8_t* p_data, uint32_t* p_timestamp) { 250 return body(p_codec_info, p_data, p_timestamp); 251 } 252 }; 253 extern struct A2DP_GetPacketTimestampSbc A2DP_GetPacketTimestampSbc; 254 255 // Name: A2DP_GetSamplingFrequencyCodeSbc 256 // Params: const uint8_t* p_codec_info 257 // Return: int 258 struct A2DP_GetSamplingFrequencyCodeSbc { 259 static int return_value; 260 std::function<int(const uint8_t* p_codec_info)> body{ 261 [](const uint8_t* /* p_codec_info */) { return return_value; }}; operatorA2DP_GetSamplingFrequencyCodeSbc262 int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); } 263 }; 264 extern struct A2DP_GetSamplingFrequencyCodeSbc A2DP_GetSamplingFrequencyCodeSbc; 265 266 // Name: A2DP_GetSinkTrackChannelTypeSbc 267 // Params: const uint8_t* p_codec_info 268 // Return: int 269 struct A2DP_GetSinkTrackChannelTypeSbc { 270 static int return_value; 271 std::function<int(const uint8_t* p_codec_info)> body{ 272 [](const uint8_t* /* p_codec_info */) { return return_value; }}; operatorA2DP_GetSinkTrackChannelTypeSbc273 int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); } 274 }; 275 extern struct A2DP_GetSinkTrackChannelTypeSbc A2DP_GetSinkTrackChannelTypeSbc; 276 277 // Name: A2DP_GetTrackBitsPerSampleSbc 278 // Params: const uint8_t* p_codec_info 279 // Return: int 280 struct A2DP_GetTrackBitsPerSampleSbc { 281 static int return_value; 282 std::function<int(const uint8_t* p_codec_info)> body{ 283 [](const uint8_t* /* p_codec_info */) { return return_value; }}; operatorA2DP_GetTrackBitsPerSampleSbc284 int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); } 285 }; 286 extern struct A2DP_GetTrackBitsPerSampleSbc A2DP_GetTrackBitsPerSampleSbc; 287 288 // Name: A2DP_GetTrackChannelCountSbc 289 // Params: const uint8_t* p_codec_info 290 // Return: int 291 struct A2DP_GetTrackChannelCountSbc { 292 static int return_value; 293 std::function<int(const uint8_t* p_codec_info)> body{ 294 [](const uint8_t* /* p_codec_info */) { return return_value; }}; operatorA2DP_GetTrackChannelCountSbc295 int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); } 296 }; 297 extern struct A2DP_GetTrackChannelCountSbc A2DP_GetTrackChannelCountSbc; 298 299 // Name: A2DP_GetTrackSampleRateSbc 300 // Params: const uint8_t* p_codec_info 301 // Return: int 302 struct A2DP_GetTrackSampleRateSbc { 303 static int return_value; 304 std::function<int(const uint8_t* p_codec_info)> body{ 305 [](const uint8_t* /* p_codec_info */) { return return_value; }}; operatorA2DP_GetTrackSampleRateSbc306 int operator()(const uint8_t* p_codec_info) { return body(p_codec_info); } 307 }; 308 extern struct A2DP_GetTrackSampleRateSbc A2DP_GetTrackSampleRateSbc; 309 310 // Name: A2DP_InitCodecConfigSbc 311 // Params: AvdtpSepConfig* p_cfg 312 // Return: bool 313 struct A2DP_InitCodecConfigSbc { 314 static bool return_value; 315 std::function<bool(AvdtpSepConfig* p_cfg)> body{ 316 [](AvdtpSepConfig* /* p_cfg */) { return return_value; }}; operatorA2DP_InitCodecConfigSbc317 bool operator()(AvdtpSepConfig* p_cfg) { return body(p_cfg); } 318 }; 319 extern struct A2DP_InitCodecConfigSbc A2DP_InitCodecConfigSbc; 320 321 // Name: A2DP_InitCodecConfigSbcSink 322 // Params: AvdtpSepConfig* p_cfg 323 // Return: bool 324 struct A2DP_InitCodecConfigSbcSink { 325 static bool return_value; 326 std::function<bool(AvdtpSepConfig* p_cfg)> body{ 327 [](AvdtpSepConfig* /* p_cfg */) { return return_value; }}; operatorA2DP_InitCodecConfigSbcSink328 bool operator()(AvdtpSepConfig* p_cfg) { return body(p_cfg); } 329 }; 330 extern struct A2DP_InitCodecConfigSbcSink A2DP_InitCodecConfigSbcSink; 331 332 // Name: A2DP_InitDefaultCodecSbc 333 // Params: uint8_t* p_codec_info 334 // Return: void 335 struct A2DP_InitDefaultCodecSbc { 336 std::function<void(uint8_t* p_codec_info)> body{[](uint8_t* /* p_codec_info */) {}}; operatorA2DP_InitDefaultCodecSbc337 void operator()(uint8_t* p_codec_info) { body(p_codec_info); } 338 }; 339 extern struct A2DP_InitDefaultCodecSbc A2DP_InitDefaultCodecSbc; 340 341 // Name: A2DP_IsSinkCodecSupportedSbc 342 // Params: const uint8_t* p_codec_info 343 // Return: bool 344 struct A2DP_IsSinkCodecSupportedSbc { 345 static tA2DP_STATUS return_value; 346 std::function<tA2DP_STATUS(const uint8_t* p_codec_info)> body{ 347 [](const uint8_t* /* p_codec_info */) { return return_value; }}; operatorA2DP_IsSinkCodecSupportedSbc348 tA2DP_STATUS operator()(const uint8_t* p_codec_info) { return body(p_codec_info); } 349 }; 350 extern struct A2DP_IsSinkCodecSupportedSbc A2DP_IsSinkCodecSupportedSbc; 351 352 // Name: A2DP_SinkCodecIndexSbc 353 // Params: const uint8_t* p_codec_info 354 // Return: btav_a2dp_codec_index_t 355 struct A2DP_SinkCodecIndexSbc { 356 static btav_a2dp_codec_index_t return_value; 357 std::function<btav_a2dp_codec_index_t(const uint8_t* p_codec_info)> body{ 358 [](const uint8_t* /* p_codec_info */) { return return_value; }}; operatorA2DP_SinkCodecIndexSbc359 btav_a2dp_codec_index_t operator()(const uint8_t* p_codec_info) { return body(p_codec_info); } 360 }; 361 extern struct A2DP_SinkCodecIndexSbc A2DP_SinkCodecIndexSbc; 362 363 // Name: A2DP_SourceCodecIndexSbc 364 // Params: const uint8_t* p_codec_info 365 // Return: btav_a2dp_codec_index_t 366 struct A2DP_SourceCodecIndexSbc { 367 static btav_a2dp_codec_index_t return_value; 368 std::function<btav_a2dp_codec_index_t(const uint8_t* p_codec_info)> body{ 369 [](const uint8_t* /* p_codec_info */) { return return_value; }}; operatorA2DP_SourceCodecIndexSbc370 btav_a2dp_codec_index_t operator()(const uint8_t* p_codec_info) { return body(p_codec_info); } 371 }; 372 extern struct A2DP_SourceCodecIndexSbc A2DP_SourceCodecIndexSbc; 373 374 } // namespace stack_a2dp_sbc 375 } // namespace mock 376 } // namespace test 377 378 // END mockcify generation 379