bt_interface_t结构参考
#include < bluetooth.h >
资料栏位 | |
size_t | 尺寸 |
int(* | 初始化)( bt_callbacks_t * callbacks) |
int(* | 启用)(bool guest_mode) |
int(* | 禁用)(无效) |
空白(* | 清理)(无效) |
int(* | get_adapter_properties )(无效) |
int(* | get_adapter_property )( bt_property_type_t类型) |
int(* | set_adapter_property )(const bt_property_t * property) |
int(* | get_remote_device_properties )(bt_bdaddr_t * remote_addr) |
int(* | get_remote_device_property )(bt_bdaddr_t * remote_addr, bt_property_type_t类型) |
int(* | set_remote_device_property )(bt_bdaddr_t * remote_addr,const bt_property_t * property) |
int(* | get_remote_service_record )(bt_bdaddr_t * remote_addr, bt_uuid_t * uuid) |
int(* | get_remote_services )(bt_bdaddr_t * remote_addr) |
int(* | start_discovery )(无效) |
int(* | cancel_discovery )(无效) |
int(* | create_bond )(const bt_bdaddr_t * bd_addr,int transport) |
int(* | create_bond_out_of_band )(const bt_bdaddr_t * bd_addr,int transport,const bt_out_of_band_data_t * oob_data) |
int(* | remove_bond )(常量bt_bdaddr_t * bd_addr) |
int(* | cancel_bond )(const bt_bdaddr_t * bd_addr) |
int(* | get_connection_state )(const bt_bdaddr_t * bd_addr) |
int(* | pin_reply )(const bt_bdaddr_t * bd_addr,uint8_t accept,uint8_t pin_len,bt_pin_code_t * pin_code) |
int(* | ssp_reply )(const bt_bdaddr_t * bd_addr, bt_ssp_variant_t变体,uint8_t接受,uint32_t密码) |
const void *(* | get_profile_interface )(const char * profile_id) |
int(* | dut_mode_configure )(uint8_t启用) |
int(* | dut_mode_send )(uint16_t操作码,uint8_t * buf,uint8_t len) |
int(* | le_test_mode )(uint16_t操作码,uint8_t * buf,uint8_t len) |
int(* | config_hci_snoop_log )(uint8_t启用) |
int(* | set_os_callouts )( bt_os_callouts_t * callouts ) |
int(* | read_energy_info )() |
空白(* | 转储)(int fd,const char ** arguments) |
int(* | config_clear )(无效) |
空白(* | interop_database_clear )(无效) |
空白(* | interop_database_add )(uint16_t功能,const bt_bdaddr_t * addr,size_t len) |
详细说明
注意:默认情况下,在启动/启用时不会初始化任何配置文件。每当应用程序调用配置文件的“ init” API时,就会发生以下情况之一:
1.)如果未启用蓝牙,则蓝牙核心应将配置文件标记为已启用。随后,当应用程序调用蓝牙“启用”时,作为启用序列的一部分,应通过调用适当的堆栈API来启用标记的配置文件。 “ adapter_properties_cb”应返回已启用的配置文件的UUID列表。
2.)如果启用了蓝牙,则蓝牙核心将调用堆栈配置文件API来初始化配置文件,并使用当前UUID列表(包括新添加的配置文件的UUID)触发“ adapter_properties_cb”。
每当调用配置文件“清除” API时,都将发生相反的情况。代表标准的蓝牙DM接口。
在文件bluetooth.h的第456行的定义。
现场文件
int(* cancel_bond)(const bt_bdaddr_t * bd_addr) |
取消保证金
在文件bluetooth.h的第521行的定义。
int(* cancel_discovery)(无效) |
取消发现
在文件bluetooth.h的第508行的定义。
void(*清理)(void) |
关闭界面。
在文件bluetooth.h的第472行的定义。
int(* config_clear)(无效) |
清除/data/misc/bt_config.conf并清除所有存储的连接
在文件bluetooth.h的第580行定义。
int(* config_hci_snoop_log)(uint8_t启用) |
在文件bluetooth.h的第557行定义。
int(* create_bond)(const bt_bdaddr_t * bd_addr,int transport) |
创建蓝牙绑定
在文件bluetooth.h的第511行定义。
int(* create_bond_out_of_band)(const bt_bdaddr_t * bd_addr,int transport,const bt_out_of_band_data_t * oob_data) |
使用带外数据创建蓝牙绑定
在文件bluetooth.h的第514行的定义。
int(*禁用)(无效) |
禁用蓝牙。
在文件bluetooth.h的第469行的定义。
void(* dump)(int fd,const char ** arguments) |
对dumpsys函数的本机支持函数是同步的| fd |由呼叫者拥有。 |参数|是可能影响输出的参数,编码为UTF-8字符串。
在文件bluetooth.h的第575行的定义。
int(* dut_mode_configure)(uint8_t启用) |
蓝牙测试模式API-必须为这些API启用蓝牙
在文件bluetooth.h的第548行定义。
int(* dut_mode_send)(uint16_t操作码,uint8_t * buf,uint8_t len) |
在文件bluetooth.h的第551行定义。
int(*使能)(bool guest_mode) |
启用蓝牙。
在文件bluetooth.h的第466行的定义。
int(* get_adapter_properties)(无效) |
在初始化中获取所有蓝牙适配器属性
在文件bluetooth.h的第475行定义。
int(* get_adapter_property)( bt_property_type_t类型) |
获取“类型”的蓝牙适配器属性
在文件bluetooth.h的第478行的定义。
int(* get_connection_state)(const bt_bdaddr_t * bd_addr) |
获取给定远程设备的连接状态。返回值0表示设备未连接,非零返回状态表示活动连接。
在文件bluetooth.h的第528行定义。
const void *(* get_profile_interface)(const char * profile_id) |
获取蓝牙配置文件界面
在文件bluetooth.h的第544行的定义。
int(* get_remote_device_properties)(bt_bdaddr_t * remote_addr) |
获取所有远程设备属性
在文件bluetooth.h的第487行的定义。
int(* get_remote_device_property)(bt_bdaddr_t * remote_addr, bt_property_type_t类型) |
获取“类型”的远程设备属性
在文件bluetooth.h的第490行定义。
int(* get_remote_service_record)(bt_bdaddr_t * remote_addr, bt_uuid_t * uuid) |
获取给定UUID的远程设备的服务记录
在文件bluetooth.h的第498行的定义。
int(* get_remote_services)(bt_bdaddr_t * remote_addr) |
启动SDP获得远程服务
在文件bluetooth.h的第502行的定义。
int(* init)( bt_callbacks_t * callbacks) |
打开接口,并提供回调例程以实现此接口。
在文件bluetooth.h的第463行的定义。
void(* interop_database_add)(uint16_t功能,const bt_bdaddr_t * addr,size_t len) |
为第一个| len |的远程设备添加新的设备互操作性解决方法。其设备地址的字节匹配| addr |。注意:|功能|必须匹配interop_feature_t(interop.h)中定义的项目。
在文件bluetooth.h的第592行的定义。
void(* interop_database_clear)(无效) |
清除(重置)设备互操作性数据库的动态部分。
在文件bluetooth.h的第585行的定义。
int(* le_test_mode)(uint16_t操作码,uint8_t * buf,uint8_t len) |
BLE测试模式API
在文件bluetooth.h的554行定义。
int(* pin_reply)(const bt_bdaddr_t * bd_addr,uint8_t accept,uint8_t pin_len,bt_pin_code_t * pin_code) |
BT旧版PinKey答复如果accept == FALSE,则pin_len和pin_code应为0x0
在文件bluetooth.h的第532行的定义。
int(* read_energy_info)() |
读取能源信息详细信息-返回值指示BT_STATUS_SUCCESS或BT_STATUS_NOT_READY成功指示VSC命令已发送到控制器
在文件bluetooth.h的第567行的定义。
int(* remove_bond)(const bt_bdaddr_t * bd_addr) |
删除债券
在文件bluetooth.h的第518行的定义。
int(* set_adapter_property)(const bt_property_t * property) |
将蓝牙适配器属性设置为“类型”
在文件bluetooth.h的第484行的定义。
int(* set_os_callouts)( bt_os_callouts_t * callouts ) |
设置bluedroid警报和唤醒锁定所需的OS调用功能。 | init |成功后,应立即调用此方法。
在文件bluetooth.h的第562行的定义。
int(* set_remote_device_property)(bt_bdaddr_t * remote_addr,const bt_property_t * property) |
将“远程设备”属性设置为“类型”
在文件bluetooth.h的第494行的定义。
size_t大小 |
设置为sizeof(bt_interface_t)
在文件bluetooth.h的第458行定义。
int(* ssp_reply)(const bt_bdaddr_t * bd_addr, bt_ssp_variant_t变体,uint8_t接受,uint32_t密码) |
BT SSP答复-BT_SSP_VARIANT_PASSKEY_COMPARISON和BT_SSP_VARIANT_CONSENT对于BT_SSP_VARIANT_PASSKEY_ENTRY,Just Works,数值比较和密码密钥应为零,如果accept == FALSE,则密码密钥应为零
在文件bluetooth.h的第540行定义。
int(* start_discovery)(无效) |
开始发现
在文件bluetooth.h的第505行的定义。
该结构的文档是从以下文件生成的:
- 硬件/ libhardware /包含/硬件/ bluetooth.h