1b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan/* 2b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan * Copyright (C) 2016 The Android Open Source Project 3b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan * 4b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan * Licensed under the Apache License, Version 2.0 (the "License"); 5b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan * you may not use this file except in compliance with the License. 6b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan * You may obtain a copy of the License at 7b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan * 8b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan * http://www.apache.org/licenses/LICENSE-2.0 9b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan * 10b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan * Unless required by applicable law or agreed to in writing, software 11b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan * distributed under the License is distributed on an "AS IS" BASIS, 12b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan * See the License for the specific language governing permissions and 14b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan * limitations under the License. 15b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan */ 16b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan 17b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan 18b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathanpackage android.brillo.brilloaudioservice; 19b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan 20b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan/* 21b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan * Interface for the callback object registered with IBrilloAudioService. Used 22b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan * to notify clients about changes to the audio system. 23b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan */ 24b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathaninterface IAudioServiceCallback { 25b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan // Oneway call triggered when audio devices are connected to the system. 26b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan oneway void OnAudioDevicesConnected(in int[] added_devices); 27b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan 28b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan // Oneway call triggered when audio devices are disconnected from the system. 29b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan oneway void OnAudioDevicesDisconnected(in int[] removed_devices); 30c777981a7673bb43b594a39ab9beba7ec5827be4Ralph Nathan 31c777981a7673bb43b594a39ab9beba7ec5827be4Ralph Nathan // Oneway call triggered when the volume is changed. If there are 32c777981a7673bb43b594a39ab9beba7ec5827be4Ralph Nathan // multiple active streams, this call will be called multiple times. 33c777981a7673bb43b594a39ab9beba7ec5827be4Ralph Nathan oneway void OnVolumeChanged( 34c777981a7673bb43b594a39ab9beba7ec5827be4Ralph Nathan int stream_type, int old_volume_index, int new_volume_index); 35b3d2a54300808bfe93b5dadfcc2b75b6347e5adaRalph Nathan} 36