Implementing org.freedesktop.DBus.ObjectManager with Qt-DBus
-
wrote on 14 Aug 2015, 12:57 last edited by clementvuchener
Hello.
I want to create a DBus object implementing org.freedesktop.DBus.ObjectManager to expose its child objects. I did not find any example/explanation in the documentation (or in the web). What is the simplest way to do that?
ShouldQDBusConnection::ExportChildObjects
do that? I don't really understand how it is used.
Or should I create an adaptor for this interface? In this case, I need to introspect my objects in order to get theirs interfaces and properties. How is it achieved?Edit: I found that I had to use
QObject::setObjectName
withQDBusConnection::ExportChildObjects
. Now, the child object is created but the parent stil does not implement the ObjectManager interface. -
wrote on 15 Aug 2015, 10:08 last edited by
I guess I will need to go the second way but how can I know the interfaces implemented by an object. I can found no introspection mechanism either server side or client side.
On the server, do I need to explore the QMetaObject system myself and hope that get the information the same way as QtDBus?
On the client, do I need to call directly org.freedesktop.DBus.Introspectable.Instrospect and write my own Introspection XML parser?
1/2