blob: fd836945d6ab699898c1a1f33a07e7b530cb58e4 [file] [log] [blame]
Grzegorz Kolodziejczykb5f2d232019-10-24 12:31:20 +02001/*
2 * Copyright 2020 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.1/IBluetoothAudioProvidersFactory.h>
20
21#include "A2dpOffloadAudioProvider.h"
22#include "A2dpSoftwareAudioProvider.h"
23#include "BluetoothAudioProvider.h"
24#include "HearingAidAudioProvider.h"
25#include "LeAudioAudioProvider.h"
26
27namespace android {
28namespace hardware {
29namespace bluetooth {
30namespace audio {
31namespace V2_1 {
32namespace implementation {
33
34class BluetoothAudioProvidersFactory : public IBluetoothAudioProvidersFactory {
35 public:
36 BluetoothAudioProvidersFactory() {}
37
38 Return<void> openProvider(const V2_0::SessionType sessionType,
39 openProvider_cb _hidl_cb) override;
40
41 Return<void> getProviderCapabilities(
42 const V2_0::SessionType sessionType,
43 getProviderCapabilities_cb _hidl_cb) override;
44
45 Return<void> openProvider_2_1(const SessionType sessionType,
46 openProvider_2_1_cb _hidl_cb) override;
47
48 Return<void> getProviderCapabilities_2_1(
49 const SessionType sessionType,
50 getProviderCapabilities_2_1_cb _hidl_cb) override;
51
52 private:
53 static A2dpSoftwareAudioProvider a2dp_software_provider_instance_;
54 static A2dpOffloadAudioProvider a2dp_offload_provider_instance_;
55 static HearingAidAudioProvider hearing_aid_provider_instance_;
56 static LeAudioOutputAudioProvider leaudio_output_provider_instance_;
57 static LeAudioInputAudioProvider leaudio_input_provider_instance_;
58};
59
60extern "C" IBluetoothAudioProvidersFactory*
61HIDL_FETCH_IBluetoothAudioProvidersFactory(const char* name);
62
63} // namespace implementation
64} // namespace V2_1
65} // namespace audio
66} // namespace bluetooth
67} // namespace hardware
68} // namespace android