webengine/wrtharvester/src/wrtharvesterpsnotifier.cpp
branchRCL_3
changeset 35 1f3c3f2f5b0a
parent 28 d39add9822e2
child 36 c711bdda59f4
equal deleted inserted replaced
34:220a17280356 35:1f3c3f2f5b0a
    18 
    18 
    19 #include "wrtharvesterpsnotifier.h"
    19 #include "wrtharvesterpsnotifier.h"
    20 #include "wrtharvester.h"
    20 #include "wrtharvester.h"
    21 #include <UikonInternalPSKeys.h>//For MMC Observing
    21 #include <UikonInternalPSKeys.h>//For MMC Observing
    22 #include <usbmsshared.h>//For USB monitor
    22 #include <usbmsshared.h>//For USB monitor
       
    23 #include <startupdomainpskeys.h> // For shutdown observer
    23 
    24 
    24 // ============================ MEMBER FUNCTIONS =============================
    25 // ============================ MEMBER FUNCTIONS =============================
    25 
    26 
    26 // ---------------------------------------------------------------------------
    27 // ---------------------------------------------------------------------------
    27 // Creates an instance of CCHPluginNotifier implementation
    28 // Creates an instance of CCHPluginNotifier implementation
    88 		}
    89 		}
    89     else if( iKey == EWidgetMassStorageMode )
    90     else if( iKey == EWidgetMassStorageMode )
    90         {
    91         {
    91         User::LeaveIfError( iProperty.Attach( KUsbMsDriveState_Category,EUsbMsDriveState_DriveStatus ));
    92         User::LeaveIfError( iProperty.Attach( KUsbMsDriveState_Category,EUsbMsDriveState_DriveStatus ));
    92         }    	
    93         }    	
       
    94     else if( iKey == EWidgetSystemShutdown )
       
    95         {
       
    96         User::LeaveIfError( iProperty.Attach( KPSUidStartup,KPSGlobalSystemState  ));
       
    97         }    	
    93     else
    98     else
    94     	{
    99     	{
    95     	User::LeaveIfError( iProperty.Attach( KPropertyCat, iKey));
   100     	User::LeaveIfError( iProperty.Attach( KPropertyCat, iKey));
    96    	 	}
   101    	 	}
    97     
   102     
   129     TInt value( 0 );
   134     TInt value( 0 );
   130     TInt r (KErrNone);
   135     TInt r (KErrNone);
   131     TUsbMsDrivesStatus allDrivesStatus;
   136     TUsbMsDrivesStatus allDrivesStatus;
   132     if( iKey != EWidgetMMCAltered && iKey != EWidgetMassStorageMode )
   137     if( iKey != EWidgetMMCAltered && iKey != EWidgetMassStorageMode )
   133     	{
   138     	{
   134     	iProperty.Get( KPropertyCat, iKey, value );	
   139     		if (iKey == EWidgetSystemShutdown)
       
   140     	        GetValue( value);
       
   141     	    else
       
   142     	        iProperty.Get( KPropertyCat, iKey, value );	
   135     	}    
   143     	}    
   136     else
   144     else
   137         {        
   145         {        
   138         r = iProperty.Get( allDrivesStatus );
   146         r = iProperty.Get( allDrivesStatus );
   139         }
   147         }
   162             	{
   170             	{
   163             	iHarvester->SetRegistryAccess(ETrue);
   171             	iHarvester->SetRegistryAccess(ETrue);
   164                 } 	
   172                 } 	
   165             iHarvester->UpdateL();
   173             iHarvester->UpdateL();
   166             }
   174             }
       
   175 		else if( iKey == EWidgetSystemShutdown && value == ESwStateShuttingDown  )
       
   176             {
       
   177              iHarvester->SetSystemShutdown(ETrue);
       
   178             }
   167         }
   179         }
   168     }
   180     }
   169 
   181 
   170 // ---------------------------------------------------------------------------
   182 // ---------------------------------------------------------------------------
   171 // CCHPluginNotifier::RunError
   183 // CCHPluginNotifier::RunError