terminalsecurity/SCP/SCPTimestampPlugin/src/SCPTimestampPlugin.cpp
branchRCL_3
changeset 24 13d7c31c74e0
parent 19 696f5dd11939
child 25 b183ec05bd8c
equal deleted inserted replaced
23:4af31167ea77 24:13d7c31c74e0
    24 #include <SCPTimestampPluginLang.rsg>
    24 #include <SCPTimestampPluginLang.rsg>
    25 #include "SCP_IDs.h"
    25 #include "SCP_IDs.h"
    26 #include <bautils.h>
    26 #include <bautils.h>
    27 #include <hal.h>
    27 #include <hal.h>
    28 #include <AknGlobalNote.h>
    28 #include <AknGlobalNote.h>
    29 #include <AknGlobalConfirmationQuery.h>
       
    30 // For wipe
    29 // For wipe
    31 //#include <StarterClient.h>
    30 //#include <StarterClient.h>
    32 //#include <sysutil.h>
    31 //#include <sysutil.h>
    33 //#include <SysLangUtil.h>
    32 //#include <SysLangUtil.h>
    34 //#include <rfsClient.h>
    33 //#include <rfsClient.h>
   581          ( ( iExpiration > 0 ) ||  ( expireNow ) ) )
   580          ( ( iExpiration > 0 ) ||  ( expireNow ) ) )
   582         {                    
   581         {                    
   583         if ( ( IsAfter( KSCPLastChangeTime, iExpiration, KSCPTypeDays ) == KSCPIsAfter ) ||
   582         if ( ( IsAfter( KSCPLastChangeTime, iExpiration, KSCPTypeDays ) == KSCPIsAfter ) ||
   584              ( expireNow ) )
   583              ( expireNow ) )
   585             {
   584             {
   586             // Force password change                        
       
   587             
       
   588             HBufC16* resText = NULL;
       
   589             TRAPD( err, resText = LoadResourceL( R_SET_SEC_CODE_AGING ) );         
       
   590             FormatResourceString(*resText);        
       
   591             if ( err == KErrNone ) // If this fails, go on anyway to signal the psw change
       
   592                 {
       
   593     	        TPtr16 bufDes = resText->Des();
       
   594                 
       
   595                 TRAP_IGNORE(
       
   596                     CAknGlobalNote* note = CAknGlobalNote::NewLC();
       
   597     		        note->ShowNoteL( EAknGlobalWarningNote, bufDes );
       
   598     		        CleanupStack::PopAndDestroy( note );
       
   599     		        );    	        
       
   600     	        
       
   601     	        // Wait here a while so the dialog won't appear on top of the note
       
   602                 User::After( KSCPNoteTimeout ); 
       
   603                 
       
   604                 delete resText;
       
   605                 }
       
   606             
       
   607             // Refill the parameters to inform the client that the password
   585             // Refill the parameters to inform the client that the password
   608             // should be changed.
   586             // should be changed.
   609             aRetParams = CSCPParamObject::NewL(); 
   587             aRetParams = CSCPParamObject::NewL(); 
   610             aRetParams->Set( KSCPParamAction, KSCPActionForceChange );  
   588             aRetParams->Set( KSCPParamAction, KSCPActionForceChange );  
   611             }
   589             }