Hal.Manager question

David Zeuthen david at fubar.dk
Sun Mar 14 20:55:50 EET 2004


On Fri, 2004-03-12 at 12:47, owen.fraser-green at pro.no wrote:
> HI,
> 
> Looking through the HAL spec at the org.freedesktop.Hal.Manager D-BUS
> interface spec I was wondering why the GetAllDevices, FindDeviceStringMatch
> and FindDeviceByCapability methods all return array{string}. Since the
> strings are UDIs and a UDI is an object path wouldn't it have made more
> sense for those methods to have returned array{object_path}?
> 

Right; we should probably change that in the spec. I'll make a note to
change it when 0.3.0 is ready (I only update the spec and announce
releases for 0.x.0 releases)

> As far as using the D-BUS C API is concerned the difference is only cosmetic
> but for bindings which can marshal object_paths into real object references
> this would surely make a little more sense (especially while the method is
> called GetAllDevices and not GetAllDeviceUDIs).
> 

Yes, some bindings might do that given some information on what
interface to the object you're interested it. The Python bindings
doesn't work that way currently, e.g. you have to do

 d = hal_service.get_object(some_udi, "org.freedesktop.Hal.Device")

to get the reference.

Cheers,
David





More information about the xdg mailing list