setting sender on signals

Seth Nickell seth@gnome.org
26 Sep 2003 13:10:01 -0700


On Fri, 2003-09-26 at 06:38, Havoc Pennington wrote:
> On Fri, 2003-09-26 at 06:21, Seth Nickell wrote:
> > 
> > But I can't figure out how to send signals *as* a particular service.
> 
> You don't do that. The origin service is filled in by the bus and is
> always the base service (the unique name for the app starting with a
> colon).

"mommy, that's not fair, org.freedesktop.DBus gets to send out signals
as coming from a nice service name" ;-)

Is set_sender an internal detail of DBusMessage then
not-for-use-by-clients? Or is there some other situation where this is
legit?

If I do a call to message.set_sender(some_service_name), wouldn't it be
reasonably easy for the bus to be fine with that as long as the
base_service for my connection has acquired some_service_name?

> > The sender isn't filled in with the name of the service that I
> > registered using dbus_bus_acquire_service, say
> > "org.designfu.SomeService".
> 
> It can't be, because you could own 3 dozen services.
> 
> Think of the services as a way to locate an app, not as an interface or
> object reference.

Right, but that's why you want to filter on it: you want to say "tell me
when app blah sends a signal". Otherwise this is a somewhat onerous task
involving, as you list above, every client independently tracking
service ownership changes. Perhaps it would be nice to have
org.freedesktop.DBus.GetServicesOwnedBy(base_service) ?

-Seth