IAudioService.aidl revision b5f04d6dbf5106140df367ae07f0e7708e1b650e
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.net.Uri;
23import android.os.Bundle;
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 setStreamVolume(int streamType, int index, int flags);
37
38    void setStreamSolo(int streamType, boolean state, IBinder cb);
39
40    void setStreamMute(int streamType, boolean state, IBinder cb);
41
42    boolean isStreamMute(int streamType);
43
44    int getStreamVolume(int streamType);
45
46    int getStreamMaxVolume(int streamType);
47
48    int getLastAudibleStreamVolume(int streamType);
49
50    void setRingerMode(int ringerMode);
51
52    int getRingerMode();
53
54    void setVibrateSetting(int vibrateType, int vibrateSetting);
55
56    int getVibrateSetting(int vibrateType);
57
58    boolean shouldVibrate(int vibrateType);
59
60    void setMode(int mode, IBinder cb);
61
62    int getMode();
63
64    oneway void playSoundEffect(int effectType);
65
66    oneway void playSoundEffectVolume(int effectType, float volume);
67
68    boolean loadSoundEffects();
69
70    oneway void unloadSoundEffects();
71
72    oneway void reloadAudioSettings();
73
74    void setSpeakerphoneOn(boolean on);
75
76    boolean isSpeakerphoneOn();
77
78    void setBluetoothScoOn(boolean on);
79
80    boolean isBluetoothScoOn();
81
82    int requestAudioFocus(int mainStreamType, int durationHint, IBinder cb, IAudioFocusDispatcher l,
83            String clientId, String callingPackageName);
84
85    int abandonAudioFocus(IAudioFocusDispatcher l, String clientId);
86
87    void unregisterAudioFocusClient(String clientId);
88
89    void registerMediaButtonEventReceiver(in ComponentName eventReceiver);
90
91    void unregisterMediaButtonEventReceiver(in ComponentName eventReceiver);
92
93    void registerRemoteControlClient(in ComponentName eventReceiver,
94           in IRemoteControlClient rcClient, in String callingPackageName);
95
96    IRemoteControlClient getRemoteControlClient(in int rcClientId);
97
98    void notifyRemoteControlInformationChanged(in ComponentName eventReceiver, int infoFlag);
99
100    void startBluetoothSco(IBinder cb);
101
102    void stopBluetoothSco(IBinder cb);
103}
104