diff -r e863583e6720 -r c23bdf5a328a eapol/eapol_framework/eapol_symbian/am/eap_notifier/src/eap_auth_notifier.cpp --- a/eapol/eapol_framework/eapol_symbian/am/eap_notifier/src/eap_auth_notifier.cpp Fri Sep 17 08:30:11 2010 +0300 +++ b/eapol/eapol_framework/eapol_symbian/am/eap_notifier/src/eap_auth_notifier.cpp Mon Oct 04 00:19:54 2010 +0300 @@ -17,7 +17,7 @@ */ /* -* %version: 21 % +* %version: 24 % */ // System include files @@ -43,6 +43,7 @@ _LIT( KEaptype, "eaptype"); _LIT( KMessage, "messagetxt"); _LIT( KFastprovwaitnote, "notificationtxt"); +_LIT( KPwdcorrectness, "pwdcorrectind"); _LIT(KTypeunamepwddlg, "com.nokia.eap.usernamepassworddialog/1.0"); _LIT(KTypepwdquerydlg, "com.nokia.eap.passwordquerydialog/1.0"); @@ -541,8 +542,62 @@ iEapInfo->iOldPassword = aPasswordInfo.iOldPassword; RDebug::Print(_L("CEapAuthNotifier::SetSelectedOldPassword: iEapInfo->iOldPassword = %S\n"), &iEapInfo->iOldPassword ); } + +// --------------------------------------------------------------------------- +// Check if password match +// --------------------------------------------------------------------------- +// +TBool CEapAuthNotifier::CheckPasswordMatchingL ( TEapDialogInfo& aPasswordInfo ) + { + RDebug::Print(_L("CEapAuthNotifier::CheckPasswordMatchingL")); + + TBool match(EFalse); + + TRAPD(err, match = iClient.IsMasterKeyAndPasswordMatchingL(aPasswordInfo.iPassword)); + + RDebug::Print(_L("CEapAuthNotifier::CheckPasswordMatchingL: trap returned err = %d\n"), err ); + + return match; + } // --------------------------------------------------------------------------- +// Update device dialog parameters +// --------------------------------------------------------------------------- +// +void CEapAuthNotifier::UpdateDialogL( TBool aIsPwdCorrect ) + { + RDebug::Print(_L("CEapAuthNotifier::UpdateDialogL: ENTERING")); + + TInt error; + + //The variant map is needed to update the dialog parameters + CHbSymbianVariantMap* map = CHbSymbianVariantMap::NewL(); + CleanupStack::PushL( map ); + + TBuf key(KPwdcorrectness); + + CHbSymbianVariant *variant = NULL; + + //Create the variant data information for the plugin + variant = + CHbSymbianVariant::NewL ( + &aIsPwdCorrect, CHbSymbianVariant::EBool ); + CleanupStack::PushL( variant ); + error = map->Add( key, variant); + User::LeaveIfError( error ); + CleanupStack::Pop( variant ); // map's cleanup sequence handles variant. + + //Update the dialog. + error = iDialog->Update( *map ); + + User::LeaveIfError( error ); + CleanupStack::PopAndDestroy( map ); + + RDebug::Print(_L("CEapAuthNotifier::UpdateDialogL: LEAVING") ); + + } + +// --------------------------------------------------------------------------- // The notifier is complete // --------------------------------------------------------------------------- //