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
qdbusabstractinterface_p.h
Go to the documentation of this file.
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>
26#include "private/qobject_p.h"
27
28#define ANNOTATION_NO_WAIT "org.freedesktop.DBus.Method.NoReply"
29
30#ifndef QT_NO_DBUS
31
33
35{
36public:
37 Q_DECLARE_PUBLIC(QDBusAbstractInterface)
38
39 mutable QDBusConnection connection; // mutable because we want to make calls from const functions
44 mutable QDBusError lastError;
47
48 // this is set during creation and never changed
49 // it can't be const because QDBusInterfacePrivate has one more check
50 bool isValid;
51
52 QDBusAbstractInterfacePrivate(const QString &serv, const QString &p,
53 const QString &iface, const QDBusConnection& con, bool dynamic);
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 { 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
71QT_END_NAMESPACE
72
73#endif // QT_NO_DBUS
74#endif
static void finishDisconnectNotify(QDBusAbstractInterface *iface, int signalId)
QDBusAbstractInterfacePrivate(const QString &serv, const QString &p, const QString &iface, const QDBusConnection &con, bool dynamic)
bool setProperty(const QMetaProperty &mp, const QVariant &value)
QDBusConnectionPrivate * connectionPrivate() const
bool property(const QMetaProperty &mp, void *returnValuePtr) const
void _q_serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner)
\inmodule QtDBus
static void setParametersValidated(QDBusMessage &msg, bool enable)
#define DBUS_INTERFACE_PROPERTIES
\inmodule QtDBus
Definition qdbusutil_p.h:33
@ EmptyNotAllowed
Definition qdbusutil_p.h:60
static QDBusError checkIfValid(const QString &service, const QString &path, const QString &interface, bool isDynamic, bool isPeer)
#define qPrintable(string)
Definition qstring.h:1685
#define QStringLiteral(str)
Definition qstring.h:1826