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