af44a3b3创建于 2024年10月14日历史提交

oh_bluetooth.h

概述

定义查询蓝牙开关状态的接口。

库: libbluetooth_ndk.so

系统能力: SystemCapability.Communication.Bluetooth.Core

起始版本: 13

相关模块:Bluetooth

汇总

类型定义

名称 描述
typedef enum Bluetooth_SwitchState Bluetooth_SwitchState 定义蓝牙开关状态的枚举值。
typedef enum Bluetooth_ResultCode Bluetooth_ResultCode 定义蓝牙返回值的错误码。

枚举

名称 描述
Bluetooth_SwitchState {
BLUETOOTH_STATE_OFF = 0,
BLUETOOTH_STATE_TURNING_ON = 1,
BLUETOOTH_STATE_ON = 2,
BLUETOOTH_STATE_TURNING_OFF = 3,
BLUETOOTH_STATE_BLE_TURNING_ON = 4,
BLUETOOTH_STATE_BLE_ON = 5,
BLUETOOTH_STATE_BLE_TURNING_OFF = 6
}
定义蓝牙开关状态的枚举值。
Bluetooth_ResultCode {
BLUETOOTH_SUCCESS = 0,
BLUETOOTH_INVALID_PARAM = 401
}
定义蓝牙返回值的错误码。

函数

名称 描述
Bluetooth_ResultCode OH_Bluetooth_GetBluetoothSwitchState (Bluetooth_SwitchState *state) 获取蓝牙开关状态。