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
qconnmanservice.h
Go to the documentation of this file.
1// Copyright (C) 2025 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// Qt-Security score:significant reason:default
4
5#ifndef QCONNMANSERVICE_H
6#define QCONNMANSERVICE_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtDBus/qdbusabstractinterface.h>
20
21QT_BEGIN_NAMESPACE
22
23class QDBusObjectPath;
25
26// This tiny class exists for the purpose of seeing if ConnMan is available without
27// initializing everything the derived/full class needs.
29{
31public:
32 explicit QConnManInterfaceBase(QObject *parent = nullptr);
34
35 static bool connmanAvailable();
36
37private:
39};
40
42{
44
45public:
46 explicit QConnManInterface(QObject *parent = nullptr);
48
50
51 QString state() const;
52 QString type() const;
53
54 bool isValid() const { return QDBusAbstractInterface::isValid() && validDBusConnection; }
55
56private Q_SLOTS:
57 void propertyChanged(const QString &name, const QDBusVariant &value);
58
59private:
62
63 QConnManNetworkInformationBackend *backend = nullptr;
64 bool validDBusConnection = true;
65 QString m_state;
66 QString m_type;
67};
68
69QT_END_NAMESPACE
70
71#endif
static bool connmanAvailable()
~QConnManInterfaceBase()=default
QString state() const
QString type() const
void setBackend(QConnManNetworkInformationBackend *ourBackend)
bool isValid() const
QConnManInterface(QObject *parent=nullptr)
QNetworkInformationBackend * create(QNetworkInformation::Features requiredFeatures) const override
Create and return an instance of QNetworkInformationBackend.
QString name() const override
Backend name, return the same in QNetworkInformationBackend::name().
QNetworkInformation::Features featuresSupported() const override
Features supported, return the same in QNetworkInformationBackend::featuresSupported().
static QNetworkInformation::Features featuresSupportedStatic()
QString name() const override
Backend name, return the same in QNetworkInformationBackendFactory::name().
QNetworkInformation::Features featuresSupported() const override
Features supported, return the same in QNetworkInformationBackendFactory::featuresSupported().
static QString backendName()