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