![]() |
Qt 6.x
The Qt SDK
|
Classes | |
struct | AdvertisementData |
class | LECBManagerNotifier |
struct | LERequest |
class | ObjCScopedPointer |
class | ObjCStrongReference |
class | ScopedPointer |
class | SerialDispatchQueue |
class | StrongReference |
Typedefs | |
typedef QHash< QLowEnergyHandle, CBService * > | ServiceHash |
typedef QHash< QLowEnergyHandle, CBCharacteristic * > | CharHash |
typedef QHash< QLowEnergyHandle, CBDescriptor * > | DescHash |
typedef QQueue< LERequest > | RequestQueue |
typedef QHash< NSObject *, QByteArray > | ValueHash |
using | GCDTimer = ObjCStrongReference< DarwinBTGCDTimer > |
Enumerations | |
enum | CentralManagerState { CentralManagerIdle , CentralManagerUpdating , CentralManagerConnecting , CentralManagerDiscovering , CentralManagerDisconnecting } |
enum class | OperationTimeout { none , serviceDiscovery , includedServicesDiscovery , characteristicsDiscovery , characteristicRead , descriptorsDiscovery , descriptorRead , characteristicWrite } |
enum class | RetainPolicy { noInitialRetain , doInitialRetain } |
Variables | |
const int | timeStepMS = 100 |
const int | powerOffTimeoutMS = 30000 |
const int | defaultLEScanTimeoutMS = 40000 |
const int | maxValueLength = 512 |
const int | defaultMtu = 23 |
typedef QHash<QLowEnergyHandle, CBCharacteristic *> DarwinBluetooth::CharHash |
Definition at line 58 of file btcentralmanager_p.h.
typedef QHash<QLowEnergyHandle, CBDescriptor *> DarwinBluetooth::DescHash |
Definition at line 59 of file btcentralmanager_p.h.
using DarwinBluetooth::GCDTimer = typedef ObjCStrongReference<DarwinBTGCDTimer> |
Definition at line 67 of file btgcdtimer_p.h.
typedef QQueue<LERequest> DarwinBluetooth::RequestQueue |
Definition at line 84 of file btcentralmanager_p.h.
typedef QHash<QLowEnergyHandle, CBService *> DarwinBluetooth::ServiceHash |
Definition at line 57 of file btcentralmanager_p.h.
typedef QHash<NSObject *, QByteArray> DarwinBluetooth::ValueHash |
Definition at line 92 of file btcentralmanager_p.h.
Enumerator | |
---|---|
CentralManagerIdle | |
CentralManagerUpdating | |
CentralManagerConnecting | |
CentralManagerDiscovering | |
CentralManagerDisconnecting |
Definition at line 40 of file btcentralmanager_p.h.
|
strong |
Enumerator | |
---|---|
none | |
serviceDiscovery | |
includedServicesDiscovery | |
characteristicsDiscovery | |
characteristicRead | |
descriptorsDiscovery | |
descriptorRead | |
characteristicWrite |
Definition at line 30 of file btgcdtimer_p.h.
|
strong |
Enumerator | |
---|---|
noInitialRetain | |
doInitialRetain |
Definition at line 26 of file btraii_p.h.
bool DarwinBluetooth::add_attribute | ( | const QBluetoothServiceInfo & | serviceInfo, |
AttributeId | key, | ||
Dictionary | dict | ||
) |
Definition at line 329 of file btservicerecord.mm.
References add_attribute< QBluetoothUuid >(), add_attribute< QString >(), add_attribute< QUrl >(), QBluetoothServiceInfo::attribute(), QVariant::canConvert(), Q_ASSERT_X, Q_FUNC_INFO, QVariant::typeId(), QVariant::userType(), and var.
void DarwinBluetooth::add_attribute | ( | const QVariant & | var, |
AttributeId | key, | ||
Dictionary | dict | ||
) |
Definition at line 105 of file btservicerecord.mm.
References QVariant::canConvert(), Q_ASSERT_X, Q_FUNC_INFO, and var.
Referenced by add_sequence_attribute(), add_sequence_attribute(), and iobluetooth_service_dictionary().
bool DarwinBluetooth::add_attribute | ( | const QVariant & | var, |
AttributeId | key, | ||
NSMutableArray * | list | ||
) |
Definition at line 289 of file btservicerecord.mm.
References add_attribute< QBluetoothUuid >(), add_attribute< QString >(), add_attribute< QUrl >(), add_attribute< unsigned short >(), QVariant::canConvert(), list, Q_ASSERT_X, Q_FUNC_INFO, QVariant::typeId(), QVariant::userType(), and var.
void DarwinBluetooth::add_attribute | ( | const QVariant & | var, |
NSMutableArray * | list | ||
) |
Definition at line 162 of file btservicerecord.mm.
References QVariant::canConvert(), list, Q_ASSERT_X, Q_FUNC_INFO, and var.
void DarwinBluetooth::add_attribute< QBluetoothUuid > | ( | const QVariant & | var, |
AttributeId | key, | ||
Dictionary | dict | ||
) |
Definition at line 132 of file btservicerecord.mm.
References QVariant::canConvert(), iobluetooth_uuid(), Q_ASSERT_X, Q_FUNC_INFO, QVariant::value(), and var.
Referenced by add_attribute(), and add_attribute().
void DarwinBluetooth::add_attribute< QBluetoothUuid > | ( | const QVariant & | var, |
NSMutableArray * | list | ||
) |
Definition at line 208 of file btservicerecord.mm.
References QVariant::canConvert(), iobluetooth_uuid(), list, Q_ASSERT_X, Q_FUNC_INFO, QVariant::value(), and var.
void DarwinBluetooth::add_attribute< QString > | ( | const QVariant & | var, |
AttributeId | key, | ||
Dictionary | dict | ||
) |
Definition at line 117 of file btservicerecord.mm.
References QVariant::canConvert(), Q_ASSERT_X, Q_FUNC_INFO, QVariant::value(), and var.
Referenced by add_attribute(), and add_attribute().
void DarwinBluetooth::add_attribute< QString > | ( | const QVariant & | var, |
NSMutableArray * | list | ||
) |
Definition at line 193 of file btservicerecord.mm.
References QVariant::canConvert(), list, Q_ASSERT_X, Q_FUNC_INFO, QVariant::value(), and var.
void DarwinBluetooth::add_attribute< QUrl > | ( | const QVariant & | var, |
AttributeId | key, | ||
Dictionary | dict | ||
) |
Definition at line 144 of file btservicerecord.mm.
References QVariant::canConvert(), Q_ASSERT_X, Q_FUNC_INFO, Q_UNUSED, and var.
Referenced by add_attribute(), and add_attribute().
void DarwinBluetooth::add_attribute< QUrl > | ( | const QVariant & | var, |
NSMutableArray * | list | ||
) |
Definition at line 220 of file btservicerecord.mm.
References QVariant::canConvert(), list, Q_ASSERT_X, Q_FUNC_INFO, Q_UNUSED, and var.
void DarwinBluetooth::add_attribute< unsigned short > | ( | const QVariant & | var, |
NSMutableArray * | list | ||
) |
Definition at line 174 of file btservicerecord.mm.
References QVariant::canConvert(), list, Q_ASSERT_X, Q_FUNC_INFO, var, and variant_to_nsnumber< unsigned short >().
Referenced by add_attribute().
void DarwinBluetooth::add_l2cap_protocol_descriptor_list | ( | uint16 | psm, |
Dictionary | dict | ||
) |
Definition at line 263 of file btservicerecord.mm.
References dictionary, Q_ASSERT_X, Q_FUNC_INFO, and QT_BT_MAC_AUTORELEASEPOOL.
Referenced by iobluetooth_service_dictionary().
void DarwinBluetooth::add_rfcomm_protocol_descriptor_list | ( | uint16 | channelID, |
Dictionary | dict | ||
) |
Definition at line 232 of file btservicerecord.mm.
References dictionary, Q_ASSERT_X, Q_FUNC_INFO, and QT_BT_MAC_AUTORELEASEPOOL.
Referenced by iobluetooth_service_dictionary().
bool DarwinBluetooth::add_sequence_attribute | ( | const QBluetoothServiceInfo & | serviceInfo, |
AttributeId | key, | ||
Dictionary | dict | ||
) |
Definition at line 389 of file btservicerecord.mm.
References add_attribute(), add_sequence_attribute(), QBluetoothServiceInfo::attribute(), QVariant::canConvert(), QVariant::isNull(), list, Q_ASSERT_X, Q_FUNC_INFO, QT_BT_MAC_AUTORELEASEPOOL, QVariant::value(), and var.
bool DarwinBluetooth::add_sequence_attribute | ( | const QVariant & | var, |
AttributeId | key, | ||
NSMutableArray * | list | ||
) |
Definition at line 366 of file btservicerecord.mm.
References add_attribute(), add_sequence_attribute(), QVariant::canConvert(), QVariant::isNull(), list, Q_ASSERT_X, Q_FUNC_INFO, QVariant::value(), and var.
Referenced by add_sequence_attribute(), add_sequence_attribute(), and iobluetooth_service_dictionary().
ObjCStrongReference< CBUUID > DarwinBluetooth::cb_uuid | ( | const QBluetoothUuid & | qtUuid | ) |
Definition at line 174 of file btutility.mm.
References cb_uuid(), ok, qToBigEndian(), QUuid::toBytes(), and QBluetoothUuid::toUInt16().
Referenced by cb_uuid().
ObjCStrongReference< NSData > DarwinBluetooth::data_from_bytearray | ( | const QByteArray & | qtData | ) |
Definition at line 272 of file btutility.mm.
References QByteArray::constData(), data_from_bytearray(), init(), and QByteArray::size().
Referenced by data_from_bytearray().
ObjCStrongReference< IOBluetoothDevice > DarwinBluetooth::device_with_address | ( | const QBluetoothAddress & | address | ) |
Definition at line 14 of file btdevicepair.mm.
References doInitialRetain, and iobluetooth_address().
Referenced by QBluetoothLocalDevicePrivate::pairingStatus().
bool DarwinBluetooth::equal_uuids | ( | CBUUID * | cbUuid, |
const QBluetoothUuid & | qtUuid | ||
) |
Definition at line 196 of file btutility.mm.
References equal_uuids().
bool DarwinBluetooth::equal_uuids | ( | const QBluetoothUuid & | qtUuid, |
CBUUID * | cbUuid | ||
) |
Definition at line 190 of file btutility.mm.
References equal_uuids(), and qt_uuid().
Referenced by equal_uuids(), and equal_uuids().
QVariant DarwinBluetooth::extract_attribute_value | ( | IOBluetoothSDPDataElement * | dataElement | ) |
Definition at line 90 of file btsdpinquiry.mm.
References QList< T >::append(), extract_attribute_value(), QVariant::fromValue(), Q_ASSERT_X, Q_FUNC_INFO, and QT_BT_MAC_AUTORELEASEPOOL.
Referenced by extract_attribute_value(), and extract_service_record().
void DarwinBluetooth::extract_service_record | ( | IOBluetoothSDPServiceRecord * | record, |
QBluetoothServiceInfo & | serviceInfo | ||
) |
Definition at line 132 of file btsdpinquiry.mm.
References extract_attribute_value(), QList< T >::isEmpty(), QUuid::isNull(), keys, QT_BT_MAC_AUTORELEASEPOOL, record(), QBluetoothServiceInfo::ServiceClassIds, QBluetoothServiceInfo::setAttribute(), and QBluetoothServiceInfo::setServiceUuid().
QList< QBluetoothUuid > DarwinBluetooth::extract_services_uuids | ( | IOBluetoothDevice * | device | ) |
Definition at line 158 of file btsdpinquiry.mm.
References QList< T >::append(), device, QUuid::isNull(), QList< T >::push_back(), QT_BT_MAC_AUTORELEASEPOOL, record(), and QList< T >::size().
BluetoothDeviceAddress DarwinBluetooth::iobluetooth_address | ( | const QBluetoothAddress & | qAddress | ) |
Definition at line 65 of file btutility.mm.
References iobluetooth_address().
Referenced by device_with_address(), and iobluetooth_address().
ObjCStrongReference< NSMutableDictionary > DarwinBluetooth::iobluetooth_service_dictionary | ( | const QBluetoothServiceInfo & | serviceInfo | ) |
Definition at line 409 of file btservicerecord.mm.
References add_attribute(), add_l2cap_protocol_descriptor_list(), add_rfcomm_protocol_descriptor_list(), add_sequence_attribute(), QBluetoothServiceInfo::attributes(), init(), QBluetoothServiceInfo::L2capProtocol, noInitialRetain, QBluetoothServiceInfo::protocolServiceMultiplexer(), QBluetoothServiceInfo::serverChannel(), QList< T >::size(), QBluetoothServiceInfo::socketProtocol(), and QBluetoothServiceInfo::UnknownProtocol.
ObjCStrongReference< IOBluetoothSDPUUID > DarwinBluetooth::iobluetooth_uuid | ( | const QBluetoothUuid & | uuid | ) |
Definition at line 81 of file btutility.mm.
References QUuid::Id128Bytes::data, iobluetooth_uuid(), and QUuid::toBytes().
Referenced by add_attribute< QBluetoothUuid >(), add_attribute< QBluetoothUuid >(), and iobluetooth_uuid().
ObjCStrongReference< NSMutableData > DarwinBluetooth::mutable_data_from_bytearray | ( | const QByteArray & | qtData | ) |
Definition at line 281 of file btutility.mm.
References QByteArray::constData(), init(), mutable_data_from_bytearray(), and QByteArray::size().
Referenced by mutable_data_from_bytearray().
QBluetoothAddress DarwinBluetooth::qt_address | ( | const BluetoothDeviceAddress * | a | ) |
Definition at line 49 of file btutility.mm.
References QString::data(), and qt_address().
QString DarwinBluetooth::qt_address | ( | NSString * | address | ) |
Definition at line 36 of file btutility.mm.
References qt_address().
Referenced by qt_address(), and qt_address().
QByteArray DarwinBluetooth::qt_bytearray | ( | Integer | n | ) |
Definition at line 215 of file btutility.mm.
References qt_bytearray().
QByteArray DarwinBluetooth::qt_bytearray | ( | NSData * | data | ) |
Definition at line 201 of file btutility.mm.
References qt_bytearray().
Referenced by qt_bytearray(), qt_bytearray(), qt_bytearray(), and qt_bytearray().
QByteArray DarwinBluetooth::qt_bytearray | ( | NSObject * | obj | ) |
Definition at line 236 of file btutility.mm.
References QT_BT_MAC_AUTORELEASEPOOL, and qt_bytearray().
QByteArray DarwinBluetooth::qt_bytearray | ( | NSString * | string | ) |
Definition at line 225 of file btutility.mm.
References QT_BT_MAC_AUTORELEASEPOOL, and qt_bytearray().
NSUInteger DarwinBluetooth::qt_countGATTEntries | ( | CBService * | service | ) |
Definition at line 24 of file btcentralmanager.mm.
References Q_ASSERT_X, Q_FUNC_INFO, and QT_BT_MAC_AUTORELEASEPOOL.
QString DarwinBluetooth::qt_error_string | ( | IOReturn | errorCode | ) |
Definition at line 104 of file btutility.mm.
References QString::fromLatin1().
auto DarwinBluetooth::qt_find_watchdog | ( | const std::vector< GCDTimer > & | watchdogs, |
id | object, | ||
OperationTimeout | type | ||
) |
Definition at line 62 of file btcentralmanager.mm.
dispatch_queue_t DarwinBluetooth::qt_LE_queue | ( | ) |
Definition at line 324 of file btutility.mm.
References DarwinBluetooth::SerialDispatchQueue::data(), and qt_LE_queue().
Referenced by QLowEnergyControllerPrivateDarwin::~QLowEnergyControllerPrivateDarwin(), QLowEnergyControllerPrivateDarwin::connectToDevice(), QLowEnergyControllerPrivateDarwin::disconnectFromDevice(), QLowEnergyControllerPrivateDarwin::discoverServiceDetails(), QLowEnergyControllerPrivateDarwin::discoverServices(), QLowEnergyControllerPrivateDarwin::mtu(), qt_LE_queue(), QLowEnergyControllerPrivateDarwin::readCharacteristic(), QLowEnergyControllerPrivateDarwin::readDescriptor(), QLowEnergyControllerPrivateDarwin::readRssi(), QLowEnergyControllerPrivateDarwin::startAdvertising(), QLowEnergyControllerPrivateDarwin::stopAdvertising(), QLowEnergyControllerPrivateDarwin::writeCharacteristic(), and QLowEnergyControllerPrivateDarwin::writeDescriptor().
void DarwinBluetooth::qt_test_iobluetooth_runloop | ( | ) |
Definition at line 125 of file btutility.mm.
References qCWarning, and qt_test_iobluetooth_runloop().
Referenced by qt_test_iobluetooth_runloop(), and QBluetoothServiceDiscoveryAgent::start().
ObjCStrongReference< NSError > DarwinBluetooth::qt_timeoutNSError | ( | OperationTimeout | type | ) |
Definition at line 49 of file btcentralmanager.mm.
References noInitialRetain, none, Q_ASSERT, and Q_UNUSED.
QBluetoothUuid DarwinBluetooth::qt_uuid | ( | CBUUID * | uuid | ) |
Definition at line 142 of file btutility.mm.
References QUuid::Id128Bytes::data, qCDebug, QT_BT_MAC_AUTORELEASEPOOL, and qt_uuid().
QBluetoothUuid DarwinBluetooth::qt_uuid | ( | IOBluetoothSDPUUID * | uuid | ) |
Definition at line 91 of file btutility.mm.
References QUuid::Id128Bytes::data, and qt_uuid().
QBluetoothUuid DarwinBluetooth::qt_uuid | ( | NSUUID * | nsUuid | ) |
Definition at line 21 of file btledeviceinquiry.mm.
References QUuid::Id128Bytes::data.
Referenced by DarwinBluetooth::AdvertisementData::AdvertisementData(), equal_uuids(), QT_BEGIN_NAMESPACE::qt_createLEService(), QT_BEGIN_NAMESPACE::qt_servicesUuids(), qt_uuid(), and qt_uuid().
Number DarwinBluetooth::variant_to_nsnumber | ( | const QVariant & | ) |
Number DarwinBluetooth::variant_to_nsnumber< char > | ( | const QVariant & | var | ) |
Definition at line 87 of file btservicerecord.mm.
References doInitialRetain, QVariant::value(), and var.
Number DarwinBluetooth::variant_to_nsnumber< int > | ( | const QVariant & | var | ) |
Definition at line 99 of file btservicerecord.mm.
References doInitialRetain, QVariant::value(), and var.
Number DarwinBluetooth::variant_to_nsnumber< short > | ( | const QVariant & | var | ) |
Definition at line 93 of file btservicerecord.mm.
References doInitialRetain, QVariant::value(), and var.
Number DarwinBluetooth::variant_to_nsnumber< unsigned > | ( | const QVariant & | var | ) |
Definition at line 81 of file btservicerecord.mm.
References doInitialRetain, QVariant::value(), and var.
Number DarwinBluetooth::variant_to_nsnumber< unsigned char > | ( | const QVariant & | var | ) |
Definition at line 69 of file btservicerecord.mm.
References doInitialRetain, QVariant::value(), and var.
Number DarwinBluetooth::variant_to_nsnumber< unsigned short > | ( | const QVariant & | var | ) |
Definition at line 75 of file btservicerecord.mm.
References doInitialRetain, QVariant::value(), and var.
Referenced by add_attribute< unsigned short >().
const int DarwinBluetooth::defaultLEScanTimeoutMS = 40000 |
Definition at line 30 of file btutility.mm.
const int DarwinBluetooth::defaultMtu = 23 |
Definition at line 34 of file btutility.mm.
Referenced by QLowEnergyControllerPrivateDarwin::mtu().
const int DarwinBluetooth::maxValueLength = 512 |
Definition at line 32 of file btutility.mm.
const int DarwinBluetooth::powerOffTimeoutMS = 30000 |
Definition at line 34 of file btledeviceinquiry.mm.
const int DarwinBluetooth::timeStepMS = 100 |
Definition at line 33 of file btledeviceinquiry.mm.