blob: 4f549d93ce15a2cc94e014aba85d2c85862982c5 [file] [log] [blame]
Alice Kuo84e87672021-10-28 12:53:38 +08001/*
2 * Copyright 2021 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#pragma once
18
19#include <android/hardware/bluetooth/audio/2.2/IBluetoothAudioProvidersFactory.h>
20
21#include "A2dpOffloadAudioProvider.h"
22#include "A2dpSoftwareAudioProvider.h"
23#include "BluetoothAudioProvider.h"
24#include "HearingAidAudioProvider.h"
25#include "LeAudioAudioProvider.h"
26#include "LeAudioOffloadAudioProvider.h"
27
28namespace android {
29namespace hardware {
30namespace bluetooth {
31namespace audio {
32namespace V2_2 {
33namespace implementation {
34
35class BluetoothAudioProvidersFactory : public IBluetoothAudioProvidersFactory {
36 public:
37 BluetoothAudioProvidersFactory() {}
38
39 Return<void> openProvider(const V2_0::SessionType sessionType,
40 openProvider_cb _hidl_cb) override;
41
42 Return<void> getProviderCapabilities(
43 const V2_0::SessionType sessionType,
44 getProviderCapabilities_cb _hidl_cb) override;
45
46 Return<void> openProvider_2_1(const V2_1::SessionType sessionType,
47 openProvider_2_1_cb _hidl_cb) override;
48
Alice Kuo95ba6a22021-11-04 19:28:10 +080049 Return<void> openProvider_2_2(const V2_1::SessionType sessionType,
50 openProvider_2_2_cb _hidl_cb) override;
51
Alice Kuo84e87672021-10-28 12:53:38 +080052 Return<void> getProviderCapabilities_2_1(
53 const V2_1::SessionType sessionType,
54 getProviderCapabilities_2_1_cb _hidl_cb) override;
55
Patty784e4432021-11-24 00:17:41 +080056 Return<void> getProviderCapabilities_2_2(
57 const V2_1::SessionType sessionType,
58 getProviderCapabilities_2_2_cb _hidl_cb) override;
59
Alice Kuo84e87672021-10-28 12:53:38 +080060 private:
61 static A2dpSoftwareAudioProvider a2dp_software_provider_instance_;
62 static A2dpOffloadAudioProvider a2dp_offload_provider_instance_;
63 static HearingAidAudioProvider hearing_aid_provider_instance_;
64 static LeAudioOutputAudioProvider leaudio_output_provider_instance_;
65 static LeAudioInputAudioProvider leaudio_input_provider_instance_;
66 static LeAudioOffloadOutputAudioProvider
67 leaudio_offload_output_provider_instance_;
68 static LeAudioOffloadInputAudioProvider
69 leaudio_offload_input_provider_instance_;
70};
71
72extern "C" IBluetoothAudioProvidersFactory*
73HIDL_FETCH_IBluetoothAudioProvidersFactory(const char* name);
74
75} // namespace implementation
76} // namespace V2_2
77} // namespace audio
78} // namespace bluetooth
79} // namespace hardware
80} // namespace android