[patch] addon-hid-ups.c : battery.present is mandatory for HAL spec

David Zeuthen david at fubar.dk
Tue May 10 12:58:58 PDT 2005


On Tue, 2005-05-10 at 20:56 +0100, Richard Hughes wrote:
> > Which is not really a big deal. This only gets called on the order of
> > once every 30th second per battery so...
> 
> Okay, I'll run with you with this.
> 
> Why return a double? int is good enough for seconds... 

I suppose we could return an int instead :-) - I'm just dishing out code
on the mailing list, go easy on me :-)

> Also, whats the
> *id for?

Suppose my implementation wants to store history then I need something
unique to store it under (since this function will possibly get called
for several batteries)..

> 
> > I don't really like this; it makes it more difficult to drop in another
> > implementation without having to know what a HalDevice* is... 
> 
> Working on a patch now.

Great!

Cheers,
David


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



More information about the Hal mailing list