locationmanager/locationtrail/src/clocationrecord.cpp
branchRCL_3
changeset 12 9f21bab39f42
parent 8 50de4d668bb6
child 19 b73252188534
--- a/locationmanager/locationtrail/src/clocationrecord.cpp	Tue Apr 27 17:05:23 2010 +0300
+++ b/locationmanager/locationtrail/src/clocationrecord.cpp	Tue May 11 16:36:55 2010 +0300
@@ -27,6 +27,7 @@
 #include "locationtrailpskeys.h"
 #include "mdeconstants.h"
 #include <centralrepository.h>
+#include <hwrmpowerstatesdkpskeys.h>
 
 
 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