diff options
-rw-r--r-- | system/bta/le_audio/mock_le_audio_client_audio_source.cc | 59 | ||||
-rw-r--r-- | system/bta/le_audio/mock_le_audio_client_audio_source.h | 35 |
2 files changed, 0 insertions, 94 deletions
diff --git a/system/bta/le_audio/mock_le_audio_client_audio_source.cc b/system/bta/le_audio/mock_le_audio_client_audio_source.cc deleted file mode 100644 index 3b86cb15c8..0000000000 --- a/system/bta/le_audio/mock_le_audio_client_audio_source.cc +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2020 HIMSA II K/S - www.himsa.com. - * Represented by EHIMA - www.ehima.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "mock_le_audio_client_audio_source.h" - -static MockLeAudioClientAudioSource* instance; -void MockLeAudioClientAudioSource::SetMockInstanceForTesting( - MockLeAudioClientAudioSource* mock) { - instance = mock; -} - -bool LeAudioClientAudioSource::Start( - const LeAudioCodecConfiguration& codecConfiguration, - LeAudioClientAudioSinkReceiver* audioReceiver, uint16_t remote_delay_ms) { - return instance->Start(codecConfiguration, audioReceiver, remote_delay_ms); -} - -void LeAudioClientAudioSource::Stop() { instance->Stop(); } - -// FIXME: This is wrong! we will return a different class object - not even in -// inheritance hierarchy -const void* LeAudioClientAudioSource::Acquire() { return instance->Acquire(); } - -void LeAudioClientAudioSource::Release(const void* inst) { - instance->Release(inst); -} - -void LeAudioClientAudioSource::ConfirmStreamingRequest() { - instance->ConfirmStreamingRequest(); -} - -void LeAudioClientAudioSource::CancelStreamingRequest() { - instance->CancelStreamingRequest(); -} - -void LeAudioClientAudioSource::UpdateAudioConfigToHal( - const ::le_audio::offload_config& config) { - instance->UpdateAudioConfigToHal(config); -} - -void LeAudioClientAudioSource::SuspendedForReconfiguration() { - instance->SuspendedForReconfiguration(); -} - -void LeAudioClientAudioSource::DebugDump(int fd) { instance->DebugDump(fd); } diff --git a/system/bta/le_audio/mock_le_audio_client_audio_source.h b/system/bta/le_audio/mock_le_audio_client_audio_source.h deleted file mode 100644 index 59646a5667..0000000000 --- a/system/bta/le_audio/mock_le_audio_client_audio_source.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2020 HIMSA II K/S - www.himsa.com. - * Represented by EHIMA - www.ehima.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include <gmock/gmock.h> - -#include "client_audio.h" - -class MockLeAudioClientAudioSource { - public: - static void SetMockInstanceForTesting(MockLeAudioClientAudioSource* mock); - MOCK_METHOD((bool), Start, - (const LeAudioCodecConfiguration& codecConfiguration, - LeAudioClientAudioSinkReceiver* audioReceiver, - uint16_t remote_delay_ms)); - MOCK_METHOD((void), Stop, ()); - MOCK_METHOD((const void*), Acquire, ()); - MOCK_METHOD((void), Release, (const void*)); - MOCK_METHOD((void), DebugDump, (int fd)); -}; |