Framework Professional Edition Package


org.mbs.services.powermon
Interface PowerMonitor


public interface PowerMonitor

Use this interface to monitor the power state .

Author:
Teodor Todorov , Hristo Stanchev

Method Summary
 PowerStatus getPowerStatus()
          Returns the power status of the system.
 void setBatteryLevelConstants(byte flag, int percentage)
          Use this method to set battery flag constants: BATTERY_HIGH, BATTERY_LOW, BATTERY_CRITICAL.
 

Method Detail

getPowerStatus

PowerStatus getPowerStatus()
Returns the power status of the system. Null is returned if an error occurred in native library.

Returns:

setBatteryLevelConstants

void setBatteryLevelConstants(byte flag,
                              int percentage)
Use this method to set battery flag constants: BATTERY_HIGH, BATTERY_LOW, BATTERY_CRITICAL. For example battery flag becomes BATTERY_LOW when battery is 20% and BATTERY_CRITICAL when battery is 5%. In Windows this flag is managed by OS.

Parameters:
flag -
percentage -

Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved