IAudioService.aidl revision 5020e7e2d37865da862846b97d9959e83244a35e
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 setStreamSolo(int streamType, boolean state, IBinder cb);
41
42    void setStreamMute(int streamType, boolean state, IBinder cb);
43
44    boolean isStreamMute(int streamType);
45
46    int getStreamVolume(int streamType);
47
48    float getMasterVolume();
49
50    int getStreamMaxVolume(int streamType);
51
52    int getLastAudibleStreamVolume(int streamType);
53
54    void setRingerMode(int ringerMode);
55
56    int getRingerMode();
57
58    void setVibrateSetting(int vibrateType, int vibrateSetting);
59
60    int getVibrateSetting(int vibrateType);
61
62    boolean shouldVibrate(int vibrateType);
63
64    void setMode(int mode, IBinder cb);
65
66    int getMode();
67
68    oneway void playSoundEffect(int effectType);
69
70    oneway void playSoundEffectVolume(int effectType, float volume);
71
72    boolean loadSoundEffects();
73
74    oneway void unloadSoundEffects();
75
76    oneway void reloadAudioSettings();
77
78    void setSpeakerphoneOn(boolean on);
79
80    boolean isSpeakerphoneOn();
81
82    void setBluetoothScoOn(boolean on);
83
84    boolean isBluetoothScoOn();
85
86    int requestAudioFocus(int mainStreamType, int durationHint, IBinder cb, IAudioFocusDispatcher l,
87            String clientId, String callingPackageName);
88
89    int abandonAudioFocus(IAudioFocusDispatcher l, String clientId);
90
91    void unregisterAudioFocusClient(String clientId);
92
93    oneway void registerMediaButtonIntent(in PendingIntent pi, in ComponentName c);
94    oneway void unregisterMediaButtonIntent(in PendingIntent pi,  in ComponentName c);
95
96    oneway void registerRemoteControlClient(in PendingIntent mediaIntent,
97           in IRemoteControlClient rcClient, in String callingPackageName);
98    oneway void unregisterRemoteControlClient(in PendingIntent mediaIntent,
99           in IRemoteControlClient rcClient);
100
101    oneway void   registerRemoteControlDisplay(in IRemoteControlDisplay rcd);
102    oneway void unregisterRemoteControlDisplay(in IRemoteControlDisplay rcd);
103    oneway void remoteControlDisplayUsesBitmapSize(in IRemoteControlDisplay rcd, int w, int h);
104
105    void startBluetoothSco(IBinder cb);
106
107    void stopBluetoothSco(IBinder cb);
108}
109