blob: ebd82a70e7584d78e511105e33313adfc17f4e9b [file] [log] [blame]
François Gaffie2110e042015-03-24 08:41:51 +01001/*
2 * Copyright (C) 2015 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 <AudioGain.h>
20#include <AudioPort.h>
21#include <AudioPatch.h>
22#include <IOProfile.h>
23#include <DeviceDescriptor.h>
24#include <AudioInputDescriptor.h>
25#include <AudioOutputDescriptor.h>
26#include <AudioPolicyMix.h>
27#include <SoundTriggerSession.h>
François Gaffie2110e042015-03-24 08:41:51 +010028
29namespace android {
30
31/**
32 * This interface is an observer that the manager shall implement to allows e.g. the engine
33 * to access to policy pillars elements (like output / input descritors collections,
34 * HwModule collections, AudioMix, ...
35 */
36class AudioPolicyManagerObserver
37{
38public:
39 virtual const AudioPatchCollection &getAudioPatches() const = 0;
40
41 virtual const SoundTriggerSessionCollection &getSoundTriggerSessionCollection() const = 0;
42
43 virtual const AudioPolicyMixCollection &getAudioPolicyMixCollection() const = 0;
44
Eric Laurentc75307b2015-03-17 15:29:32 -070045 virtual const SwAudioOutputCollection &getOutputs() const = 0;
François Gaffie2110e042015-03-24 08:41:51 +010046
47 virtual const AudioInputCollection &getInputs() const = 0;
48
Eric Laurentaf377772019-03-29 14:50:21 -070049 virtual const DeviceVector getAvailableOutputDevices() const = 0;
François Gaffie2110e042015-03-24 08:41:51 +010050
Eric Laurentaf377772019-03-29 14:50:21 -070051 virtual const DeviceVector getAvailableInputDevices() const = 0;
François Gaffie2110e042015-03-24 08:41:51 +010052
François Gaffie2110e042015-03-24 08:41:51 +010053 virtual const sp<DeviceDescriptor> &getDefaultOutputDevice() const = 0;
54
55protected:
56 virtual ~AudioPolicyManagerObserver() {}
57};
58
Mikhail Naganov1b2a7942017-12-08 10:18:09 -080059} // namespace android