1// Copyright (C) 2016 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
4#ifndef QDBUSVIRTUALOBJECT_H
5#define QDBUSVIRTUALOBJECT_H
6
7#include <QtDBus/qtdbusglobal.h>
8#include <QtCore/qstring.h>
9#include <QtCore/qobject.h>
10
11#ifndef QT_NO_DBUS
12
13QT_BEGIN_NAMESPACE
14
15
16class QDBusMessage;
17class QDBusConnection;
18
19class Q_DBUS_EXPORT QDBusVirtualObject : public QObject
20{
21 Q_OBJECT
22public:
23 explicit QDBusVirtualObject(QObject *parent = nullptr);
24 virtual ~QDBusVirtualObject();
25
26 virtual QString introspect(const QString &path) const = 0;
27 virtual bool handleMessage(const QDBusMessage &message, const QDBusConnection &connection) = 0;
28
29private:
30 Q_DISABLE_COPY(QDBusVirtualObject)
31};
32
33QT_END_NAMESPACE
34
35#endif // QT_NO_DBUS
36#endif
37

source code of qtbase/src/dbus/qdbusvirtualobject.h