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#include "qdbusvirtualobject.h"
5
6#ifndef QT_NO_DBUS
7
8QT_BEGIN_NAMESPACE
9
10/*!
11 Constructs a QDBusVirtualObject with \a parent.
12*/
13QDBusVirtualObject::QDBusVirtualObject(QObject *parent) :
14 QObject(parent)
15{
16}
17
18/*!
19 Destroys the object, deleting all of its child objects.
20*/
21QDBusVirtualObject::~QDBusVirtualObject()
22{
23}
24
25QT_END_NAMESPACE
26
27#include "moc_qdbusvirtualobject.cpp"
28
29/*!
30 \class QDBusVirtualObject
31 \inmodule QtDBus
32 \since 5.1
33
34 \brief The QDBusVirtualObject class is used to handle several DBus paths with one class.
35*/
36
37/*!
38 \fn bool QDBusVirtualObject::handleMessage(const QDBusMessage &message, const QDBusConnection &connection) = 0
39
40 This function needs to handle all messages to the path of the
41 virtual object, when the SubPath option is specified.
42 The service, path, interface and methods are all part of the \a message.
43 Parameter \a connection is the connection handle.
44 Must return \c true when the message is handled, otherwise \c false (will generate dbus error message).
45*/
46
47
48/*!
49 \fn QString QDBusVirtualObject::introspect(const QString &path) const
50
51 This function needs to handle the introspection of the
52 virtual object on \a path. It must return xml of the form:
53
54 \code
55<interface name="org.qtproject.QtDBus.MyObject" >
56 <property access="readwrite" type="i" name="prop1" />
57</interface>
58 \endcode
59
60 If you pass the SubPath option, this introspection has to include all child nodes.
61 Otherwise QDBus handles the introspection of the child nodes.
62*/
63
64#endif // QT_NO_DBUS
65

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