1 /* 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef OHOS_HDI_BLUETOOTH_A2DP_V1_0_BLUETOOTHAUDIOSESSIONSERVICE_H 17 #define OHOS_HDI_BLUETOOTH_A2DP_V1_0_BLUETOOTHAUDIOSESSIONSERVICE_H 18 19 #include "v1_0/ibluetooth_audio_session.h" 20 21 namespace OHOS { 22 namespace HDI { 23 namespace Bluetooth { 24 namespace A2dp { 25 namespace V1_0 { 26 27 using BluetoothAudioStatus = OHOS::HDI::Bluetooth::A2dp::V1_0::Status; 28 29 class BluetoothAudioSessionService : public IBluetoothAudioSession { 30 public: 31 BluetoothAudioSessionService() = default; 32 virtual ~BluetoothAudioSessionService() = default; 33 34 int32_t StartSession(SessionType sessionType, const sptr<IBluetoothAudioCallback>& callbackObj, 35 std::shared_ptr<SharedMemQueue<uint8_t>>& queue) override; 36 37 int32_t StopSession(SessionType sessionType) override; 38 39 int32_t RenderOperationResult(Operation operation, Status status) override; 40 protected: 41 SessionType session_type_ = SessionType::UNKNOWN_TYPE; 42 sptr<IBluetoothAudioCallback> stack_iface_; 43 }; 44 } // V1_0 45 } // A2dp 46 } // Bluetooth 47 } // HDI 48 } // OHOS 49 50 #endif // OHOS_HDI_BLUETOOTH_A2DP_V1_0_BLUETOOTHAUDIOSESSIONSERVICE_H