xref: /aosp_15_r20/hardware/interfaces/bluetooth/audio/2.1/default/LeAudioOffloadAudioProvider.h (revision 4d7e907c777eeecc4c5bd7cf640a754fac206ff7)
1 /*
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.1/types.h>
20 
21 #include "BluetoothAudioProvider.h"
22 
23 namespace android {
24 namespace hardware {
25 namespace bluetooth {
26 namespace audio {
27 namespace V2_1 {
28 namespace implementation {
29 
30 class LeAudioOffloadAudioProvider : public BluetoothAudioProvider {
31  public:
32   LeAudioOffloadAudioProvider();
33 
34   bool isValid(const SessionType& sessionType) override;
35   bool isValid(const V2_0::SessionType& sessionType) override;
36 
37   Return<void> startSession_2_1(const sp<V2_0::IBluetoothAudioPort>& hostIf,
38                                 const AudioConfiguration& audioConfig,
39                                 startSession_cb _hidl_cb) override;
40 
41  private:
42   Return<void> onSessionReady(startSession_cb _hidl_cb) override;
43 };
44 
45 class LeAudioOffloadOutputAudioProvider : public LeAudioOffloadAudioProvider {
46  public:
47   LeAudioOffloadOutputAudioProvider();
48 };
49 
50 class LeAudioOffloadInputAudioProvider : public LeAudioOffloadAudioProvider {
51  public:
52   LeAudioOffloadInputAudioProvider();
53 };
54 
55 }  // namespace implementation
56 }  // namespace V2_1
57 }  // namespace audio
58 }  // namespace bluetooth
59 }  // namespace hardware
60 }  // namespace android
61