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 <PolicyAudioPort.h> 20 #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> 27 28 namespace 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 */ 35 class AudioPolicyManagerObserver 36 { 37 public: 38 virtual const AudioPatchCollection &getAudioPatches() const = 0; 39 40 virtual const SoundTriggerSessionCollection &getSoundTriggerSessionCollection() const = 0; 41 42 virtual const AudioPolicyMixCollection &getAudioPolicyMixCollection() const = 0; 43 44 virtual const SwAudioOutputCollection &getOutputs() const = 0; 45 46 virtual const AudioInputCollection &getInputs() const = 0; 47 48 virtual const DeviceVector getAvailableOutputDevices() const = 0; 49 50 virtual const DeviceVector getAvailableInputDevices() const = 0; 51 52 virtual const sp<DeviceDescriptor> &getDefaultOutputDevice() const = 0; 53 54 protected: ~AudioPolicyManagerObserver()55 virtual ~AudioPolicyManagerObserver() {} 56 }; 57 58 } // namespace android 59