acpi updates
Richard Hughes
ee21rh at surrey.ac.uk
Tue Feb 1 10:47:27 PST 2005
On Tue, 01 Feb 2005 12:27:05 -0500, David Zeuthen wrote:
> Perhaps it would also make sense to add the method Rescan()
> on the org.freedesktop.Hal.Device interface? This would
> effectively poll the underlying devices for changes and
> update the properties on the device object accordingly.
Sounds like a plan.
> Surely, most device objects would just throw an exception
> since it doesn't make sense for them, but it would be useful
> for "big state changes" like when a battery is removed.
Hmm... I see where you are going, but un-plugging the ac_adaptor is going
to cause mass rescan and lots of hard-disk and processor... No?
> Here's a more concrete example: for ACPI batteries, the
> addon would listen to /proc/acpi/event (or whatever) and
> just update the battery.charge_level.current when the
> battery is charging/discharging.
See my example code.
> But when the battery is removed, or added, the addon would
> invoke Rescan() and the existing code clears/sets all the
> battery.* properties except for battery.is_present which
> would be set to FALSE/TRUE. PMU would do something similar
> I suppose.
Hmmm. I guess...
> Without a feature like this we would need to duplicate
> code in both the daemon/probing and the addon listening
> to /dev/pmu or /proc/acpi/event or whatever.
I figured we could link into acpi.c from the addon...
> Makes sense?
Yes, I'm really pleased this is progressing so quickly.
Richard.
--
http://www.hughsie.com/PUBLIC-KEY
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list