OSDN Git Service

am 52be792b: am 27d3b926: Fix error when using list as actionBarNavMode. [DO NOT...
[android-x86/frameworks-base.git] / media / java / android / media / IAudioService.aidl
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
17 package android.media;
18
19 import android.app.PendingIntent;
20 import android.bluetooth.BluetoothDevice;
21 import android.content.ComponentName;
22 import android.media.AudioRoutesInfo;
23 import android.media.IAudioFocusDispatcher;
24 import android.media.IAudioRoutesObserver;
25 import android.media.IRemoteControlClient;
26 import android.media.IRemoteControlDisplay;
27 import android.media.IRemoteVolumeObserver;
28 import android.media.IRingtonePlayer;
29 import android.net.Uri;
30 import android.view.KeyEvent;
31
32 /**
33  * {@hide}
34  */
35 interface IAudioService {
36     
37     int verifyX509CertChain(int chainsize, in byte[] chain, String host, String authtype);
38
39     void adjustVolume(int direction, int flags);
40
41     oneway void adjustLocalOrRemoteStreamVolume(int streamType, int direction);
42
43     void adjustSuggestedStreamVolume(int direction, int suggestedStreamType, int flags);
44
45     void adjustStreamVolume(int streamType, int direction, int flags);
46
47     void adjustMasterVolume(int direction, int flags);
48
49     void setStreamVolume(int streamType, int index, int flags);
50
51     oneway void setRemoteStreamVolume(int index);
52
53     void setMasterVolume(int index, int flags);
54     
55     void setStreamSolo(int streamType, boolean state, IBinder cb);
56         
57     void setStreamMute(int streamType, boolean state, IBinder cb);
58
59     boolean isStreamMute(int streamType);
60
61     void setMasterMute(boolean state, int flags, IBinder cb);
62
63     boolean isMasterMute();
64
65     int getStreamVolume(int streamType);
66
67     int getMasterVolume();
68
69     int getStreamMaxVolume(int streamType);
70
71     int getMasterMaxVolume();
72     
73     int getLastAudibleStreamVolume(int streamType);
74
75     int getLastAudibleMasterVolume();
76
77     void setRingerMode(int ringerMode);
78     
79     int getRingerMode();
80
81     void setVibrateSetting(int vibrateType, int vibrateSetting);
82     
83     int getVibrateSetting(int vibrateType);
84     
85     boolean shouldVibrate(int vibrateType);
86
87     void setMode(int mode, IBinder cb);
88
89     int getMode();
90
91     oneway void playSoundEffect(int effectType);
92   
93     oneway void playSoundEffectVolume(int effectType, float volume);
94
95     boolean loadSoundEffects();
96   
97     oneway void unloadSoundEffects();
98
99     oneway void reloadAudioSettings();
100
101     void setSpeakerphoneOn(boolean on);
102
103     boolean isSpeakerphoneOn();
104
105     void setBluetoothScoOn(boolean on);
106
107     boolean isBluetoothScoOn();
108
109     void setBluetoothA2dpOn(boolean on);
110
111     boolean isBluetoothA2dpOn();
112
113     oneway void setRemoteSubmixOn(boolean on, int address);
114
115     int requestAudioFocus(int mainStreamType, int durationHint, IBinder cb, IAudioFocusDispatcher l,
116             String clientId, String callingPackageName);
117
118     int abandonAudioFocus(IAudioFocusDispatcher l, String clientId);
119     
120     void unregisterAudioFocusClient(String clientId);
121
122     oneway void dispatchMediaKeyEvent(in KeyEvent keyEvent);
123     void dispatchMediaKeyEventUnderWakelock(in KeyEvent keyEvent);
124
125     oneway void registerMediaButtonIntent(in PendingIntent pi, in ComponentName c);
126     oneway void unregisterMediaButtonIntent(in PendingIntent pi,  in ComponentName c);
127
128     oneway void registerMediaButtonEventReceiverForCalls(in ComponentName c);
129     oneway void unregisterMediaButtonEventReceiverForCalls();
130
131     int registerRemoteControlClient(in PendingIntent mediaIntent,
132            in IRemoteControlClient rcClient, in String callingPackageName);
133     oneway void unregisterRemoteControlClient(in PendingIntent mediaIntent,
134            in IRemoteControlClient rcClient);
135
136     oneway void   registerRemoteControlDisplay(in IRemoteControlDisplay rcd);
137     oneway void unregisterRemoteControlDisplay(in IRemoteControlDisplay rcd);
138     oneway void remoteControlDisplayUsesBitmapSize(in IRemoteControlDisplay rcd, int w, int h);
139
140     oneway void setPlaybackInfoForRcc(int rccId, int what, int value);
141            int  getRemoteStreamMaxVolume();
142            int  getRemoteStreamVolume();
143     oneway void registerRemoteVolumeObserverForRcc(int rccId, in IRemoteVolumeObserver rvo);
144
145     void startBluetoothSco(IBinder cb);
146     void stopBluetoothSco(IBinder cb);
147
148     void forceVolumeControlStream(int streamType, IBinder cb);
149
150     void setRingtonePlayer(IRingtonePlayer player);
151     IRingtonePlayer getRingtonePlayer();
152     int getMasterStreamType();
153
154     void setWiredDeviceConnectionState(int device, int state, String name);
155     int setBluetoothA2dpDeviceConnectionState(in BluetoothDevice device, int state);
156
157     AudioRoutesInfo startWatchingRoutes(in IAudioRoutesObserver observer);
158
159     boolean isCameraSoundForced();
160 }