1/* 2 * Copyright (c) 2024 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/* 17 * @addtogroup HdiA2dp 18 * @{ 19 * 20 * @brief Provides unified APIs for the A2DP service. 21 * 22 * The Host can use the interface provided by the module to create an audio session, 23 * and exchange data with the audio. 24 * 25 * @since 4.1 26 */ 27 28/** 29 * @file IBluetoothAudioSession.idl 30 * 31 * @brief Defines the interfaces to start audio session with parameters, send render operation result, 32 * and stop the audio session. 33 * 34 * @since 4.1 35 * @version 1.1 36 */ 37 38package ohos.hdi.bluetooth.a2dp.v1_1; 39 40import ohos.hdi.bluetooth.a2dp.v1_1.BluetoothAudioTypes; 41import ohos.hdi.bluetooth.a2dp.v1_0.IBluetoothAudioCallback; 42import ohos.hdi.bluetooth.a2dp.v1_0.IBluetoothAudioSession; 43 44/** 45 * @brief Defines the interfaces to start audio session with parameters, send render operation result, 46 * and stop the audio session. 47 * 48 * @since 4.1 49 * @version 1.1 50 */ 51interface IBluetoothAudioSession extends ohos.hdi.bluetooth.a2dp.v1_0.IBluetoothAudioSession { 52 /** 53 * @brief Start audio session and register the callback function. 54 * 55 * @param params Indicates the start session parameters. For details, see {@link BluetoothAudioTypes}. 56 * @param callbackObj Indicates the callback function. For details, see {@link IBluetoothAudioCallback}. 57 * @param queue Returns sharedMemQueue for audio data. 58 * @return Returns <b>0</b> if the operation is successfully; returns a negative value otherwise. 59 * 60 * @since 4.1 61 * @version 1.1 62 */ 63 StartSessionWithParams([in] struct StartSessionParams params, [in] IBluetoothAudioCallback callbackObj, 64 [out] SharedMemQueue<unsigned char> queue); 65}