From: Grover, A. <and...@in...> - 2002-04-04 18:43:54
|
> From: Sebastian Stein [mailto:s5...@in...] > Ok, I have tested the latest ospmd package and tried the Qt > GUI as well. I > want to write a small app to show me the current battery load and the > remaining time as small symbols in the kde taskbar. I thought > about querying > the /proc/acpi files in a loop to get the current state. Lets > say I check the > files one time per second. At this point I do something wrong > I think, > because I don't use the ospmd. But why should I use the ospmd? Well actually the existence of a daemon is an implementation detail. The thing applet developers should care about is libpower. (which is currently called ospm_gui_lib in the ospmd tar, but that will change.) It's an abstraction layer. The benefits are, every applet doesn't have to re-implement the nasty proc parsing code, AND your applet will work, regardless of whether APM, ACPI, or some other PM interface is present. In addition, you are insulated from /proc interface changes, and you get better cross-platform portability. For now, you're not doing anything wrong because the libpower interface is not ready for prime time. Right now there's one function which all pm calls go through, but I think a finer granularity would be better. But in the future, I would think using it will make it easier on everyone to get power-related information. > And there is another thing. On the net I found a daemon called acpid > (http://acpid.sourceforge.net/). I think it is doing the very > same as ospmd. > It was developed by Andrew Grover, Tim Hockin and Cajus Pollmeier. > Wouldn't it be a good thing to ask the people to join > development of ospmd, > to use their ideas as well and get a better daemon? This is mentioned in ospmd's README. ospmd is a development vehicle at the moment. I fully intend to roll acpid's cool features into it. Isn't open source nice? Regards -- Andy PS Just to be clear acpid was originally written by Andy Henroid, and further enhanced by Tim and Cajus -- I really didn't do anything w.r.t. it. |