Using multiple matches for d-bus signals

Soh Kam Yung sohkamyung at gmail.com
Fri Oct 24 00:40:13 PDT 2008


Should I use multiple dbus_bus_add_match()es when it comes to signals?

Suppose I have multiple d-bus clients that want to listen for one or
more d-bus signals that may come from multiple d-bus application
servers.  Should each app do this:

dbus_bus_add_match (dbus_connection,
    "type='signal',"
    "interface='my.test.[interface-to-match]'", &error);

where [interface-to-match] depends on which d-bus server to listen to
for signals ("interface1", "interface2", ...).  Each app may use
dbus_bus_add_match() multiple times.

Or should each app just do:

dbus_bus_add_match (dbus_connection,
    "type='signal'", &error);

And then go through the received messages, searching for the expected signal(s)?

Or should I consider using a single app that will listen to all d-bus
signals, interpret and dispatch the signals to other apps via some
other method?

Regards,
Kam-Yung
-- 
Soh Kam Yung
my Google Reader Shared links:
(http://www.google.com/reader/shared/16851815156817689753)
my Google Reader Shared SFAS links:
(http://www.google.com/reader/shared/user/16851815156817689753/label/sfas)


More information about the dbus mailing list