diff -r 33ae025ac1e8 -r 8e4539ab1889 locationmanager/locationtrail/src/clocationrecord.cpp --- a/locationmanager/locationtrail/src/clocationrecord.cpp Mon May 03 12:55:01 2010 +0300 +++ b/locationmanager/locationtrail/src/clocationrecord.cpp Fri May 14 16:17:23 2010 +0300 @@ -27,6 +27,7 @@ #include "locationtrailpskeys.h" #include "mdeconstants.h" #include +#include using namespace MdeConstants; @@ -1118,4 +1119,23 @@ return iRemapper->ItemsInQueue(); } +EXPORT_C TBool CLocationRecord::IsLowBattery() + { + LOG("CLocationRecord::IsLowBattery()"); + RProperty batteryProperty; + TInt batteryStatus; + + TInt error = batteryProperty.Get(KPSUidHWRMPowerState, KHWRMBatteryStatus, batteryStatus); + LOG1("CLocationRecord::IsLowBattery() - battery status %d", batteryStatus ); + if( error != KErrNone || batteryStatus == EBatteryStatusOk ) + { + return EFalse; + } + else + { + return ETrue; + } + + } + // End of file