| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QBLUETOOTH_H |
| 5 | #define QBLUETOOTH_H |
| 6 | |
| 7 | #include <QtBluetooth/qtbluetoothglobal.h> |
| 8 | #include <QtCore/qglobal.h> |
| 9 | #include <QtCore/qtmetamacros.h> |
| 10 | #include <QtCore/qobject.h> |
| 11 | |
| 12 | QT_BEGIN_NAMESPACE |
| 13 | |
| 14 | namespace QBluetooth { |
| 15 | Q_NAMESPACE_EXPORT(Q_BLUETOOTH_EXPORT) |
| 16 | // TODO Qt 6: Merge these two enums? But note that ATT Authorization has no equivalent |
| 17 | // on the socket security level. |
| 18 | |
| 19 | enum class Security { |
| 20 | NoSecurity = 0x00, |
| 21 | Authorization = 0x01, |
| 22 | Authentication = 0x02, |
| 23 | Encryption = 0x04, |
| 24 | Secure = 0x08 |
| 25 | }; |
| 26 | Q_ENUM_NS(Security) |
| 27 | Q_DECLARE_FLAGS(SecurityFlags, Security) |
| 28 | Q_DECLARE_OPERATORS_FOR_FLAGS(SecurityFlags) |
| 29 | |
| 30 | enum class AttAccessConstraint { |
| 31 | AttAuthorizationRequired = 0x1, |
| 32 | AttAuthenticationRequired = 0x2, |
| 33 | AttEncryptionRequired = 0x4, |
| 34 | }; |
| 35 | Q_ENUM_NS(AttAccessConstraint) |
| 36 | |
| 37 | Q_DECLARE_FLAGS(AttAccessConstraints, AttAccessConstraint) |
| 38 | Q_DECLARE_OPERATORS_FOR_FLAGS(AttAccessConstraints) |
| 39 | |
| 40 | } |
| 41 | |
| 42 | typedef quint16 QLowEnergyHandle; |
| 43 | |
| 44 | QT_END_NAMESPACE |
| 45 | |
| 46 | #endif // QBLUETOOTH_H |
| 47 |
