Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
21
QT_BEGIN_NAMESPACE
22
23
class
QDBusObjectPath;
24
class
QConnManNetworkInformationBackend
;
25
26
// This tiny class exists for the purpose of seeing if ConnMan is available without
27
// initializing everything the derived/full class needs.
28
class
QConnManInterfaceBase
:
public
QDBusAbstractInterface
29
{
30
Q_OBJECT
31
public
:
32
explicit
QConnManInterfaceBase
(
QObject
*
parent
=
nullptr
);
33
~
QConnManInterfaceBase
() =
default
;
34
35
static
bool
connmanAvailable
();
36
37
private
:
38
Q_DISABLE_COPY_MOVE
(
QConnManInterfaceBase
)
39
};
40
41
class
QConnManInterface
final
:
public
QConnManInterfaceBase
42
{
43
Q_OBJECT
44
45
public
:
46
explicit
QConnManInterface
(
QObject
*
parent
=
nullptr
);
47
~
QConnManInterface
();
48
49
void
setBackend
(
QConnManNetworkInformationBackend
*ourBackend);
50
51
QString
state
()
const
;
52
QString
type
()
const
;
53
54
bool
isValid
()
const
{
return
QDBusAbstractInterface::isValid() && validDBusConnection; }
55
56
private
Q_SLOTS
:
57
void
propertyChanged
(
const
QString
&
name
,
const
QDBusVariant
&
value
);
58
59
private
:
60
Q_DISABLE_COPY_MOVE
(
QConnManInterface
)
61
QString
findServiceType
();
62
63
QConnManNetworkInformationBackend
*backend =
nullptr
;
64
bool
validDBusConnection =
true
;
65
QString m_state;
66
QString m_type;
67
};
68
69
QT_END_NAMESPACE
70
71
#
endif
QConnManInterfaceBase
Definition
qconnmanservice.h:29
QConnManInterfaceBase::connmanAvailable
static bool connmanAvailable()
Definition
qconnmanservice.cpp:45
QConnManInterfaceBase::~QConnManInterfaceBase
~QConnManInterfaceBase()=default
QConnManInterface::state
QString state() const
Definition
qconnmanservice.cpp:83
QConnManInterface::type
QString type() const
Definition
qconnmanservice.cpp:88
QConnManInterface::~QConnManInterface
~QConnManInterface()
Definition
qconnmanservice.cpp:76
QConnManInterface::setBackend
void setBackend(QConnManNetworkInformationBackend *ourBackend)
Definition
qconnmanservice.cpp:93
QConnManInterface::isValid
bool isValid() const
Definition
qconnmanservice.h:54
QConnManInterface::QConnManInterface
QConnManInterface(QObject *parent=nullptr)
Definition
qconnmanservice.cpp:50
QConnManNetworkInformationBackendFactory
Definition
qconnmannetworkinformationbackend.cpp:57
QConnManNetworkInformationBackendFactory::~QConnManNetworkInformationBackendFactory
~QConnManNetworkInformationBackendFactory()=default
QConnManNetworkInformationBackendFactory::create
QNetworkInformationBackend * create(QNetworkInformation::Features requiredFeatures) const override
Create and return an instance of QNetworkInformationBackend.
Definition
qconnmannetworkinformationbackend.cpp:73
QConnManNetworkInformationBackendFactory::name
QString name() const override
Backend name, return the same in QNetworkInformationBackend::name().
Definition
qconnmannetworkinformationbackend.cpp:64
QConnManNetworkInformationBackendFactory::featuresSupported
QNetworkInformation::Features featuresSupported() const override
Features supported, return the same in QNetworkInformationBackend::featuresSupported().
Definition
qconnmannetworkinformationbackend.cpp:65
QConnManNetworkInformationBackend
Definition
qconnmannetworkinformationbackend.h:25
QConnManNetworkInformationBackend::featuresSupportedStatic
static QNetworkInformation::Features featuresSupportedStatic()
Definition
qconnmannetworkinformationbackend.h:39
QConnManNetworkInformationBackend::onStateChanged
void onStateChanged(const QString &state)
Definition
qconnmannetworkinformationbackend.cpp:98
QConnManNetworkInformationBackend::~QConnManNetworkInformationBackend
~QConnManNetworkInformationBackend()=default
QConnManNetworkInformationBackend::onTypeChanged
void onTypeChanged(const QString &type)
Definition
qconnmannetworkinformationbackend.cpp:105
QConnManNetworkInformationBackend::name
QString name() const override
Backend name, return the same in QNetworkInformationBackendFactory::name().
Definition
qconnmannetworkinformationbackend.cpp:51
QConnManNetworkInformationBackend::isValid
bool isValid() const
Definition
qconnmannetworkinformationbackend.h:45
QConnManNetworkInformationBackend::featuresSupported
QNetworkInformation::Features featuresSupported() const override
Features supported, return the same in QNetworkInformationBackendFactory::featuresSupported().
Definition
qconnmannetworkinformationbackend.h:32
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
backendName
static QString backendName()
Definition
qconnmannetworkinformationbackend.cpp:46
qtbase
src
plugins
networkinformation
connman
qconnmanservice.h
Generated on
for Qt by
1.18.0