xref: /illumos-gate/usr/src/cmd/hal/hald/util_pm.h (revision 55fea89d)
118c2aff7Sartem /***************************************************************************
218c2aff7Sartem  * CVSID: $Id$
318c2aff7Sartem  *
418c2aff7Sartem  * util_pm.h - Various Powermanagement related  utilities
518c2aff7Sartem  *
618c2aff7Sartem  * Copyright (C) 2005 Richard Hughes <richard@hughsie.com>
718c2aff7Sartem  * Copyright (C) 2005 Danny Kukawka <danny.kukawka@web.de>
818c2aff7Sartem  *
918c2aff7Sartem  * Licensed under the Academic Free License version 2.1
1018c2aff7Sartem  *
1118c2aff7Sartem  * This program is free software; you can redistribute it and/or modify
1218c2aff7Sartem  * it under the terms of the GNU General Public License as published by
1318c2aff7Sartem  * the Free Software Foundation; either version 2 of the License, or
1418c2aff7Sartem  * (at your option) any later version.
1518c2aff7Sartem  *
1618c2aff7Sartem  * This program is distributed in the hope that it will be useful,
1718c2aff7Sartem  * but WITHOUT ANY WARRANTY; without even the implied warranty of
1818c2aff7Sartem  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1918c2aff7Sartem  * GNU General Public License for more details.
2018c2aff7Sartem  *
2118c2aff7Sartem  * You should have received a copy of the GNU General Public License
2218c2aff7Sartem  * along with this program; if not, write to the Free Software
2318c2aff7Sartem  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
2418c2aff7Sartem  *
2518c2aff7Sartem  **************************************************************************/
2618c2aff7Sartem 
2718c2aff7Sartem #ifndef UTIL_PM_H
2818c2aff7Sartem #define UTIL_PM_H
2918c2aff7Sartem 
3018c2aff7Sartem const char *util_get_battery_technology (const char *type);
3118c2aff7Sartem 
32*55fea89dSDan Cross int util_compute_time_remaining (const char *id, int chargeRate, int chargeLevel, int chargeLastFull,
3318c2aff7Sartem 				 gboolean isDischarging, gboolean isCharging, gboolean guessChargeRate);
3418c2aff7Sartem 
3518c2aff7Sartem int util_compute_percentage_charge (const char *id, int chargeLevel, int chargeLastFull);
3618c2aff7Sartem 
3718c2aff7Sartem #endif /* UTIL__PM_H */
38