IAudioService.aidl revision d327f21626217aa3c9c0cdb7a84a742c531e59a3
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; 21 22/** 23 * {@hide} 24 */ 25interface IAudioService { 26 27 void adjustVolume(int direction, int flags); 28 29 void adjustSuggestedStreamVolume(int direction, int suggestedStreamType, int flags); 30 31 void adjustStreamVolume(int streamType, int direction, int flags); 32 33 void setStreamVolume(int streamType, int index, int flags); 34 35 void setStreamSolo(int streamType, boolean state, IBinder cb); 36 37 void setStreamMute(int streamType, boolean state, IBinder cb); 38 39 int getStreamVolume(int streamType); 40 41 int getStreamMaxVolume(int streamType); 42 43 void setRingerMode(int ringerMode); 44 45 int getRingerMode(); 46 47 void setVibrateSetting(int vibrateType, int vibrateSetting); 48 49 int getVibrateSetting(int vibrateType); 50 51 boolean shouldVibrate(int vibrateType); 52 53 void setMode(int mode, IBinder cb); 54 55 int getMode(); 56 57 oneway void playSoundEffect(int effectType); 58 59 oneway void playSoundEffectVolume(int effectType, float volume); 60 61 boolean loadSoundEffects(); 62 63 oneway void unloadSoundEffects(); 64 65 oneway void reloadAudioSettings(); 66 67 void setSpeakerphoneOn(boolean on); 68 69 boolean isSpeakerphoneOn(); 70 71 void setBluetoothScoOn(boolean on); 72 73 boolean isBluetoothScoOn(); 74 75 int requestAudioFocus(int mainStreamType, int durationHint, IBinder cb, IAudioFocusDispatcher l, 76 String clientId); 77 78 int abandonAudioFocus(IAudioFocusDispatcher l, String clientId); 79 80 void unregisterAudioFocusClient(String clientId); 81 82 void registerMediaButtonEventReceiver(in ComponentName eventReceiver); 83 84 void unregisterMediaButtonEventReceiver(in ComponentName eventReceiver); 85} 86