Coverage Report

Created: 2026-05-31 06:50

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/qtbase/src/dbus/qdbusabstractinterface_p.h
Line
Count
Source
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// Copyright (C) 2016 Intel Corporation.
3
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
// Qt-Security score:significant reason:default
5
6
//
7
//  W A R N I N G
8
//  -------------
9
//
10
// This file is not part of the public API.  This header file may
11
// change from version to version without notice, or even be
12
// removed.
13
//
14
// We mean it.
15
//
16
//
17
18
#ifndef QDBUSABSTRACTINTERFACE_P_H
19
#define QDBUSABSTRACTINTERFACE_P_H
20
21
#include <QtDBus/private/qtdbusglobal_p.h>
22
#include <qdbusabstractinterface.h>
23
#include <qdbusconnection.h>
24
#include <qdbuserror.h>
25
#include "qdbusconnection_p.h"
26
#include "private/qobject_p.h"
27
28
0
#define ANNOTATION_NO_WAIT      "org.freedesktop.DBus.Method.NoReply"
29
30
#ifndef QT_NO_DBUS
31
32
QT_BEGIN_NAMESPACE
33
34
class QDBusAbstractInterfacePrivate : public QObjectPrivate
35
{
36
public:
37
0
    Q_DECLARE_PUBLIC(QDBusAbstractInterface)
Unexecuted instantiation: QDBusAbstractInterfacePrivate::q_func() const
Unexecuted instantiation: QDBusAbstractInterfacePrivate::q_func()
38
0
39
0
    mutable QDBusConnection connection; // mutable because we want to make calls from const functions
40
0
    QString service;
41
0
    QString currentOwner;
42
0
    QString path;
43
0
    QString interface;
44
0
    mutable QDBusError lastError;
45
0
    int timeout;
46
0
    bool interactiveAuthorizationAllowed;
47
0
48
0
    // this is set during creation and never changed
49
0
    // it can't be const because QDBusInterfacePrivate has one more check
50
0
    bool isValid;
51
0
52
0
    QDBusAbstractInterfacePrivate(const QString &serv, const QString &p,
53
0
                                  const QString &iface, const QDBusConnection& con, bool dynamic);
54
0
    virtual ~QDBusAbstractInterfacePrivate() { }
55
    void initOwnerTracking();
56
    bool canMakeCalls() const;
57
58
    // these functions do not check if the property is valid
59
    bool property(const QMetaProperty &mp, void *returnValuePtr) const;
60
    bool setProperty(const QMetaProperty &mp, const QVariant &value);
61
62
    // return conn's d pointer
63
    inline QDBusConnectionPrivate *connectionPrivate() const
64
0
    { return QDBusConnectionPrivate::d(connection); }
65
66
    void _q_serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner);
67
68
    static void finishDisconnectNotify(QDBusAbstractInterface *iface, int signalId);
69
};
70
71
QT_END_NAMESPACE
72
73
#endif // QT_NO_DBUS
74
#endif