QBluetoothUuid Class

The QBluetoothUuid class generates a UUID for each Bluetooth service. More...

Header: #include <QBluetoothUuid>
qmake: QT += bluetooth

Public Types

enum ProtocolUuid { Sdp, Udp, Rfcomm, Tcp, ..., L2cap }
enum ServiceClassUuid { ServiceDiscoveryServer, BrowseGroupDescriptor, PublicBrowseGroup, SerialPort, ..., HDPSink }

Public Functions

QBluetoothUuid()
QBluetoothUuid(ProtocolUuid uuid)
QBluetoothUuid(ServiceClassUuid uuid)
QBluetoothUuid(quint16 uuid)
QBluetoothUuid(quint32 uuid)
QBluetoothUuid(quint128 uuid)
QBluetoothUuid(const QString & uuid)
QBluetoothUuid(const QBluetoothUuid & uuid)
QBluetoothUuid(const QUuid & uuid)
~QBluetoothUuid()
int minimumSize() const
quint16 toUInt16(bool * ok = 0) const
quint32 toUInt32(bool * ok = 0) const
quint128 toUInt128() const
bool operator==(const QBluetoothUuid & other) const

Detailed Description

The QBluetoothUuid class generates a UUID for each Bluetooth service.

Member Type Documentation

enum QBluetoothUuid::ProtocolUuid

This enum is a convienience type for Bluetooth protocol UUIDs. Values of this type will be implicitly converted into a QBluetoothUuid when necessary.

ConstantValueDescription
QBluetoothUuid::Sdp0x0001SDP protocol UUID
QBluetoothUuid::Udp0x0002UDP protocol UUID
QBluetoothUuid::Rfcomm0x0003RFCOMM protocol UUID
QBluetoothUuid::Tcp0x0004TCP protocol UUID
QBluetoothUuid::TcsBin0x0005Telephony Control Specification UUID
QBluetoothUuid::TcsAt0x0006Telephony Control Specification AT UUID
QBluetoothUuid::Att0x0007Attribute protocol UUID
QBluetoothUuid::Obex0x0008OBEX protocol UUID
QBluetoothUuid::Ip0x0009IP protocol UUID
QBluetoothUuid::Ftp0x000AFTP protocol UUID
QBluetoothUuid::Http0x000CHTTP protocol UUID
QBluetoothUuid::Wsp0x000EWSP UUID
QBluetoothUuid::Bnep0x000FBluetooth Network Encapsulation Protocol UUID
QBluetoothUuid::Upnp0x0010Extended Service Discovery Profile UUID
QBluetoothUuid::Hidp0x0011Human Interface Device Profile UUID
QBluetoothUuid::HardcopyControlChannel0x0012Hardcopy Cable Replacement Profile UUID
QBluetoothUuid::HardcopyDataChannel0x0014Hardcopy Cable Replacement Profile UUID
QBluetoothUuid::HardcopyNotification0x0016Hardcopy Cable Replacement Profile UUID
QBluetoothUuid::Avctp0x0017Audio/Video Control Transport Protocol UUID
QBluetoothUuid::Avdtp0x0019Audio/Video Distribution Transport Protocol UUID
QBluetoothUuid::Cmtp0x001BCommon ISDN Access Profile
QBluetoothUuid::UdiCPlain0x001DUDI protocol UUID
QBluetoothUuid::McapControlChannel0x001EMulti-Channel Adaptation Protocol UUID
QBluetoothUuid::McapDataChannel0x001FMulti-Channel Adaptation Protocol UUID
QBluetoothUuid::L2cap0x0100L2CAP protocol UUID

See also QBluetoothServiceInfo::ProtocolDescriptorList.

enum QBluetoothUuid::ServiceClassUuid

This enum is a convienience type for Bluetooth service class and profile UUIDs. Values of this type will be implicitly converted into a QBluetoothUuid when necessary. Some UUIDs refer to service class ids, others to profile ids and some can be used as both. In general, profile UUIDs shall only be used in a QBluetoothServiceInfo::BluetoothProfileDescriptorList attribute and service class UUIDs shall only be used in a QBluetoothServiceInfo::ServiceClassIds attribute. If the UUID is marked as profile and service class UUID it can be used as a value for either of the above service attributes. Such a dual use has historical reasons but is no longer permissible for newer UUIDs.

The list below explicitly states as what type each UUID shall be used.

ConstantValueDescription
QBluetoothUuid::ServiceDiscoveryServer0x1000Service discovery server UUID (service)
QBluetoothUuid::BrowseGroupDescriptor0x1001Browser group descriptor (service)
QBluetoothUuid::PublicBrowseGroup0x1002Public browse group service class. Services which have the public browse group in their browse group list are discoverable by the remote devices.
QBluetoothUuid::SerialPort0x1101Serial Port Profile UUID (service & profile)
QBluetoothUuid::LANAccessUsingPPP0x1102LAN Access Profile UUID (service & profile)
QBluetoothUuid::DialupNetworking0x1103Dial-up Networking Profile UUID (service & profile)
QBluetoothUuid::IrMCSync0x1104Synchronization Profile UUID (service & profile)
QBluetoothUuid::ObexObjectPush0x1105OBEX object push service UUID (service & profile)
QBluetoothUuid::OBEXFileTransfer0x1106File Transfer Profile (FTP) UUID (service & profile)
QBluetoothUuid::IrMCSyncCommand0x1107Synchronization Profile UUID (profile)
QBluetoothUuid::Headset0x1108Headset Profile (HSP) UUID (service & profile)
QBluetoothUuid::AudioSource0x110aAdvanced Audio Distribution Profile (A2DP) UUID (service)
QBluetoothUuid::AudioSink0x110bAdvanced Audio Distribution Profile (A2DP) UUID (service)
QBluetoothUuid::AV_RemoteControlTarget0x110cAudio/Video Remote Control Profile (AVRCP) UUID (service)
QBluetoothUuid::AdvancedAudioDistribution0x110dAdvanced Audio Distribution Profile (A2DP) UUID (profile)
QBluetoothUuid::AV_RemoteControl0x110eAudio/Video Remote Control Profile (AVRCP) UUID (service & profile)
QBluetoothUuid::AV_RemoteControlController0x110fAudio/Video Remote Control Profile UUID (service)
QBluetoothUuid::HeadsetAG0x1112Headset Profile (HSP) UUID (service)
QBluetoothUuid::PANU0x1115Personal Area Networking Profile (PAN) UUID (service & profile)
QBluetoothUuid::NAP0x1116Personal Area Networking Profile (PAN) UUID (service & profile)
QBluetoothUuid::GN0x1117Personal Area Networking Profile (PAN) UUID (service & profile)
QBluetoothUuid::DirectPrinting0x1118Basic Printing Profile (BPP) UUID (service)
QBluetoothUuid::ReferencePrinting0x1119Related to Basic Printing Profile (BPP) UUID (service)
QBluetoothUuid::BasicImage0x111aBasic Imaging Profile (BIP) UUID (profile)
QBluetoothUuid::ImagingResponder0x111bBasic Imaging Profile (BIP) UUID (service)
QBluetoothUuid::ImagingAutomaticArchive0x111cBasic Imaging Profile (BIP) UUID (service)
QBluetoothUuid::ImagingReferenceObjects0x111dBasic Imaging Profile (BIP) UUID (service)
QBluetoothUuid::Handsfree0x111eHands-Free Profile (HFP) UUID (service & profile)
QBluetoothUuid::HandsfreeAudioGateway0x111fHands-Free Audio Gateway (HFP) UUID (service)
QBluetoothUuid::DirectPrintingReferenceObjectsService0x1120Basic Printing Profile (BPP) UUID (service)
QBluetoothUuid::ReflectedUI0x1121Basic Printing Profile (BPP) UUID (service)
QBluetoothUuid::BasicPrinting0x1122Basic Printing Profile (BPP) UUID (profile)
QBluetoothUuid::PrintingStatus0x1123Basic Printing Profile (BPP) UUID (service)
QBluetoothUuid::HumanInterfaceDeviceService0x1124Human Interface Device (HID) UUID (service & profile)
QBluetoothUuid::HardcopyCableReplacement0x1125Hardcopy Cable Replacement Profile (HCRP) (profile)
QBluetoothUuid::HCRPrint0x1126Hardcopy Cable Replacement Profile (HCRP) (service)
QBluetoothUuid::HCRScan0x1127Hardcopy Cable Replacement Profile (HCRP) (service)
QBluetoothUuid::SIMAccess0x112dSIM Access Profile (SAP) UUID (service and profile)
QBluetoothUuid::PhonebookAccessPCE0x112ePhonebook Access Profile (PBAP) UUID (service)
QBluetoothUuid::PhonebookAccessPSE0x112fPhonebook Access Profile (PBAP) UUID (service)
QBluetoothUuid::PhonebookAccess0x1130Phonebook Access Profile (PBAP) (profile)
QBluetoothUuid::HeadsetHS0x1131Headset Profile (HSP) UUID (service)
QBluetoothUuid::MessageAccessServer0x1132Message Access Profile (MAP) UUID (service)
QBluetoothUuid::MessageNotificationServer0x1133Message Access Profile (MAP) UUID (service)
QBluetoothUuid::MessageAccessProfile0x1134Message Access Profile (MAP) UUID (profile)
QBluetoothUuid::GNSS0x1135Global Navigation Satellite System UUID (profile)
QBluetoothUuid::GNSSServer0x1136Global Navigation Satellite System Server (UUID) (service)
QBluetoothUuid::Display3D0x11373D Synchronization Display UUID (service)
QBluetoothUuid::Glasses3D0x11383D Synchronization Glasses UUID (service)
QBluetoothUuid::Synchronization3D0x11393D Synchronization UUID (profile)
QBluetoothUuid::MPSProfile0x113aMulti-Profile Specification UUID (profile)
QBluetoothUuid::MPSService0x113bMulti-Profile Specification UUID (service)
QBluetoothUuid::PnPInformation0x1200Device Identification (DID) UUID (service & profile)
QBluetoothUuid::GenericNetworking0x1201Generic networking UUID (service)
QBluetoothUuid::GenericFileTransfer0x1202Generic file transfer UUID (service)
QBluetoothUuid::GenericAudio0x1203Generic audio UUID (service)
QBluetoothUuid::GenericTelephony0x1204Generic telephone UUID (service)
QBluetoothUuid::VideoSource0x1303Video Distribution Profile (VDP) UUID (service)
QBluetoothUuid::VideoSink0x1304Video Distribution Profile (VDP) UUID (service)
QBluetoothUuid::VideoDistribution0x1305Video Distribution Profile (VDP) UUID (profile)
QBluetoothUuid::HDP0x1400Health Device Profile (HDP) UUID (profile)
QBluetoothUuid::HDPSource0x1401Health Device Profile Source (HDP) UUID (service)
QBluetoothUuid::HDPSink0x1402Health Device Profile Sink (HDP) UUID (service)

See also QBluetoothServiceInfo::ServiceClassIds.

Member Function Documentation

QBluetoothUuid::QBluetoothUuid()

Constructs a new null Bluetooth UUID.

QBluetoothUuid::QBluetoothUuid(ProtocolUuid uuid)

Constructs a new Bluetooth UUID from the protocol uuid.

QBluetoothUuid::QBluetoothUuid(ServiceClassUuid uuid)

Constructs a new Bluetooth UUID from the service class uuid.

QBluetoothUuid::QBluetoothUuid(quint16 uuid)

Constructs a new Bluetooth UUID from the 16 bit uuid.

QBluetoothUuid::QBluetoothUuid(quint32 uuid)

Constructs a new Bluetooth UUID from the 32 bit uuid.

QBluetoothUuid::QBluetoothUuid(quint128 uuid)

Constructs a new Bluetooth UUID from the 128 bit uuid.

QBluetoothUuid::QBluetoothUuid(const QString & uuid)

Constructs a new Bluetooth UUID from the uuid string.

The string must be in the form XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.

QBluetoothUuid::QBluetoothUuid(const QBluetoothUuid & uuid)

Constructs a new Bluetooth UUID that is a copy of uuid.

QBluetoothUuid::QBluetoothUuid(const QUuid & uuid)

Constructs a new Bluetooth UUID that is a copy of uuid.

QBluetoothUuid::~QBluetoothUuid()

Destroys the Bluetooth UUID.

int QBluetoothUuid::minimumSize() const

Returns the minimum size in bytes that this UUID can be represented in. For non-null UUIDs 2, 4 or 16 is returned. 0 is returned for null UUIDs.

See also isNull(), toUInt16(), toUInt32(), and toUInt128().

quint16 QBluetoothUuid::toUInt16(bool * ok = 0) const

Returns the 16 bit representation of this UUID. If ok is passed, it is set to true if the conversion is possible, otherwise it is set to false. The return value is undefined if ok is set to false.

quint32 QBluetoothUuid::toUInt32(bool * ok = 0) const

Returns the 32 bit representation of this UUID. If ok is passed, it is set to true if the conversion is possible, otherwise it is set to false. The return value is undefined if ok is set to false.

quint128 QBluetoothUuid::toUInt128() const

Returns the 128 bit representation of this UUID.

bool QBluetoothUuid::operator==(const QBluetoothUuid & other) const

Returns true if other is equal to this Bluetooth UUID, otherwise false.