sysresmonitoring/oodmonitor/oodmonitor2/src/outofdiskmonitor.cpp
branchRCL_3
changeset 4 d440d4c7e9b4
parent 0 2e3d3ce01487
child 6 a72ff4214918
--- a/sysresmonitoring/oodmonitor/oodmonitor2/src/outofdiskmonitor.cpp	Mon Mar 15 12:41:10 2010 +0200
+++ b/sysresmonitoring/oodmonitor/oodmonitor2/src/outofdiskmonitor.cpp	Wed Mar 31 21:49:52 2010 +0300
@@ -107,18 +107,22 @@
     CRepository* repository( NULL );
     TInt warningThreshold(0);
     TInt criticalThreshold(0);
+    TInt warningThresholdMassMemory(0);
     TRAPD( err, repository = CRepository::NewL( KCRUidUiklaf ) );
     if ( err == KErrNone )
         {
         err = repository->Get(KUikOODDiskFreeSpaceWarningNoteLevel, warningThreshold);
         err = repository->Get(KUikOODDiskCriticalThreshold, criticalThreshold);
+        err = repository->Get(KUikOODDiskFreeSpaceWarningNoteLevelMassMemory, warningThresholdMassMemory);
         }
     delete repository;
     iOODWarningThreshold = warningThreshold;
     iOODCriticalThreshold = criticalThreshold;
+    iOODWarningThresholdMassMemory = warningThresholdMassMemory;
     
-	TRACES1("COutOfDiskMonitor::ConstructL: Warning threshold: %d percent",iOODWarningThreshold);
+	TRACES1("COutOfDiskMonitor::ConstructL: Warning threshold Phone Memory: %d percent",iOODWarningThreshold);
     TRACES1("COutOfDiskMonitor::ConstructL: Critical threshold: %ld bytes",iOODCriticalThreshold);
+    TRACES1("COutOfDiskMonitor::ConstructL: Warning threshold Mass Memory: %ld bytes",iOODWarningThresholdMassMemory);
     
     iOutOfDiskNotifyObserver = COutOfDiskNotifyObserver::NewL( this, iFs );
     TRACES("COutOfDiskMonitor::ConstructL: End");
@@ -208,8 +212,16 @@
         TRACES1("COutOfDiskMonitor::GetThreshold: Volume size: %ld",volSize);		
 		if ( ret == KErrNone )
 			{
-			TRACES1("COutOfDiskMonitor::GetThreshold: Warning threshold: Used disk space %d percent",iOODWarningThreshold);
-			threshold = ((volSize*(100-iOODWarningThreshold))/100);		
+			if(aDrive == EDriveC)
+			    {
+                TRACES1("COutOfDiskMonitor::GetThreshold: Warning threshold Phone Memory: Used disk space %d percent",iOODWarningThreshold);
+                threshold = ((volSize*(100-iOODWarningThreshold))/100);
+			    }
+			else
+			    {
+                TRACES1("COutOfDiskMonitor::GetThreshold: Warning threshold Mass Memory: %ld bytes",iOODWarningThresholdMassMemory);
+			    threshold = iOODWarningThresholdMassMemory;			                
+			    }
 			}
         }
     else if (aLevel == DISK_SPACE_CRITICAL)