• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * Copyright (C) 2023 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 #ifndef MOCK_AUDIO_MANAGER_H
18 #define MOCK_AUDIO_MANAGER_H
19 
20 #include <AudioManager.h>
21 #include <ImsMediaDefine.h>
22 #include <gmock/gmock.h>
23 
24 class MockAudioManager : public AudioManager
25 {
26 public:
MockAudioManager()27     MockAudioManager() { sManager = this; }
~MockAudioManager()28     virtual ~MockAudioManager() { sManager = nullptr; }
29     MOCK_METHOD(ImsMediaResult, deleteConfig, (int sessionId, AudioConfig* config), (override));
30     MOCK_METHOD(void, sendDtmf, (int sessionId, char dtmfDigit, int duration), (override));
31     MOCK_METHOD(void, sendRtpHeaderExtension,
32             (int sessionId, std::list<RtpHeaderExtension>* listExtension), (override));
33     MOCK_METHOD(void, setMediaQualityThreshold, (int sessionId, MediaQualityThreshold* threshold),
34             (override));
35     MOCK_METHOD(void, SendInternalEvent,
36             (uint32_t event, uint64_t sessionId, uint64_t paramA, uint64_t paramB), (override));
37 };
38 
39 #endif