Michael 'Mickey' Lauer mickey at
Thu May 13 08:42:49 PDT 2010

Am Donnerstag, den 13.05.2010, 15:21 +0200 schrieb Lennart Poettering:
> > But I don't like giving people the ability to search for an interface. That 
> > will lead to bad client code instead.
> Will it? It won't!

> The interface parameter is necessary simply because this is what most
> existing services currently implement. Example: in PA we have GetSinks()
> and GetSources(), both of which return their specific kind of object.
> systemd I have something similar (GetUnits() and GetJobs()), and CK too
> (GetSessions() and GetSeats()) and udisks has something similar too
> (EnumerateAdapters, EnumerateDevices, EnumeratePorts, ...). It's simply
> how things work: if you want access to an object you need to know its
> type in advance, because otherwise you have little use for it. (with the
> exception of pure introspection tools like d-feet, which are however
> only good for debugging)
> What would be bad design is if we don't have this interface parameter:
> because then you would get a list of objects where you don't know the
> types. So you'd first have to introspect it, parse XML and then figure
> out which interface it supports so that you can actually make use
> of. And if it doesn't have any interface you speak you'd have to drop it
> again.

I fully agree. This enumeration proposal is great, since it enables us
to move all our per-app enumeration clones back to where it belongs.



More information about the dbus mailing list