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