[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-dbus
Subject:    Re: Targetted signals
From:       Ross Burton <ross () burtonini ! com>
Date:       2006-06-13 15:20:48
Message-ID: 1150212047.28366.57.camel () localhost ! localdomain
[Download RAW message or body]

On Tue, 2006-06-13 at 16:08 +0100, Ross Burton wrote:
> I'd really like it if signals could be send to specific addresses.  My
> use-case is the DBus port of evolution-data-server.  When a live book
> view is updated a signal needs to be sent to interested parties, but as
> there can be multiple book views with different queries and the message
> arguments can be large (up to 40 vcards), restricting the sending of the
> signals to only the relevant clients would be a good idea.  At the
> moment the server calls methods on the server, but this causes a method
> return to be sent, which is not required.
> 
> The alternative would be for each signal to have an ID argument and
> clients filter on arg1=cookie, but argument matching is currently string
> only.  If this were extended to ints then that might be a usable design.

Another alternative means I can't use the GLib bindings in the client to
receive the signals, but this works:

asprintf (&match,
            "type='signal', interface='com.burtonini', member='SignalTest', destination='%s'", 
            dbus_bus_get_unique_name (connection));
dbus_bus_add_match (connection, match, NULL);

I'm still torn over if this is really sick, or a cunning solution.

Ross
-- 
Ross Burton                                 mail: ross@burtonini.com
                                          jabber: ross@burtonini.com
                                     www: http://www.burtonini.com./
 PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic