diff options
author | Daniele E. Domenichelli <daniele.domenichelli@gmail.com> | 2012-06-21 18:41:27 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-22 16:35:13 (GMT) |
commit | 97a4843c61a4f0829f4b18dec2b98c51a3d67ab2 (patch) | |
tree | a77141f10281266683c070efdfb2a8fed7833b6c | |
parent | 77ef7e616d262db8f346150ce8ad54a09dfab259 (diff) | |
download | Qt-97a4843c61a4f0829f4b18dec2b98c51a3d67ab2.zip Qt-97a4843c61a4f0829f4b18dec2b98c51a3d67ab2.tar.gz Qt-97a4843c61a4f0829f4b18dec2b98c51a3d67ab2.tar.bz2 |
qtdbus: Export org.freedesktop.DBus.Peer interface when introspected
The ofD.Peer interface is automatically implemented when an object is
registered on DBus, but the ofD.Introspectable.Introspect method does
not show it.
You can test it by running
$ qdbus --literal <some service> <some object> \
> org.freedesktop.DBus.Peer.Ping
$ qdbus --literal <some service> <some object> \
> org.freedesktop.DBus.Peer.GetMachineId
Change-Id: I7062ba0cdae486d443011ee19cf3874aabf90205
(cherry picked from commit 7767eed7d678dbd51d3857e6d8353f249ab5487a)
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/dbus/qdbusinternalfilters.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dbus/qdbusinternalfilters.cpp b/src/dbus/qdbusinternalfilters.cpp index 58f079b..f734458 100644 --- a/src/dbus/qdbusinternalfilters.cpp +++ b/src/dbus/qdbusinternalfilters.cpp @@ -92,6 +92,14 @@ static const char propertiesInterfaceXml[] = " </method>\n" " </interface>\n"; +static const char peerInterfaceXml[] = + " <interface name=\"org.freedesktop.DBus.Peer\">\n" + " <method name=\"Ping\"/>\n" + " <method name=\"GetMachineId\">\n" + " <arg name=\"machine_uuid\" type=\"s\" direction=\"out\"/>\n" + " </method>\n" + " </interface>\n"; + static QString generateSubObjectXml(QObject *object) { QString retval; @@ -165,6 +173,7 @@ QString qDBusIntrospectObject(const QDBusConnectionPrivate::ObjectTreeNode &node } xml_data += QLatin1String( introspectableInterfaceXml ); + xml_data += QLatin1String( peerInterfaceXml ); if (node.flags & QDBusConnection::ExportChildObjects) { xml_data += generateSubObjectXml(node.obj); |