[PATCH v3 0/4] Implement ServicesAdded and ServicesRemoved

Marcel Holtmann marcel at holtmann.org
Mon Feb 27 01:08:41 PST 2012

Hi Patrik,

> On Sat, 2012-02-25 at 18:02 +0100, Daniel Wagner wrote:
> > the ServicesAdded array does not containn 'old' servces. According the
> > documentation this array should contain all services in the right
> > order.
> That's a good point. First the document says:
> "...The array is a list of services that is sorted with existing
> services containing an empty dictionary and new services containing the
> properties."
> But then it says:
> "This signal will only inform about added services...", which after a
> third reading probably intends to refer to the difference of "added" vs.
> "removed" signals if the first part is to be true as well.
> Darn, this is rather confusing.

it is actually simple, but you need to look at it from a work flow of
the client application.

The goal is that the client, can remove no longer existing services and
we don't have to worry about them anymore. So ServicesRemoved will
always be send before ServiceAdded. That is a simplification for the
client to not have to compare the lists to find the ones that are no
longer present.

So yes, ServiceAdded only contains current existing and new services. It
does not directly inform about removed services. That would be only
implicit by the fact that all valid services are included. And if a
service is not in this list, it is no longer valid.



More information about the connman mailing list