test suite failure - more detail ...

Olivier Andrieu oliv__a at users.sourceforge.net
Sat Apr 17 11:18:51 EST 2004


 Havoc Pennington [Tue, 13 Apr 2004]:
 > On Tue, 2004-04-13 at 13:55, Havoc Pennington wrote:
 > > On Tue, 2004-04-13 at 08:10, Olivier Andrieu wrote:
 > > > 
 > > > Yes, except dbus_gproxy_new_for_service_owner doesn't do
 > > > anything right now and I'n not sure how it should be
 > > > implemented. The documentation mentions "making a round-trip
 > > > request to the message bus to get the current service owner" ;
 > > > but what message should the client send ? shouldn't there be
 > > > some standardized message for this ?
 > > 
 > > Basically the bus should support a method GetServiceOwner I think.
 > > 
 > To clarify a bit more, a round trip may not always be required;
 > the client should have a set of services that it's tracking the
 > owner for.  When it adds a service to this set, it has to query
 > with GetServiceOwner (or alternately, it may know because it itself
 > is the current owner).  After that, it can track the owner async by
 > listening for owner change signals.

Hmm, currently the client is not able to do this. There are four
service-related signals: ServiceCreated, ServiceDeleted,
ServiceAcquired and ServiceLost. The former two are broadcasted, the
latter two are only directed to the concerned application.

When an owner change occurs, the former owner gets a ServiceLost
signal, the new one a ServiceAcquired but the others apps on the bus
are not signaled. So there is no owner change signal. Besides, these
signals do not carry any information about the owner base service and
that's what we need here.

The specification has a FIXME about this:
,----
| instead of ServiceLost/ServiceCreated going only to a specific app,
| why not just OwnerChanged that covers both lost and created and
| changed owner and deleted
`----

So maybe we could replace ServiceCreated/ServiceDeleted by a single
signal, broadcasted, and carrying more information: 

 ServiceInfo (UINT32 flags, STRING service_name, STRING owner_base_service)
 flags:
   0x0 -> service created
   0x1 -> owner changed
   0x2 -> service deleted

Alternatively, we could add a field in ServiceCreated and add a new 
signal:

 ServiceCreated      (STRING service_name, STRING owner_base_service)
 ServiceDeleted      (STRING service_name)
 ServiceOwnerChanged (STRING service_name, STRING new_owner_base_service)

ServiceAcquired and ServiceLost would stay as is.

Comments ?

-- 
   Olivier



More information about the dbus mailing list