how to check if hal is ready

Peter v/d Heide double-oh-viper at dynamicc-welding.biz
Mon May 15 07:36:55 PDT 2006


double-oh-viper wrote:

> double-oh-viper wrote:
>
>>
>>>>> like "info.scan_state" property, with values 'in_progress' and
>>>>> 'done'.
>>>>
>>>>
>> This would be indeed a great solution to our problem.
>
>
> Should I file this missing feature as a bug or is it already work in
> progress?

Hello,

what's the state of this problem at the moment? I'm very curious.

Best regards,

>
>>>> If so, it would be also possible to have a callback, like
>>>> libhal_rescan_complete(). The ideal solution would be something
>>>> like libhal_device_scan_complete(), but ...
>>>
>>>
>>> You're thinking in terms of libhal again... Libhal is just a
>>> wrapper. If there is such a property, you simply subscribe to
>>> "PropertyModified" signal, whatever D-BUS binding or wrapper library
>>> you're using.
>>>
>>>>> free to scan or not scan for volumes whenever it feels like, or
>>>>> depending on runtime conditions known only to HAL.
>>>>
>>>>
>>>> Can you explain to me the last two lines? I mean, why would it be a
>>>> problem to eg invoke a signal to a user (ie through LibHal) after the
>>>> probing/searching for volumes has finished?
>>>
>>>
>>> We could add a signal for that, but we could instead add a property
>>> and use the existing "PropertyModified" signal. Less code change
>>> that way.
>>>
>>>> I noticed that in hald/blockdev.c
>>>
>>>
>>> hald/linux2/blockdev.c, actually., which is critical: I'm not
>>> talking about Linux-specific implementation, I'm talking about HAL
>>> in general.
>>>
>>>> I guess this is what you mean. After that,
>>>> blockdev_callouts_add_done()
>>>> is called and the device is removed from the TDL and added to the GDL.
>>>
>>>
>>> That's what happens in the Linux backend. In general, device is
>>> added to GDL after all pre-probe (info.callouts.preprobe), probe and
>>> add (info.callouts.add) callouts are finished.
>>>
>>>> So when a volume is added, that's a separate hotplug event?
>>>
>>>
>>> Depends on HAL implementation, but it doesn't matter ("hotplug
>>> events" in the Linux backend are not really what they sound like).
>>> What matters is that when a volume is added, that's a separate HAL
>>> device object and a separate "DeviceAdded" signal.
>>>
>>> -Artem.
>>> _______________________________________________
>>> hal mailing list
>>> hal at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/hal
>>>
>>
>>------------------------------------------------------------------------
>>
>>_______________________________________________
>>hal mailing list
>>hal at lists.freedesktop.org
>>http://lists.freedesktop.org/mailman/listinfo/hal
>>  
>>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>hal mailing list
>hal at lists.freedesktop.org
>http://lists.freedesktop.org/mailman/listinfo/hal
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/hal/attachments/20060515/98329e6d/attachment.html


More information about the hal mailing list