• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 <IVolumeCurvesCollection.h>
20 #include <AudioGain.h>
21 #include <AudioPort.h>
22 #include <AudioPatch.h>
23 #include <IOProfile.h>
24 #include <DeviceDescriptor.h>
25 #include <AudioInputDescriptor.h>
26 #include <AudioOutputDescriptor.h>
27 #include <AudioPolicyMix.h>
28 #include <SoundTriggerSession.h>
29 
30 namespace android {
31 
32 /**
33  * This interface is an observer that the manager shall implement to allows e.g. the engine
34  * to access to policy pillars elements (like output / input descritors collections,
35  * HwModule collections, AudioMix, ...
36  */
37 class AudioPolicyManagerObserver
38 {
39 public:
40     virtual const AudioPatchCollection &getAudioPatches() const = 0;
41 
42     virtual const SoundTriggerSessionCollection &getSoundTriggerSessionCollection() const = 0;
43 
44     virtual const AudioPolicyMixCollection &getAudioPolicyMixCollection() const = 0;
45 
46     virtual const SwAudioOutputCollection &getOutputs() const = 0;
47 
48     virtual const AudioInputCollection &getInputs() const = 0;
49 
50     virtual const DeviceVector &getAvailableOutputDevices() const = 0;
51 
52     virtual const DeviceVector &getAvailableInputDevices() const = 0;
53 
54     virtual IVolumeCurvesCollection &getVolumeCurves() = 0;
55 
56     virtual const sp<DeviceDescriptor> &getDefaultOutputDevice() const = 0;
57 
58 protected:
~AudioPolicyManagerObserver()59     virtual ~AudioPolicyManagerObserver() {}
60 };
61 
62 }; // namespace android
63