int power_osx::get_power_percent_left() { if (UpdatePowerInfo()) { return percent_left; } else { return -1; } }
int power_osx::get_power_seconds_left() { if (UpdatePowerInfo()) { return nsecs_left; } else { return -1; } }
OS::PowerState power_osx::get_power_state() { if (UpdatePowerInfo()) { return power_state; } else { return OS::POWERSTATE_UNKNOWN; } }
int PowerJavascript::get_power_percent_left() { if (UpdatePowerInfo()) { return percent_left; } else { WARN_PRINT("Power management is not implemented on this platform, defaulting to -1"); return -1; } }
PowerState PowerJavascript::get_power_state() { if (UpdatePowerInfo()) { return power_state; } else { WARN_PRINT("Power management is not implemented on this platform, defaulting to POWERSTATE_UNKNOWN"); return POWERSTATE_UNKNOWN; } }
int PowerBB10::get_power_seconds_left() { if (UpdatePowerInfo()) { return nsecs_left; } else { WARN_PRINT("Power management is not implemented on this platform, defaulting to -1"); return -1; } }