tpBluetoothLocal类
ExternUtils
2025-07-05
介绍
可以对本地蓝牙设备进行管理
基础信息
头文件: | include <tpBluetoothLocal.h> |
---|---|
Cmake: | None |
发布版本: | V0.1.0 |
继承类: | |
派生类: |
Public 类型
enum tpLocalPair {
TP_LOCAL_PAIRED, TP_LOCAL_UNPAIRED, TP_LOCAL_AUTHORIZED_PAIRED
}
Public 成员函数
tpBluetoothLocal(int id, const char *address, const char *name) | ||
---|---|---|
tpBluetoothLocal(const char *name) | ||
tpBluetoothLocal(tpBluetoothLocal &other) | ||
tpBluetoothLocal(tpBluetoothLocal &&other) | ||
~tpBluetoothLocal() | ||
tpString | getName() | 获取蓝牙名字 |
setName(const tpString &name) | ||
tpBluetoothAddress | getAddress() | 获取蓝牙地址 |
tpList< tpBluetoothAddress > | getPairedDevices() | 获取以配对的设备列表 |
tpList< tpBluetoothAddress > | getConnectedDevices() | 获取已连接的设备列表 |
setTrusted(tpBluetoothAddress &address, tpBool trusted) | 设置远程蓝牙设备的信任状态 | |
requestPairing(tpBluetoothAddress &address, tpBluetoothLocal::tpLocalPair pair) | 设置蓝牙配对请求 | |
getPairStatus(tpBluetoothAddress &address) | 获取配对状态 | |
removeDevice(tpBluetoothAddress &address) | ||
setDiscoverable(tpBool discoverable) | 设置蓝牙可见性 | |
setDiscoverableTimeout(tpUInt32 timeout) | 设置蓝牙可见的超时时间 | |
isPowerOn() | 本机蓝牙是否打开 | |
powerOn() | 打开蓝牙 | |
powerOff() | 关闭蓝牙 | |
getHostMode() | ||
setHostMode() | ||
static tpList< tpBluetoothLocal > tpBluetoothLocal::getAllDevice | getAllDevice() | 获取所有适配器列表 |
成员枚举类型说明
enum tpBluetoothLocal::tpLocalPair
名称 | 值 | 描述 |
---|---|---|
TP_LOCAL_PAIRED | 0 | |
TP_LOCAL_UNPAIRED | 1 | |
TP_LOCAL_AUTHORIZED_PAIRED | 2 |
成员函数说明
tpBluetoothLocal::tpBluetoothLocal(int id, const char *address, const char *name)
暂无注释...
tpBluetoothLocal::tpBluetoothLocal(const char *name)
暂无注释...
tpBluetoothLocal::tpBluetoothLocal(tpBluetoothLocal &other)
暂无注释...
tpBluetoothLocal::tpBluetoothLocal(tpBluetoothLocal &&other)
暂无注释...
tpBluetoothLocal::~tpBluetoothLocal()
暂无注释...
tpString tpBluetoothLocal::getName()
点击查看...
获取蓝牙名字
int tpBluetoothLocal::setName(const tpString &name)
暂无注释...
tpBluetoothAddress tpBluetoothLocal::getAddress()
点击查看...
获取蓝牙地址
tpList< tpBluetoothAddress > tpBluetoothLocal::getPairedDevices()
点击查看...
获取以配对的设备列表
tpList< tpBluetoothAddress > tpBluetoothLocal::getConnectedDevices()
点击查看...
获取已连接的设备列表
int tpBluetoothLocal::setTrusted(tpBluetoothAddress &address, tpBool trusted)
点击查看...
设置远程蓝牙设备的信任状态
int tpBluetoothLocal::requestPairing(tpBluetoothAddress &address, tpBluetoothLocal::tpLocalPair pair)
点击查看...
设置蓝牙配对请求
tpBluetoothLocal::tpLocalPair tpBluetoothLocal::getPairStatus(tpBluetoothAddress &address)
点击查看...
获取配对状态
int tpBluetoothLocal::removeDevice(tpBluetoothAddress &address)
暂无注释...
int tpBluetoothLocal::setDiscoverable(tpBool discoverable)
点击查看...
设置蓝牙可见性
int tpBluetoothLocal::setDiscoverableTimeout(tpUInt32 timeout)
点击查看...
设置蓝牙可见的超时时间
tpBool tpBluetoothLocal::isPowerOn()
点击查看...
本机蓝牙是否打开
int tpBluetoothLocal::powerOn()
点击查看...
打开蓝牙
int tpBluetoothLocal::powerOff()
点击查看...
关闭蓝牙
int tpBluetoothLocal::getHostMode()
暂无注释...
int tpBluetoothLocal::setHostMode()
暂无注释...
static tpList< tpBluetoothLocal > tpBluetoothLocal::getAllDevice()
点击查看...
获取所有适配器列表