harmony 鸿蒙oh_bluetooth.h

  • 2025-06-12
  • 浏览 (2)

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) 获取蓝牙开关状态。

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Connectivity Kit(短距通信服务)

harmony 鸿蒙Bluetooth

harmony 鸿蒙Wifi

harmony 鸿蒙蓝牙服务子系统错误码

harmony 鸿蒙NFC错误码

harmony 鸿蒙SE(secureElement)错误码

harmony 鸿蒙WIFI错误码

harmony 鸿蒙@ohos.bluetooth.a2dp (蓝牙a2dp模块)(系统接口)

harmony 鸿蒙@ohos.bluetooth.a2dp (蓝牙a2dp模块)

harmony 鸿蒙@ohos.bluetooth.access (蓝牙access模块)(系统接口)

0  赞