hal draft spec

David Zeuthen david at fubar.dk
Sat Sep 13 15:36:12 EEST 2003


On Fri, 2003-09-12 at 19:13, Dave Malcolm wrote:
> A thought on the proposal:
> 
> Flat vs hierarchical
> --------------------
> Currently there is a single list of all devices attached to the system. 
> Perhaps devices should form a hierarchy: 
> 	- a connectivity hierarchy, with a "root" device representing the
> motherboard, with CPU and memory attached, and buses coming off it etc
> 	- a category hierarchy: with "All devices" at the root, with
> subcategories such as "Storage Devices", "Joysticks" etc
> 

This is how WinXP does it. AFAIK they even map the USB topology with
hubs correctly which is a nice little detail.

> Rather than querying all devices and have device added/removed
> messages,  you query for the root device, query the children of a
> device, and get child added/removed messages for a particular node in
> the hierarchy.
> 
> The category hierarchy could be generated from the physical hierarchy
> inside libhal.
> 

Yes - both are just views of different topologies. But we should
definately have tree-iterators in libhal for different views at some 
point.

> Or is this just an unnecessary complication?
> 

I guess one way to do it would be to introduce a PhysicalParent property
of a device that hal_hotplug (though inspection using libhal) would compute
and set. That would of cource require representation of virtual hubs as
Device objects, but maybe that is not a big problem. Maybe it would even
make sense.

Btw, let me use this opportunity to announce that I have published a
modified HTML-version of the spec. I hope to have a final version 0.1 of
the spec available soon (no earlier than late next week unfortunatly) so
I can get back to coding. Comments are welcome.

The URL for the project page is http://pdx.freedesktop.org/~hal/

Regards,
David






More information about the xdg mailing list