/**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtBluetooth module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3.0 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU General Public License version 3.0 requirements will be ** met: http://www.gnu.org/copyleft/gpl.html. ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #ifndef QBLUETOOTHUUID_H #define QBLUETOOTHUUID_H #include #include #include #include #include QT_BEGIN_NAMESPACE struct quint128 { quint8 data[16]; }; class Q_BLUETOOTH_EXPORT QBluetoothUuid : public QUuid { public: enum ProtocolUuid { Sdp = 0x0001, Udp = 0x0002, Rfcomm = 0x0003, Tcp = 0x0004, TcsBin = 0x0005, TcsAt = 0x0006, Att = 0x0007, Obex = 0x0008, Ip = 0x0009, Ftp = 0x000A, Http = 0x000C, Wsp = 0x000E, Bnep = 0x000F, Upnp = 0x0010, Hidp = 0x0011, HardcopyControlChannel = 0x0012, HardcopyDataChannel = 0x0014, HardcopyNotification = 0x0016, Avctp = 0x0017, Avdtp = 0x0019, Cmtp = 0x001B, UdiCPlain = 0x001D, McapControlChannel = 0x001E, McapDataChannel = 0x001F, L2cap = 0x0100, }; enum ServiceClassUuid { ServiceDiscoveryServer = 0x1000, BrowseGroupDescriptor = 0x1001, PublicBrowseGroup = 0x1002, SerialPort = 0x1101, LANAccessUsingPPP = 0x1102, DialupNetworking = 0x1103, IrMCSync = 0x1104, ObexObjectPush = 0x1105, OBEXFileTransfer = 0x1106, IrMCSyncCommand = 0x1107, Headset = 0x1108, AudioSource = 0x110a, AudioSink = 0x110b, AV_RemoteControlTarget = 0x110c, AdvancedAudioDistribution = 0x110d, AV_RemoteControl = 0x110e, AV_RemoteControlController = 0x110f, HeadsetAG = 0x1112, PANU = 0x1115, NAP = 0x1116, GN = 0x1117, DirectPrinting = 0x1118, ReferencePrinting = 0x1119, ImagingResponder = 0x111b, ImagingAutomaticArchive = 0x111c, ImagingReferenceObjects = 0x111d, Handsfree = 0x111e, HandsfreeAudioGateway = 0x111f, DirectPrintingReferenceObjectsService = 0x1120, ReflectedUI = 0x1121, BasicPrinting = 0x1122, PrintingStatus = 0x1123, HumanInterfaceDeviceService = 0x1124, HardcopyCableReplacement = 0x1125, HCRPrint = 0x1126, HCRScan = 0x1127, SIMAccess = 0x112d, PhonebookAccessPCE = 0x112e, PhonebookAccessPSE = 0x112f, PhonebookAccess = 0x1130, HeadsetHS = 0x1131, MessageAccessServer = 0x1132, MessageNotificationServer = 0x1133, MessageAccessProfile = 0x1134, PnPInformation = 0x1135, GenericNetworking = 0x1201, GenericFileTransfer = 0x1202, GenericAudio = 0x1203, GenericTelephony = 0x1204, VideoSource = 0x1303, VideoSink = 0x1304, VideoDistribution = 0x1305, HDP = 0x1400, HDPSource = 0x1401, HDPSink = 0x1402, GenericAccess = 0x1800, GenericAttribute = 0x1801, ImmediateAlert = 0x1802, LinkLoss = 0x1803, TxPower = 0x1804, CurrentTimeService = 0x1805, ReferenceTimeUpdateService = 0x1806, NextDSTChangeService = 0x1807, Glucose = 0x1808, HealthThermometer = 0x1809, DeviceInformation = 0x180a, HeartRate = 0x180d, PhoneAlertStatusService = 0x180e, BatteryService = 0x180f, BloodPressure = 0x1810, AlertNotificationService = 0x1811, HumanInterfaceDevice = 0x1812, ScanParameters = 0x1813, RunningSpeedAndCadence = 0x1814, CyclingSpeedAndCadence = 0x1816, CyclingPower = 0x1818, LocationAndNavigation = 0x1819, TISimpleKeyService = 0xffe0 }; enum CharacteristicId { AlertCategoryID = 0x2a43, AlertCategoryIDBitMask = 0x2a42, AlertLevel = 0x2a06, AlertNotificationControlPoint = 0x2a44, AlertStatus = 0x2a3f, Appearance = 0x2a01, BatteryLevel = 0x2a19, BloodPressureFeature = 0x2a49, BloodPressureMeasurement = 0x2a35, BodySensorLocation = 0x2a38, BootKeyboardInputReport = 0x2a22, BootKeyboardOutputReport = 0x2a32, BootMouseInputReport = 0x2a33, CSCFeature = 0x2a5c, CSCMeasurement = 0x2a5b, CurrentTime = 0x2a2b, CyclingPowerControlPoint = 0x2a66, CyclingPowerFeature = 0x2a65, CyclingPowerMeasurement = 0x2a63, CyclingPowerVector = 0x2a64, DateTime = 0x2a08, DayDateTime = 0x2a0a, DayOfWeek = 0x2a09, DeviceName = 0x2a00, DSTOffset = 0x2a0d, ExactTime256 = 0x2a0c, FirmwareRevisionString = 0x2a26, GlucoseFeature = 0x2a51, GlucoseMeasurement = 0x2a18, GlucoseMeasurementContext = 0x2a34, HardwareRevisionString = 0x2a27, HeartRateControlPoint = 0x2a39, HeartRateMeasurement = 0x2a37, HIDControlPoint = 0x2a4c, HIDInformation = 0x2a4a, IEEE1107320601RegulatoryCertificationDataList = 0x2a2a, IntermediateCuffPressure = 0x2a36, IntermediateTemperature = 0x2a1e, LNControlPoint = 0x2a6b, LNFeature = 0x2a6a, LocalTimeInformation = 0x2a0f, LocationAndSpeed = 0x2a67, ManufacturerNameString = 0x2a29, MeasurementInterval = 0x2a21, ModelNumberString = 0x2a24, Navigation = 0x2a68, NewAlert = 0x2a46, PeripheralPreferredConnectionParameters = 0x2a04, PeripheralPrivacyFlag = 0x2a02, PnPID = 0x2a50, PositionQuality = 0x2a69, ProtocolMode = 0x2a4e, ReconnectionAddress = 0x2a03, RecordAccessControlPoint = 0x2a52, ReferenceTimeInformation = 0x2a14, Report = 0x2a4d, ReportMap = 0x2a4b, RingerControlPoint = 0x2a40, RingerSetting = 0x2a41, RSCFeature = 0x2a54, RSCMeasurement = 0x2a53, SCControlPoint = 0x2a55, ScanIntervalWindow = 0x2a4f, ScanRefresh = 0x2a31, SensorLocation = 0x2a5d, SerialNumberString = 0x2a25, ServiceChanged = 0x2a05, SoftwareRevisionString = 0x2a28, SupportedNewAlertCategory = 0x2a47, SupportedUnreadAlertCategory = 0x2a48, SystemID = 0x2a23, TemperatureMeasurement = 0x2a1c, TemperatureType = 0x2a1d, TimeAccuracy = 0x2a12, TimeSource = 0x2a13, TimeUpdateControlPoint = 0x2a16, TimeUpdateState = 0x2a17, TimeWithDST = 0x2a11, TimeZone = 0x2a0e, TxPowerLevel = 0x2a07, UnreadAlertStatus = 0x2a45 }; enum DescriptorID { CharacteristicExtendedProperties = 0x2900, CharacteristicUserDescription = 0x2901, ClientCharacteristicConfiguration = 0x2902, ServerCharacteristicConfiguration = 0x2903, CharacteristicPresentationFormat = 0x2904, CharacteristicAggregateFormat = 0x2905, ValidRange = 0x2906, ExternalReportReference = 0x2907, ReportReference = 0x2908 }; QBluetoothUuid(); QBluetoothUuid(ProtocolUuid uuid); QBluetoothUuid(ServiceClassUuid uuid); QBluetoothUuid(CharacteristicId uuid); explicit QBluetoothUuid(quint16 uuid); explicit QBluetoothUuid(quint32 uuid); explicit QBluetoothUuid(quint128 uuid); explicit QBluetoothUuid(const QString &uuid); QBluetoothUuid(const QBluetoothUuid &uuid); QBluetoothUuid(const QUuid &uuid); ~QBluetoothUuid(); bool operator==(const QBluetoothUuid &other) const; int minimumSize() const; quint16 toUInt16(bool *ok = 0) const; quint32 toUInt32(bool *ok = 0) const; quint128 toUInt128() const; }; inline QDebug operator<<(QDebug debug, const QBluetoothUuid &uuid) { debug << uuid.toString(); return debug; } QT_END_NAMESPACE Q_DECLARE_METATYPE(QBluetoothUuid) #endif