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> 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 45 virtual const SwAudioOutputCollection &getOutputs() const = 0; 46 47 virtual const AudioInputCollection &getInputs() const = 0; 48 49 virtual const DeviceVector getAvailableOutputDevices() const = 0; 50 51 virtual const DeviceVector getAvailableInputDevices() const = 0; 52 53 virtual const sp<DeviceDescriptor> &getDefaultOutputDevice() const = 0; 54 55 protected: ~AudioPolicyManagerObserver()56 virtual ~AudioPolicyManagerObserver() {} 57 }; 58 59 } // namespace android 60