dbus_message_new_signal parameter description
Thiago Macieira
thiago at kde.org
Mon Jan 2 13:06:55 PST 2012
On Monday, 2 de January de 2012 18.08.13, Bogdan Lotko wrote:
> Thanks for the answer,
>
> Please see my comment below
>
> On 1/2/2012 17:15, Mike Gorse wrote:
> > Signals are broadcasts and don't specify a destination--when you send
> > a signal, you aren't concerned with the foreign objects that are
> > listening for it.
>
> Yes, I know this. Exactly this is the reason why I think that the signal
> is emitted "for" foreign (listening) objects that expose according
> interface and not "from" an interface.
That's not correct. The interface of the signal is a property of the sender,
not of the receiver. In fact, the receiver doesn't even have to have an object
associated, so no interfaces actually exist.
> As I already wrote, my object that emits (broadcasts) signals also
> exposes its own interface (nothing to do with signals sent), so the
> phrase "the interface the signal is emitted from" is somehow misleading
> for me.
Please rethink, because it's quite important.
If a signal is emitted from object $OBJECT_PATH with interface $IFACE and name
$MEMBER, then if you were to introspect $OBJECT_PATH, you should find $IFACE
and the member $MEMBER inside as a signal. That is:
<interface name="$IFACE">
<signal name="$MEMBER">
<!-- parameters, if any -->
</signal>
</interface>
So the interface is the interface the signal is emitted *from*.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20120102/9f8b6569/attachment.pgp>
More information about the dbus
mailing list