Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qohosbluetoothenums_p.h
Go to the documentation of this file.
1// Copyright (C) 2026 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 QOHOSBLUETOOTHENUMS_P_H
5#define QOHOSBLUETOOTHENUMS_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qglobal.h>
19#include <QtCore/qmetatype.h>
20#include <array>
21#include <info/application_target_sdk_version.h>
22
23QT_BEGIN_NAMESPACE
24
25namespace QtOhosBluetooth {
26
96
97}
98
99namespace QtOhos {
100
101template<typename Enum>
102struct OhosEnumMeta;
103
104template<>
106{
108 static constexpr const char *fullTypeName = "@ohos.bluetooth.access.BluetoothState";
109 static constexpr std::array<std::pair<Enum, const char *>, 7> enumeratorsNames = {{
110 {Enum::STATE_BLE_ON, "STATE_BLE_ON"},
111 {Enum::STATE_BLE_TURNING_OFF, "STATE_BLE_TURNING_OFF"},
112 {Enum::STATE_BLE_TURNING_ON, "STATE_BLE_TURNING_ON"},
113 {Enum::STATE_OFF, "STATE_OFF"},
114 {Enum::STATE_ON, "STATE_ON"},
115 {Enum::STATE_TURNING_OFF, "STATE_TURNING_OFF"},
116 {Enum::STATE_TURNING_ON, "STATE_TURNING_ON"},
117 }};
118};
119
120template<>
122{
124 static constexpr const char *fullTypeName = "@ohos.bluetooth.connection.BluetoothTransport";
125 static constexpr std::array<std::pair<Enum, const char *>, 4> enumeratorsNames = {{
126 {Enum::TRANSPORT_BR_EDR, "TRANSPORT_BR_EDR"},
127 {Enum::TRANSPORT_DUAL, "TRANSPORT_DUAL"},
128 {Enum::TRANSPORT_LE, "TRANSPORT_LE"},
129 {Enum::TRANSPORT_UNKNOWN, "TRANSPORT_UNKNOWN"},
130 }};
131};
132
133template<>
135{
137 static constexpr const char *fullTypeName = "@ohos.bluetooth.connection.BondState";
138 static constexpr std::array<std::pair<Enum, const char *>, 3> enumeratorsNames = {{
139 {Enum::BOND_STATE_BONDED, "BOND_STATE_BONDED"},
140 {Enum::BOND_STATE_BONDING, "BOND_STATE_BONDING"},
141 {Enum::BOND_STATE_INVALID, "BOND_STATE_INVALID"},
142 }};
143};
144
145template<>
147{
149 static constexpr const char *fullTypeName = "@ohos.bluetooth.connection.ScanMode";
150 static constexpr std::array<std::pair<Enum, const char *>, 6> enumeratorsNames = {{
151 {Enum::SCAN_MODE_CONNECTABLE, "SCAN_MODE_CONNECTABLE"},
152 {Enum::SCAN_MODE_CONNECTABLE_GENERAL_DISCOVERABLE, "SCAN_MODE_CONNECTABLE_GENERAL_DISCOVERABLE"},
153 {Enum::SCAN_MODE_CONNECTABLE_LIMITED_DISCOVERABLE, "SCAN_MODE_CONNECTABLE_LIMITED_DISCOVERABLE"},
154 {Enum::SCAN_MODE_GENERAL_DISCOVERABLE, "SCAN_MODE_GENERAL_DISCOVERABLE"},
155 {Enum::SCAN_MODE_LIMITED_DISCOVERABLE, "SCAN_MODE_LIMITED_DISCOVERABLE"},
156 {Enum::SCAN_MODE_NONE, "SCAN_MODE_NONE"},
157 }};
158};
159
160template<>
162{
164 static constexpr const char *fullTypeName = "@ohos.bluetooth.connection.UnbondCause";
165 static constexpr std::array<std::pair<Enum, const char *>, 5> enumeratorsNames = {{
166 {Enum::AUTH_FAILURE, "AUTH_FAILURE"},
167 {Enum::AUTH_REJECTED, "AUTH_REJECTED"},
168 {Enum::INTERNAL_ERROR, "INTERNAL_ERROR"},
169 {Enum::REMOTE_DEVICE_DOWN, "REMOTE_DEVICE_DOWN"},
170 {Enum::USER_REMOVED, "USER_REMOVED"},
171 }};
172};
173
174template<>
176{
178 static constexpr const char *fullTypeName = "@ohos.bluetooth.socket.SppType";
179 static constexpr std::array<std::pair<Enum, const char *>, 3> enumeratorsNames = {{
180 {Enum::SPP_L2CAP, "SPP_L2CAP"},
181 {Enum::SPP_L2CAP_BLE, "SPP_L2CAP_BLE"},
182 {Enum::SPP_RFCOMM, "SPP_RFCOMM"},
183 }};
184};
185
186}
187
189
190Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QtOhosBluetooth::enums::ohos::bluetooth::access::BluetoothState));
196
197#endif
Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QtOhosBluetooth::enums::ohos::bluetooth::connection::BluetoothTransport))
Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QtOhosBluetooth::enums::ohos::bluetooth::connection::BondState))
Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QtOhosBluetooth::enums::ohos::bluetooth::socket::SppType))
Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QtOhosBluetooth::enums::ohos::bluetooth::connection::UnbondCause))
Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QtOhosBluetooth::enums::ohos::bluetooth::connection::ScanMode))
QT_END_NAMESPACE Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QtOhosQpa::enums::kit::ShareKit::systemShare::SelectionMode))
static constexpr std::array< std::pair< Enum, const char * >, 7 > enumeratorsNames
QtOhosBluetooth::enums::ohos::bluetooth::connection::BluetoothTransport Enum
static constexpr std::array< std::pair< Enum, const char * >, 3 > enumeratorsNames
static constexpr std::array< std::pair< Enum, const char * >, 6 > enumeratorsNames
static constexpr std::array< std::pair< Enum, const char * >, 5 > enumeratorsNames
static constexpr std::array< std::pair< Enum, const char * >, 3 > enumeratorsNames