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> |
29 #include <AknGlobalConfirmationQuery.h> |
30 // For wipe |
30 // For wipe |
31 #include <starterclient.h> |
31 //#include <StarterClient.h> |
32 #include <sysutil.h> |
32 //#include <sysutil.h> |
33 #include <syslangutil.h> |
33 //#include <SysLangUtil.h> |
34 #include <rfsClient.h> |
34 //#include <rfsClient.h> |
35 #include "DMUtilClient.h" |
35 //#include "DMUtilClient.h" |
36 |
36 |
37 #include "SCPTimestampPlugin.h" |
37 #include "SCPTimestampPlugin.h" |
38 #include <featmgr.h> |
38 #include <featmgr.h> |
39 #ifdef RD_MULTIPLE_DRIVE |
39 //#ifdef RD_MULTIPLE_DRIVE |
40 #include <driveinfo.h> |
40 //#include <DriveInfo.h> |
41 #include <pathinfo.h> |
41 //#include <PathInfo.h> |
42 #include <f32file.h> |
42 //#include <f32file.h> |
43 #endif //RD_MULTIPLE_DRIVEs |
43 //#endif //RD_MULTIPLE_DRIVEs |
44 // CONSTANTS |
44 // CONSTANTS |
45 |
45 |
46 // ============================= LOCAL FUNCTIONS ============================= |
46 // ============================= LOCAL FUNCTIONS ============================= |
47 |
47 |
48 |
48 |
502 else |
506 else |
503 { |
507 { |
504 // Failed authentication attempt |
508 // Failed authentication attempt |
505 if ( iMaxAttempts > 0 ) |
509 if ( iMaxAttempts > 0 ) |
506 { |
510 { |
|
511 Dprint( (_L("CSCPTimestampPlugin::iMaxAttempts > 0") )); |
507 TInt failedCount = 0; |
512 TInt failedCount = 0; |
508 iConfiguration->Get( KSCPFailedAttempts, failedCount ); // ignore errors |
513 iConfiguration->Get( KSCPFailedAttempts, failedCount ); // ignore errors |
509 failedCount++; |
514 failedCount++; |
510 |
515 |
511 if ( failedCount == iMaxAttempts - 1 ) |
516 if ( failedCount == iMaxAttempts - 1 ) |
512 { |
517 { |
513 // Warn the user. Only one attempt left. There's no use handling the error |
518 // Warn the user. Only one attempt left. There's no use handling the error |
514 // so we'll just stay silent at this point on failure. |
519 // so we'll just stay silent at this point on failure. |
515 TRAP_IGNORE( |
520 Dprint( (_L("CSCPTimestampPlugin::One Attempt Left") )); |
516 HBufC16* resText = NULL; |
521 HBufC16* resText = NULL; |
517 resText = LoadResourceL( R_SET_SEC_CODE_WARNING_ATTEMPTS_LEFT ); |
522 resText = LoadResourceL( R_SET_SEC_CODE_WARNING_ATTEMPTS_LEFT ); |
518 FormatResourceString(*resText); |
523 FormatResourceString(*resText); |
519 CleanupStack::PushL( resText ); |
524 // Call the dialog from an ActiveObj framework so that we could give control back to secui |
520 |
525 Dprint( (_L("CSCPTimestampPlugin::start actv obj for dialog") )); |
521 TPtr16 bufDes = resText->Des(); |
526 iUserInfo->StartL(*resText); |
522 |
|
523 CAknGlobalConfirmationQuery* note = CAknGlobalConfirmationQuery::NewLC(); |
|
524 |
|
525 TRequestStatus status; |
|
526 note->ShowConfirmationQueryL(status, |
|
527 bufDes, |
|
528 R_AVKON_SOFTKEYS_OK_EMPTY, |
|
529 R_QGN_NOTE_WARNING_ANIM ); |
|
530 User::WaitForRequest( status ); |
|
531 |
|
532 CleanupStack::PopAndDestroy( note ); |
|
533 |
|
534 CleanupStack::PopAndDestroy( resText ); |
|
535 ); |
|
536 } |
527 } |
537 else if ( failedCount >= iMaxAttempts ) |
528 else if ( failedCount >= iMaxAttempts ) |
538 { |
529 { |
539 // Try to wipe the device |
530 // Try to wipe the device |
540 TRAPD( err, WipeDeviceL( aRetParams ) ); |
531 TRAPD( err, WipeDeviceL( aRetParams ) ); |
950 } |
944 } |
951 |
945 |
952 if ( ret != KErrNone ) |
946 if ( ret != KErrNone ) |
953 { |
947 { |
954 Dprint( ( _L( "CSCPPatternPlugin::WipeDeviceL(): Rfs FAILED: %d"), ret ) ); |
948 Dprint( ( _L( "CSCPPatternPlugin::WipeDeviceL(): Rfs FAILED: %d"), ret ) ); |
955 } |
949 } */ |
|
950 Dprint( (_L("CSCPTimestampPlugin::~WipeDeviceL") )); |
956 } |
951 } |
957 |
952 |
958 // ---------------------------------------------------------------------------- |
953 // ---------------------------------------------------------------------------- |
959 // CSCPTimestampPlugin::ReadConfiguration() |
954 // CSCPTimestampPlugin::ReadConfiguration() |
960 // |
955 // |