François Gaffie | 2110e04 | 2015-03-24 08:41:51 +0100 | [diff] [blame] | 1 | /* |
| 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 Gaffie | 2110e04 | 2015-03-24 08:41:51 +0100 | [diff] [blame] | 28 | |
| 29 | namespace 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 | */ |
| 36 | class AudioPolicyManagerObserver |
| 37 | { |
| 38 | public: |
| 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 Laurent | c75307b | 2015-03-17 15:29:32 -0700 | [diff] [blame] | 45 | virtual const SwAudioOutputCollection &getOutputs() const = 0; |
François Gaffie | 2110e04 | 2015-03-24 08:41:51 +0100 | [diff] [blame] | 46 | |
| 47 | virtual const AudioInputCollection &getInputs() const = 0; |
| 48 | |
Eric Laurent | af37777 | 2019-03-29 14:50:21 -0700 | [diff] [blame] | 49 | virtual const DeviceVector getAvailableOutputDevices() const = 0; |
François Gaffie | 2110e04 | 2015-03-24 08:41:51 +0100 | [diff] [blame] | 50 | |
Eric Laurent | af37777 | 2019-03-29 14:50:21 -0700 | [diff] [blame] | 51 | virtual const DeviceVector getAvailableInputDevices() const = 0; |
François Gaffie | 2110e04 | 2015-03-24 08:41:51 +0100 | [diff] [blame] | 52 | |
François Gaffie | 2110e04 | 2015-03-24 08:41:51 +0100 | [diff] [blame] | 53 | virtual const sp<DeviceDescriptor> &getDefaultOutputDevice() const = 0; |
| 54 | |
| 55 | protected: |
| 56 | virtual ~AudioPolicyManagerObserver() {} |
| 57 | }; |
| 58 | |
Mikhail Naganov | 1b2a794 | 2017-12-08 10:18:09 -0800 | [diff] [blame] | 59 | } // namespace android |