On 2007-09-14 01:18:33 +0200 David Chisnall <[EMAIL PROTECTED]> wrote:

> On 13 Sep 2007, at 23:42, David Chisnall wrote:
> 
>> - It seems to be Linux-only.  Étoilé is a cross-platform project, and
>> there is no abstraction layer between the Linux-specific code and the
>> rest, which will make this very difficult to port to other
>> platforms.  Take a look at Etoile/Services/Private/MenuServer/
>> Subprojects/AboutEtoileEntry/ETMachineInfo* for a clean way of doing
>> this.  This class provides info about the amount of real memory and
>> the CPU model / speed, and works on Linux, FreeBSD, OpenBSD, Darwin
>> and Solaris.
> 
> I have added two methods to ETMachineInfo:
> 
> + (unsigned int) batteryLife;
> + (unsigned char) batteryPercent;
> + (BOOL) isUsingMains;
> 
> These return the number of minutes remaining on battery, the  percentage of 
> battery life remaining, and whether the machine is on  mains power.  I have 
> added code to the FreeBSD category on this class  which implements this 
> method.  I suggest this class be moved into  EtoileFoundation (or some other 
> sensible framework), where it can be  used by anything that needs to, and 
> support be added for other  operating systems as people use them.
> 
> Thoughts?
I will take a look next week and see how to fill in the Linux part (if noone 
else does inbetween :-)

Andreas

-- 
Mail: aheppel at web dot de
Home: http://www.andreasheppel.de
Burn.app: http://gsburn.sourceforge.net

PGP Key is available from the MIT key server (pgp.mit.edu).
RFC3156 defines security multipart formats for MIME with OpenPGP.

Attachment: pgp1njnCzDreb.pgp
Description: PGP signature

_______________________________________________
Etoile-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-discuss

Répondre à