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
qohosnetworkinformationenums.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 QOHOSNETWORKINFORMATIONENUMS_H
5#define QOHOSNETWORKINFORMATIONENUMS_H
6
7#include <QtCore/qglobal.h>
8#include <QtCore/qmetatype.h>
9#include <array>
10#include <info/application_target_sdk_version.h>
11
12QT_BEGIN_NAMESPACE
13
51
52namespace QtOhos {
53
54template<typename Enum>
55struct OhosEnumMeta;
56
57template<>
59{
61 static constexpr const char *fullTypeName = "@ohos.net.connection.NetBearType";
62 static constexpr std::array<std::pair<Enum, const char *>, 5> enumeratorsNames = {{
63 {Enum::BEARER_BLUETOOTH, "BEARER_BLUETOOTH"},
64 {Enum::BEARER_CELLULAR, "BEARER_CELLULAR"},
65 {Enum::BEARER_ETHERNET, "BEARER_ETHERNET"},
66 {Enum::BEARER_VPN, "BEARER_VPN"},
67 {Enum::BEARER_WIFI, "BEARER_WIFI"},
68 }};
69};
70
71template<>
73{
75 static constexpr const char *fullTypeName = "@ohos.net.connection.NetCap";
76 static constexpr std::array<std::pair<Enum, const char *>, 7> enumeratorsNames = {{
77 {Enum::NET_CAPABILITY_CHECKING_CONNECTIVITY, "NET_CAPABILITY_CHECKING_CONNECTIVITY"},
78 {Enum::NET_CAPABILITY_INTERNET, "NET_CAPABILITY_INTERNET"},
79 {Enum::NET_CAPABILITY_MMS, "NET_CAPABILITY_MMS"},
80 {Enum::NET_CAPABILITY_NOT_METERED, "NET_CAPABILITY_NOT_METERED"},
81 {Enum::NET_CAPABILITY_NOT_VPN, "NET_CAPABILITY_NOT_VPN"},
82 {Enum::NET_CAPABILITY_PORTAL, "NET_CAPABILITY_PORTAL"},
83 {Enum::NET_CAPABILITY_VALIDATED, "NET_CAPABILITY_VALIDATED"},
84 }};
85};
86
87}
88
90
91Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QtOhosNetworkInformation::enums::ohos::net::connection::NetBearType));
93
94#endif
QOhosSupplier< NetState > makeOhosNetStateDataSource(QOhosConsumer< NetState > stateChangeConsumer)
QtOhosNetworkInformation::enums::ohos::net::connection::NetCap NetCap
QtOhosNetworkInformation::enums::ohos::net::connection::NetBearType NetBearType
Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QtOhosNetworkInformation::enums::ohos::net::connection::NetCap))
QT_END_NAMESPACE Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QtOhosQpa::enums::kit::ShareKit::systemShare::SelectionMode))
std::optional< NetBearType > transport
static constexpr std::array< std::pair< Enum, const char * >, 7 > enumeratorsNames