1/*
2 * Copyright (C) 2016 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
18package android.brillo.brilloaudioservice;
19
20/*
21 * Interface for the callback object registered with IBrilloAudioService. Used
22 * to notify clients about changes to the audio system.
23 */
24interface IAudioServiceCallback {
25  // Oneway call triggered when audio devices are connected to the system.
26  oneway void OnAudioDevicesConnected(in int[] added_devices);
27
28  // Oneway call triggered when audio devices are disconnected from the system.
29  oneway void OnAudioDevicesDisconnected(in int[] removed_devices);
30
31  // Oneway call triggered when the volume is changed. If there are
32  // multiple active streams, this call will be called multiple times.
33  oneway void OnVolumeChanged(
34      int stream_type, int old_volume_index, int new_volume_index);
35}
36