webengine/wrtharvester/src/wrtharvesterpsnotifier.cpp
branchRCL_3
changeset 35 1f3c3f2f5b0a
parent 28 d39add9822e2
child 36 c711bdda59f4
--- a/webengine/wrtharvester/src/wrtharvesterpsnotifier.cpp	Fri Mar 12 15:48:51 2010 +0200
+++ b/webengine/wrtharvester/src/wrtharvesterpsnotifier.cpp	Mon Mar 15 12:44:50 2010 +0200
@@ -20,6 +20,7 @@
 #include "wrtharvester.h"
 #include <UikonInternalPSKeys.h>//For MMC Observing
 #include <usbmsshared.h>//For USB monitor
+#include <startupdomainpskeys.h> // For shutdown observer
 
 // ============================ MEMBER FUNCTIONS =============================
 
@@ -90,6 +91,10 @@
         {
         User::LeaveIfError( iProperty.Attach( KUsbMsDriveState_Category,EUsbMsDriveState_DriveStatus ));
         }    	
+    else if( iKey == EWidgetSystemShutdown )
+        {
+        User::LeaveIfError( iProperty.Attach( KPSUidStartup,KPSGlobalSystemState  ));
+        }    	
     else
     	{
     	User::LeaveIfError( iProperty.Attach( KPropertyCat, iKey));
@@ -131,7 +136,10 @@
     TUsbMsDrivesStatus allDrivesStatus;
     if( iKey != EWidgetMMCAltered && iKey != EWidgetMassStorageMode )
     	{
-    	iProperty.Get( KPropertyCat, iKey, value );	
+    		if (iKey == EWidgetSystemShutdown)
+    	        GetValue( value);
+    	    else
+    	        iProperty.Get( KPropertyCat, iKey, value );	
     	}    
     else
         {        
@@ -164,6 +172,10 @@
                 } 	
             iHarvester->UpdateL();
             }
+		else if( iKey == EWidgetSystemShutdown && value == ESwStateShuttingDown  )
+            {
+             iHarvester->SetSystemShutdown(ETrue);
+            }
         }
     }