Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qnetworkmanagernetworkinformationbackend.h
Go to the documentation of this file.
1// Copyright (C) 2021 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 QNETWORKMANAGERINFORMATIONBACKEND_H
5#define QNETWORKMANAGERINFORMATIONBACKEND_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 <QtNetwork/private/qnetworkinformation_p.h>
20
22
24{
26public:
29
30 QString name() const override;
31 QNetworkInformation::Features featuresSupported() const override
32 {
33 if (!isValid())
34 return {};
36 }
37
38 static QNetworkInformation::Features featuresSupportedStatic()
39 {
40 using Feature = QNetworkInformation::Feature;
41 return QNetworkInformation::Features(Feature::Reachability | Feature::CaptivePortal
42 | Feature::TransportMedium | Feature::Metered);
43 }
44
45 bool isValid() const { return iface.isValid(); }
46
51
52private:
54
56};
57
59
60#endif
QNetworkInformationBackend provides the interface with which QNetworkInformation does all of its actu...
Feature
Lists all of the features that a plugin may currently support.
void onStateChanged(QNetworkManagerInterface::NMState state)
QString name() const override
Backend name, return the same in QNetworkInformationBackendFactory::name().
void onMeteredChanged(QNetworkManagerInterface::NMMetered metered)
void onConnectivityChanged(QNetworkManagerInterface::NMConnectivityState connectivityState)
void onDeviceTypeChanged(QNetworkManagerInterface::NMDeviceType deviceType)
QNetworkInformation::Features featuresSupported() const override
Features supported, return the same in QNetworkInformationBackendFactory::featuresSupported().
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
else opt state
[0]
Combined button and popup list for selecting options.
#define Q_OBJECT
static QInputDevice::DeviceType deviceType(const UINT cursorType)