IAudioService.aidl revision 4426e42ac6107bf6b09f7c4cdad39eb161d8b9ca
1/*
2 * Copyright (C) 2007 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
17package android.media;
18
19import android.content.ComponentName;
20import android.media.IAudioFocusDispatcher;
21import android.media.IRemoteControlClient;
22import android.media.IRemoteControlDisplay;
23
24/**
25 * {@hide}
26 */
27interface IAudioService {
28
29    void adjustVolume(int direction, int flags);
30
31    void adjustSuggestedStreamVolume(int direction, int suggestedStreamType, int flags);
32
33    void adjustStreamVolume(int streamType, int direction, int flags);
34
35    void setStreamVolume(int streamType, int index, int flags);
36
37    void setStreamSolo(int streamType, boolean state, IBinder cb);
38
39    void setStreamMute(int streamType, boolean state, IBinder cb);
40
41    boolean isStreamMute(int streamType);
42
43    int getStreamVolume(int streamType);
44
45    int getStreamMaxVolume(int streamType);
46
47    int getLastAudibleStreamVolume(int streamType);
48
49    void setRingerMode(int ringerMode);
50
51    int getRingerMode();
52
53    void setVibrateSetting(int vibrateType, int vibrateSetting);
54
55    int getVibrateSetting(int vibrateType);
56
57    boolean shouldVibrate(int vibrateType);
58
59    void setMode(int mode, IBinder cb);
60
61    int getMode();
62
63    oneway void playSoundEffect(int effectType);
64
65    oneway void playSoundEffectVolume(int effectType, float volume);
66
67    boolean loadSoundEffects();
68
69    oneway void unloadSoundEffects();
70
71    oneway void reloadAudioSettings();
72
73    void setSpeakerphoneOn(boolean on);
74
75    boolean isSpeakerphoneOn();
76
77    void setBluetoothScoOn(boolean on);
78
79    boolean isBluetoothScoOn();
80
81    int requestAudioFocus(int mainStreamType, int durationHint, IBinder cb, IAudioFocusDispatcher l,
82            String clientId, String callingPackageName);
83
84    int abandonAudioFocus(IAudioFocusDispatcher l, String clientId);
85
86    void unregisterAudioFocusClient(String clientId);
87
88    void registerMediaButtonEventReceiver(in ComponentName eventReceiver);
89
90    void unregisterMediaButtonEventReceiver(in ComponentName eventReceiver);
91
92    oneway void registerRemoteControlClient(in ComponentName eventReceiver,
93           in IRemoteControlClient rcClient, in String clientName, in String callingPackageName);
94    oneway void unregisterRemoteControlClient(in ComponentName eventReceiver,
95           in IRemoteControlClient rcClient);
96
97    oneway void   registerRemoteControlDisplay(in IRemoteControlDisplay rcd);
98    oneway void unregisterRemoteControlDisplay(in IRemoteControlDisplay rcd);
99    oneway void remoteControlDisplayUsesBitmapSize(in IRemoteControlDisplay rcd, int w, int h);
100
101    void startBluetoothSco(IBinder cb);
102
103    void stopBluetoothSco(IBinder cb);
104}
105