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 17 #pragma once 18 19 #include <gmock/gmock.h> 20 21 #include "codec_manager.h" 22 23 class MockCodecManager { 24 public: 25 static MockCodecManager* GetInstance(); 26 27 MockCodecManager() = default; 28 MockCodecManager(const MockCodecManager&) = delete; 29 MockCodecManager& operator=(const MockCodecManager&) = delete; 30 31 virtual ~MockCodecManager() = default; 32 33 MOCK_METHOD((le_audio::types::CodecLocation), GetCodecLocation, (), (const)); 34 MOCK_METHOD((void), UpdateActiveSourceAudioConfig, 35 (const le_audio::stream_configuration& stream_conf, 36 uint16_t delay, 37 std::function<void(const ::le_audio::offload_config& config)> 38 update_receiver)); 39 MOCK_METHOD((void), UpdateActiveSinkAudioConfig, 40 (const le_audio::stream_configuration& stream_conf, 41 uint16_t delay, 42 std::function<void(const ::le_audio::offload_config& config)> 43 update_receiver)); 44 MOCK_METHOD((le_audio::set_configurations::AudioSetConfigurations*), 45 GetOffloadCodecConfig, 46 (le_audio::types::LeAudioContextType ctx_type), (const)); 47 MOCK_METHOD((le_audio::broadcast_offload_config*), GetBroadcastOffloadConfig, 48 (), (const)); 49 MOCK_METHOD( 50 (void), UpdateBroadcastConnHandle, 51 (const std::vector<uint16_t>& conn_handle, 52 std::function<void(const ::le_audio::broadcast_offload_config& config)> 53 update_receiver)); 54 MOCK_METHOD((int), GetAidlVersionInUsed, (), (const)); 55 56 MOCK_METHOD((void), Start, ()); 57 MOCK_METHOD((void), Stop, ()); 58 }; 59