In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC from src/webrtc to src/ (in order to preserve an healthy git history). This CL takes care of fixing header guards, #include paths, etc... NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true TBR=tommi@webrtc.org Bug: chromium:611808 Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578 Reviewed-on: https://webrtc-review.googlesource.com/1561 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Henrik Kjellander <kjellander@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#19846}
117 lines
5.7 KiB
C++
117 lines
5.7 KiB
C++
/*
|
|
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#ifndef MODULES_AUDIO_DEVICE_INCLUDE_MOCK_AUDIO_DEVICE_H_
|
|
#define MODULES_AUDIO_DEVICE_INCLUDE_MOCK_AUDIO_DEVICE_H_
|
|
|
|
#include <string>
|
|
|
|
#include "modules/audio_device/include/audio_device.h"
|
|
#include "test/gmock.h"
|
|
|
|
namespace webrtc {
|
|
namespace test {
|
|
|
|
class MockAudioDeviceModule : public AudioDeviceModule {
|
|
public:
|
|
// Module.
|
|
MOCK_METHOD0(TimeUntilNextProcess, int64_t());
|
|
MOCK_METHOD0(Process, void());
|
|
MOCK_METHOD1(ProcessThreadAttached, void(ProcessThread*));
|
|
// RefCountedModule.
|
|
MOCK_CONST_METHOD0(AddRef, int32_t());
|
|
MOCK_CONST_METHOD0(Release, int32_t());
|
|
// AudioDeviceModule.
|
|
MOCK_CONST_METHOD1(ActiveAudioLayer, int32_t(AudioLayer* audioLayer));
|
|
MOCK_CONST_METHOD0(LastError, ErrorCode());
|
|
MOCK_METHOD1(RegisterEventObserver,
|
|
int32_t(AudioDeviceObserver* eventCallback));
|
|
MOCK_METHOD1(RegisterAudioCallback, int32_t(AudioTransport* audioCallback));
|
|
MOCK_METHOD0(Init, int32_t());
|
|
MOCK_METHOD0(Terminate, int32_t());
|
|
MOCK_CONST_METHOD0(Initialized, bool());
|
|
MOCK_METHOD0(PlayoutDevices, int16_t());
|
|
MOCK_METHOD0(RecordingDevices, int16_t());
|
|
MOCK_METHOD3(PlayoutDeviceName, int32_t(uint16_t index,
|
|
char name[kAdmMaxDeviceNameSize],
|
|
char guid[kAdmMaxGuidSize]));
|
|
MOCK_METHOD3(RecordingDeviceName, int32_t(uint16_t index,
|
|
char name[kAdmMaxDeviceNameSize],
|
|
char guid[kAdmMaxGuidSize]));
|
|
MOCK_METHOD1(SetPlayoutDevice, int32_t(uint16_t index));
|
|
MOCK_METHOD1(SetPlayoutDevice, int32_t(WindowsDeviceType device));
|
|
MOCK_METHOD1(SetRecordingDevice, int32_t(uint16_t index));
|
|
MOCK_METHOD1(SetRecordingDevice, int32_t(WindowsDeviceType device));
|
|
MOCK_METHOD1(PlayoutIsAvailable, int32_t(bool* available));
|
|
MOCK_METHOD0(InitPlayout, int32_t());
|
|
MOCK_CONST_METHOD0(PlayoutIsInitialized, bool());
|
|
MOCK_METHOD1(RecordingIsAvailable, int32_t(bool* available));
|
|
MOCK_METHOD0(InitRecording, int32_t());
|
|
MOCK_CONST_METHOD0(RecordingIsInitialized, bool());
|
|
MOCK_METHOD0(StartPlayout, int32_t());
|
|
MOCK_METHOD0(StopPlayout, int32_t());
|
|
MOCK_CONST_METHOD0(Playing, bool());
|
|
MOCK_METHOD0(StartRecording, int32_t());
|
|
MOCK_METHOD0(StopRecording, int32_t());
|
|
MOCK_CONST_METHOD0(Recording, bool());
|
|
MOCK_METHOD1(SetAGC, int32_t(bool enable));
|
|
MOCK_CONST_METHOD0(AGC, bool());
|
|
MOCK_METHOD0(InitSpeaker, int32_t());
|
|
MOCK_CONST_METHOD0(SpeakerIsInitialized, bool());
|
|
MOCK_METHOD0(InitMicrophone, int32_t());
|
|
MOCK_CONST_METHOD0(MicrophoneIsInitialized, bool());
|
|
MOCK_METHOD1(SpeakerVolumeIsAvailable, int32_t(bool* available));
|
|
MOCK_METHOD1(SetSpeakerVolume, int32_t(uint32_t volume));
|
|
MOCK_CONST_METHOD1(SpeakerVolume, int32_t(uint32_t* volume));
|
|
MOCK_CONST_METHOD1(MaxSpeakerVolume, int32_t(uint32_t* maxVolume));
|
|
MOCK_CONST_METHOD1(MinSpeakerVolume, int32_t(uint32_t* minVolume));
|
|
MOCK_METHOD1(MicrophoneVolumeIsAvailable, int32_t(bool* available));
|
|
MOCK_METHOD1(SetMicrophoneVolume, int32_t(uint32_t volume));
|
|
MOCK_CONST_METHOD1(MicrophoneVolume, int32_t(uint32_t* volume));
|
|
MOCK_CONST_METHOD1(MaxMicrophoneVolume, int32_t(uint32_t* maxVolume));
|
|
MOCK_CONST_METHOD1(MinMicrophoneVolume, int32_t(uint32_t* minVolume));
|
|
MOCK_METHOD1(SpeakerMuteIsAvailable, int32_t(bool* available));
|
|
MOCK_METHOD1(SetSpeakerMute, int32_t(bool enable));
|
|
MOCK_CONST_METHOD1(SpeakerMute, int32_t(bool* enabled));
|
|
MOCK_METHOD1(MicrophoneMuteIsAvailable, int32_t(bool* available));
|
|
MOCK_METHOD1(SetMicrophoneMute, int32_t(bool enable));
|
|
MOCK_CONST_METHOD1(MicrophoneMute, int32_t(bool* enabled));
|
|
MOCK_CONST_METHOD1(StereoPlayoutIsAvailable, int32_t(bool* available));
|
|
MOCK_METHOD1(SetStereoPlayout, int32_t(bool enable));
|
|
MOCK_CONST_METHOD1(StereoPlayout, int32_t(bool* enabled));
|
|
MOCK_CONST_METHOD1(StereoRecordingIsAvailable, int32_t(bool* available));
|
|
MOCK_METHOD1(SetStereoRecording, int32_t(bool enable));
|
|
MOCK_CONST_METHOD1(StereoRecording, int32_t(bool* enabled));
|
|
MOCK_METHOD1(SetRecordingChannel, int32_t(const ChannelType channel));
|
|
MOCK_CONST_METHOD1(RecordingChannel, int32_t(ChannelType* channel));
|
|
MOCK_CONST_METHOD1(PlayoutDelay, int32_t(uint16_t* delayMS));
|
|
MOCK_CONST_METHOD1(RecordingDelay, int32_t(uint16_t* delayMS));
|
|
MOCK_METHOD1(SetRecordingSampleRate, int32_t(const uint32_t samplesPerSec));
|
|
MOCK_CONST_METHOD1(RecordingSampleRate, int32_t(uint32_t* samplesPerSec));
|
|
MOCK_METHOD1(SetPlayoutSampleRate, int32_t(const uint32_t samplesPerSec));
|
|
MOCK_CONST_METHOD1(PlayoutSampleRate, int32_t(uint32_t* samplesPerSec));
|
|
MOCK_METHOD1(SetLoudspeakerStatus, int32_t(bool enable));
|
|
MOCK_CONST_METHOD1(GetLoudspeakerStatus, int32_t(bool* enabled));
|
|
MOCK_CONST_METHOD0(BuiltInAECIsAvailable, bool());
|
|
MOCK_CONST_METHOD0(BuiltInAGCIsAvailable, bool());
|
|
MOCK_CONST_METHOD0(BuiltInNSIsAvailable, bool());
|
|
MOCK_METHOD1(EnableBuiltInAEC, int32_t(bool enable));
|
|
MOCK_METHOD1(EnableBuiltInAGC, int32_t(bool enable));
|
|
MOCK_METHOD1(EnableBuiltInNS, int32_t(bool enable));
|
|
#if defined(WEBRTC_IOS)
|
|
MOCK_CONST_METHOD1(GetPlayoutAudioParameters, int(AudioParameters* params));
|
|
MOCK_CONST_METHOD1(GetRecordAudioParameters, int(AudioParameters* params));
|
|
#endif // WEBRTC_IOS
|
|
};
|
|
} // namespace test
|
|
} // namespace webrtc
|
|
|
|
#endif // MODULES_AUDIO_DEVICE_INCLUDE_MOCK_AUDIO_DEVICE_H_
|