blob: 56b85941782b0e52227d639d72f6e4c27a0498fe [file] [log] [blame]
Pavlin Radoslavov1ea96a32018-10-11 17:39:09 -07001/*
2 * Copyright 2018 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.hardware.bluetooth.audio@2.0;
18
19import IBluetoothAudioProvider;
20
21/**
22 * This factory allows a HAL implementation to be split into multiple
23 * independent providers.
24 *
25 * When the Bluetooth stack is ready to create an audio session, it must first
26 * obtain the IBluetoothAudioProvider for that session type by calling
27 * openProvider().
28 */
29interface IBluetoothAudioProvidersFactory {
30
31 /**
32 * Opens an audio provider for a session type. To close the provider, it is
33 * necessary to release references to the returned provider object.
34 *
35 * @param sessionType The session type (e.g.
36 * A2DP_SOFTWARE_ENCODING_DATAPATH).
37 *
38 * @return status One of the following
39 * SUCCESS if the Audio HAL successfully opens the provider with the
40 * given session type
41 * FAILURE if the Audio HAL cannot open the provider
42 * @return provider The provider of the specified session type
43 */
44 openProvider(SessionType sessionType)
45 generates (Status status, IBluetoothAudioProvider provider);
46};