/* * Copyright (c) 2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * @addtogroup HdiA2dp * @{ * * @brief Provides unified APIs for the A2DP service. * * The Host can use the interface provided by the module to create an audio session, * and exchange data with the audio. * * @since 4.1 */ /** * @file IBluetoothAudioSession.idl * * @brief Defines the interfaces to start audio session with parameters, send render operation result, * and stop the audio session. * * @since 4.1 * @version 1.1 */ package ohos.hdi.bluetooth.a2dp.v1_1; import ohos.hdi.bluetooth.a2dp.v1_1.BluetoothAudioTypes; import ohos.hdi.bluetooth.a2dp.v1_0.IBluetoothAudioCallback; import ohos.hdi.bluetooth.a2dp.v1_0.IBluetoothAudioSession; /** * @brief Defines the interfaces to start audio session with parameters, send render operation result, * and stop the audio session. * * @since 4.1 * @version 1.1 */ interface IBluetoothAudioSession extends ohos.hdi.bluetooth.a2dp.v1_0.IBluetoothAudioSession { /** * @brief Start audio session and register the callback function. * * @param params Indicates the start session parameters. For details, see {@link BluetoothAudioTypes}. * @param callbackObj Indicates the callback function. For details, see {@link IBluetoothAudioCallback}. * @param queue Returns sharedMemQueue for audio data. * @return Returns <b>0</b> if the operation is successfully; returns a negative value otherwise. * * @since 4.1 * @version 1.1 */ StartSessionWithParams([in] struct StartSessionParams params, [in] IBluetoothAudioCallback callbackObj, [out] SharedMemQueue<unsigned char> queue); }