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 | |
13 | QT_BEGIN_NAMESPACE |
14 | |
15 | |
16 | class QDBusMessage; |
17 | class QDBusConnection; |
18 | |
19 | class Q_DBUS_EXPORT QDBusVirtualObject : public QObject |
20 | { |
21 | Q_OBJECT |
22 | public: |
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 | |
29 | private: |
30 | Q_DISABLE_COPY(QDBusVirtualObject) |
31 | }; |
32 | |
33 | QT_END_NAMESPACE |
34 | |
35 | #endif // QT_NO_DBUS |
36 | #endif |
37 | |