Scope and Using devices

Kristian Høgsberg krh at bitplanet.net
Fri May 28 12:55:24 PDT 2004


Joe Shaw wrote:
> Hi,
...

>>So my position have since pretty much been leave that to libraries.
>>
>>Now, granted, some aspects of using devices involves OS-dependent
>>things that may involve system-level policy and root-access and it
>>would be such a pain if desktop applications need to call stuff like
>>console-helper to get the job done. Like the whole thing that started
>>the thread with setting ESSID.
> 
> 
> Not to mention that even within Linux there can be different platforms
> for doing something.  Take ALSA and OSS for example.  It seems very lame
> to me as a library or application developer to be able to get
> "sound.volume" from HAL but then have to use some system-dependent way
> to set it.  Not to mention error prone.  And if I have to do this work
> anyway, what's the real advantage of having an abstraction layer?
> 
> So if the primary scope of HAL is device discovery, that's fine and I'm
> cool with that.  But if we're using it to get specific properties of
> that hardware, like block volume labels or wireless settings, I think it
> makes sense to also set them, or else it's not that useful to many
> library and app developers.

I guess I'm just confused about wether you think HAL should expose the 
full functionality of the device or just "convenient" features.  Full 
functionality is  not feasible though ... you could send audio sample 
data through HAL, but you can't mount 
/org/freedesktop/Hal/devices/block_3_5 ;-).  At some point the client 
needs to access the device file or use a helper library like iwlib.

So if HAL is not the minimal discovery framework, and if we can not 
fully abstract away the devices, then what is HAL?  Something blurry in 
between?

I think read only properties make sense in the device-discovery-only 
case: the reason HAL should provide properties is for the purpose of 
selecting the right device.  For examlpe,  In this case I think it makes 
sense that you can read them but not set them.

Kristian


_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list