How to know when D-Bus interfaces and methods are available
Thiago Macieira
thiago at kde.org
Wed Aug 5 14:43:00 BST 2009
Em Quarta-feira 05 Agosto 2009, às 10:09:40, Kevin Krammer escreveu:
> How about creating a QDBusInterface without specifying an object path and
> let the adapter emit a signal with the object path. Then creating a
> QDBusInterface for that specific object.
You can't create a QDBusInterface without object path. QDBusInterface requires
a running and existing object when it's created so that it may introspect.
You must use an interface generated by qdbusxml2cpp to use it without object
paths. You can also use it without service names. This kind of interface
cannot be used for calling, but it can be used to connecting to signals.
So your object could emit a signal when it's ready to be used. The target
application would then receive it and create the QDBusAbstractInterface with
service and object path.
If you already know the service and object path though, you can use
QDBusAbstractInterface directly, even if the object doesn't exist yet. You
just have to be careful about making calls.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Software
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090805/ddbf374c/attachment.sig>
More information about the kde-core-devel
mailing list