blob: 349f969815ebfdfba415e014c21f4e14e4a315e1 [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
jiabine1284852019-09-11 10:15:46 -070019#include <PolicyAudioPort.h>
François Gaffie2110e042015-03-24 08:41:51 +010020#include <AudioPatch.h>
21#include <IOProfile.h>
22#include <DeviceDescriptor.h>
23#include <AudioInputDescriptor.h>
24#include <AudioOutputDescriptor.h>
25#include <AudioPolicyMix.h>
26#include <SoundTriggerSession.h>
François Gaffie2110e042015-03-24 08:41:51 +010027
28namespace android {
29
30/**
31 * This interface is an observer that the manager shall implement to allows e.g. the engine
32 * to access to policy pillars elements (like output / input descritors collections,
33 * HwModule collections, AudioMix, ...
34 */
35class AudioPolicyManagerObserver
36{
37public:
38 virtual const AudioPatchCollection &getAudioPatches() const = 0;
39
40 virtual const SoundTriggerSessionCollection &getSoundTriggerSessionCollection() const = 0;
41
42 virtual const AudioPolicyMixCollection &getAudioPolicyMixCollection() const = 0;
43
Eric Laurentc75307b2015-03-17 15:29:32 -070044 virtual const SwAudioOutputCollection &getOutputs() const = 0;
François Gaffie2110e042015-03-24 08:41:51 +010045
46 virtual const AudioInputCollection &getInputs() const = 0;
47
Eric Laurentaf377772019-03-29 14:50:21 -070048 virtual const DeviceVector getAvailableOutputDevices() const = 0;
François Gaffie2110e042015-03-24 08:41:51 +010049
Eric Laurentaf377772019-03-29 14:50:21 -070050 virtual const DeviceVector getAvailableInputDevices() const = 0;
François Gaffie2110e042015-03-24 08:41:51 +010051
François Gaffie2110e042015-03-24 08:41:51 +010052 virtual const sp<DeviceDescriptor> &getDefaultOutputDevice() const = 0;
53
54protected:
55 virtual ~AudioPolicyManagerObserver() {}
56};
57
Mikhail Naganov1b2a7942017-12-08 10:18:09 -080058} // namespace android