1/*
2 * Copyright (c) 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/*
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 subsystem.
24 *
25 * @since 4.0
26 */
27
28/**
29 * @file IBluetoothAudioCallback.idl
30 *
31 * @brief Defines the callback function, including the start, suspend, stop operations from audio.
32 *
33 * @since 4.0
34 * @version 1.0
35 */
36
37package ohos.hdi.bluetooth.a2dp.v1_0;
38
39/**
40 * @brief Defines the callback function to start, suspend, stop audio render.
41 *
42 * @since 4.0
43 */
44[callback] interface IBluetoothAudioCallback {
45    /**
46     * @brief Start audio render callback function.
47     *
48     * @return Returns <b>0</b> if the result is returned successfully; returns a negative value otherwise.
49     *
50     * @since 4.0
51     * @version 1.0
52     */
53    StartRender();
54
55    /**
56     * @brief Suspend audio render callback function.
57     *
58     * @return Returns <b>0</b> if the result is returned successfully; returns a negative value otherwise.
59     *
60     * @since 4.0
61     * @version 1.0
62     */
63    SuspendRender();
64
65    /**
66     * @brief Stop audio render callback function.
67     *
68     * @return Returns <b>0</b> if the result is returned successfully; returns a negative value otherwise.
69     *
70     * @since 4.0
71     * @version 1.0
72     */
73    StopRender();
74}
75