About DBUS signals

Thiago Macieira thiago at kde.org
Tue Oct 17 05:06:41 PDT 2006


Sumit Jain wrote:
>I tell the DBUS system that i am interested in receiving a signal by
> first creating a proxy to the remote object and then doing a add
> followed by connect signal. I hope i am correct till here.

We're handling two different levels here.

If we look at the low-level, you tell D-Bus that you're interested in a 
signal by adding a match rule.

If we look at the high-level, you tell D-Bus that you're interested in a 
signal by creating a proxy and connecting the signal to a callback 
function.

>Here is something that i am not able to comprehend. What does the remote
>object do, so that the callback that i registered using
>dbus_g_proxy_connect_signal is called???

It emits the signal (in the low-level: it sends a message to D-Bus of 
type "signal" and no destination).

>What i mean to say is that how 
> does the DBUS system know that the signal has been emitted by the
> remote object and it needs to broadcast. There must be some API like
> dbus_signal_send or something similar.

There's dbus_message_new_signal, followed by one of the 
dbus_connection_send* functions.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    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: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20061017/e23381a5/attachment.pgp


More information about the dbus mailing list