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
12QT_BEGIN_NAMESPACE
13
14namespace QBluetooth {
15Q_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
19enum class Security {
20 NoSecurity = 0x00,
21 Authorization = 0x01,
22 Authentication = 0x02,
23 Encryption = 0x04,
24 Secure = 0x08
25};
26Q_ENUM_NS(Security)
27Q_DECLARE_FLAGS(SecurityFlags, Security)
28Q_DECLARE_OPERATORS_FOR_FLAGS(SecurityFlags)
29
30enum class AttAccessConstraint {
31 AttAuthorizationRequired = 0x1,
32 AttAuthenticationRequired = 0x2,
33 AttEncryptionRequired = 0x4,
34};
35Q_ENUM_NS(AttAccessConstraint)
36
37Q_DECLARE_FLAGS(AttAccessConstraints, AttAccessConstraint)
38Q_DECLARE_OPERATORS_FOR_FLAGS(AttAccessConstraints)
39
40}
41
42typedef quint16 QLowEnergyHandle;
43
44QT_END_NAMESPACE
45
46#endif // QBLUETOOTH_H
47

source code of qtconnectivity/src/bluetooth/qbluetooth.h