1# HdiA2dp 2 3 4## 概述 5 6HdiA2dp为A2DP服务提供统一接口。 7 8主机可以通过该模块提供的接口创建音频通话,与音频子系统交换数据。 9 10**起始版本:** 4.0 11 12 13## 汇总 14 15 16### 文件 17 18| 名称 | 描述 | 19| -------- | -------- | 20| [BluetoothAudioTypes.idl](_bluetooth_audio_types_8idl.md) | 声明数据结构。 | 21| [IBluetoothAudioCallback.idl](_i_bluetooth_audio_callback_8idl.md) | 声明回调函数,包含音频开始、暂停和结束操作。 | 22| [IBluetoothAudioSession.idl](_i_bluetooth_audio_session_8idl.md) | 声明开启音频会话,发送渲染操作结果,和结束音频会话的接口。 | 23 24 25### 类 26 27| 名称 | 描述 | 28| -------- | -------- | 29| interface [IBluetoothAudioCallback](interface_i_bluetooth_audio_callback_v10.md) | 声明用于音频渲染开启、暂停,和结束的回调函数。 | 30| interface [IBluetoothAudioSession](interface_i_bluetooth_audio_session_v10.md) | 声明开启音频会话,发送渲染操作结果,和结束音频会话的接口。 | 31 32 33### 枚举 34 35| 名称 | 描述 | 36| -------- | -------- | 37| [Operation](#operation) { SUSPEND_RENDER = 0 , START_RENDER = 1 } | 声明操作行为。 | 38| [Status](#status) { SUCCESS = 0 , FAILURE = 1 } | 声明接口调用的操作结果。 | 39| [SessionType](#sessiontype) { UNKNOWN_TYPE , SOFTWARE_ENCODING , HARDWARE_ENCODING } | 声明音频会话的类型。 | 40 41 42## 枚举类型说明 43 44 45### Operation 46 47``` 48enum Operation 49``` 50 51**描述** 52 53声明操作行为。 54 55**起始版本:** 4.0 56 57| 枚举值 | 描述 | 58| -------- | -------- | 59| SUSPEND_RENDER | 暂停渲染。 | 60| START_RENDER | 开启渲染。 | 61 62 63### SessionType 64 65``` 66enum SessionType 67``` 68 69**描述** 70 71声明音频会话的类型。 72 73**起始版本:** 4.0 74 75| 枚举值 | 描述 | 76| -------- | -------- | 77| UNKNOWN_TYPE | 未知类型。 | 78| SOFTWARE_ENCODING | 软件编码类型。 | 79| HARDWARE_ENCODING | 硬件编码类型。 | 80 81 82### Status 83 84``` 85enum Status 86``` 87 88**描述** 89 90声明接口调用的操作结果。 91 92**起始版本:** 4.0 93 94| 枚举值 | 描述 | 95| -------- | -------- | 96| SUCCESS | 调用成功。 | 97| FAILURE | 调用失败。 | 98