05fc3aef53
Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
73 lines
2.1 KiB
C++
73 lines
2.1 KiB
C++
// Copyright (C) 2016 The Qt Company Ltd.
|
|
// Copyright (C) 2016 Intel Corporation.
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
|
|
|
//
|
|
// W A R N I N G
|
|
// -------------
|
|
//
|
|
// This file is not part of the public API. This header file may
|
|
// change from version to version without notice, or even be
|
|
// removed.
|
|
//
|
|
// We mean it.
|
|
//
|
|
//
|
|
|
|
#ifndef QDBUSABSTRACTINTERFACE_P_H
|
|
#define QDBUSABSTRACTINTERFACE_P_H
|
|
|
|
#include <QtDBus/private/qtdbusglobal_p.h>
|
|
#include <qdbusabstractinterface.h>
|
|
#include <qdbusconnection.h>
|
|
#include <qdbuserror.h>
|
|
#include "qdbusconnection_p.h"
|
|
#include "private/qobject_p.h"
|
|
|
|
#define ANNOTATION_NO_WAIT "org.freedesktop.DBus.Method.NoReply"
|
|
|
|
#ifndef QT_NO_DBUS
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
class QDBusAbstractInterfacePrivate : public QObjectPrivate
|
|
{
|
|
public:
|
|
Q_DECLARE_PUBLIC(QDBusAbstractInterface)
|
|
|
|
mutable QDBusConnection connection; // mutable because we want to make calls from const functions
|
|
QString service;
|
|
QString currentOwner;
|
|
QString path;
|
|
QString interface;
|
|
mutable QDBusError lastError;
|
|
int timeout;
|
|
|
|
// this is set during creation and never changed
|
|
// it can't be const because QDBusInterfacePrivate has one more check
|
|
bool isValid;
|
|
|
|
QDBusAbstractInterfacePrivate(const QString &serv, const QString &p,
|
|
const QString &iface, const QDBusConnection& con, bool dynamic);
|
|
virtual ~QDBusAbstractInterfacePrivate() { }
|
|
void initOwnerTracking();
|
|
bool canMakeCalls() const;
|
|
|
|
// these functions do not check if the property is valid
|
|
bool property(const QMetaProperty &mp, void *returnValuePtr) const;
|
|
bool setProperty(const QMetaProperty &mp, const QVariant &value);
|
|
|
|
// return conn's d pointer
|
|
inline QDBusConnectionPrivate *connectionPrivate() const
|
|
{ return QDBusConnectionPrivate::d(connection); }
|
|
|
|
void _q_serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner);
|
|
|
|
static void finishDisconnectNotify(QDBusAbstractInterface *iface, int signalId);
|
|
};
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
#endif // QT_NO_DBUS
|
|
#endif
|