blob: 0b515365bbd63558aca34cabbcb58113bc155523 [file] [log] [blame]
Cheney Ni47a83092018-11-17 01:42:19 +08001/*
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
17#pragma once
18
19#include <android/hardware/bluetooth/audio/2.0/IBluetoothAudioProvidersFactory.h>
20
21#include "A2dpOffloadAudioProvider.h"
22#include "A2dpSoftwareAudioProvider.h"
23#include "BluetoothAudioProvider.h"
24#include "HearingAidAudioProvider.h"
25
26namespace android {
27namespace hardware {
28namespace bluetooth {
29namespace audio {
30namespace V2_0 {
31namespace implementation {
32
33class BluetoothAudioProvidersFactory : public IBluetoothAudioProvidersFactory {
34 public:
35 BluetoothAudioProvidersFactory() {}
36
37 Return<void> openProvider(const SessionType sessionType,
38 openProvider_cb _hidl_cb) override;
39
40 Return<void> getProviderCapabilities(
41 const SessionType sessionType,
42 getProviderCapabilities_cb _hidl_cb) override;
43
44 private:
45 static A2dpSoftwareAudioProvider a2dp_software_provider_instance_;
46 static A2dpOffloadAudioProvider a2dp_offload_provider_instance_;
47 static HearingAidAudioProvider hearing_aid_provider_instance_;
48};
49
50extern "C" IBluetoothAudioProvidersFactory*
51HIDL_FETCH_IBluetoothAudioProvidersFactory(const char* name);
52
53} // namespace implementation
54} // namespace V2_0
55} // namespace audio
56} // namespace bluetooth
57} // namespace hardware
58} // namespace android