setting sender on signals

Seth Nickell
26 Sep 2003 03:21:34 -0700

Maybe I'm jumping into the pot too early, so if signals aren't expected
to be working now, I'll just wait until later. Sorry to be a pest :-P

My understanding of signals atm is that you add a filter to your
connection, call it signal_filter_func(), using
dbus_connection_add_filter(). Then you call dbus_bus_add_match() on a
rule string (not really documented AFAICT, but I just copied glib stuff
here), say

So far so good. The client side seems to work. And the server side works
insomuch as I can broadcast signals and the client side sees them.

But I can't figure out how to send signals *as* a particular service. In
particular, when I create a new Message of type MESSAGE_TYPE_SIGNAL and
send it, it looks like this: "signal
interface=org.designfu.SignalInterface; member=HelloWorld; sender=:1-17"

The sender isn't filled in with the name of the service that I
registered using dbus_bus_acquire_service, say
"org.designfu.SomeService". So then I try to manually call
dbus_message_set_sender("org.designfu.SomeService") on the signal
message before sending it. At this point DBus sends me a Disconnect
signal and the game is over :-(

Any ideas what I'm doing wrong?