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