# HG changeset patch # User hgs # Date 1279797339 -10800 # Node ID 61986511a9c805e799a4b3fcc4b9640af956ab4a # Parent f1030a78d563546adf6df1a1e7adef5981ad8d9f 201029_02 diff -r f1030a78d563 -r 61986511a9c8 pkiutilities/CTSecurityDialogs/Group/CTSecDialogImpl.mmp --- a/pkiutilities/CTSecurityDialogs/Group/CTSecDialogImpl.mmp Thu Jul 08 20:04:36 2010 +0300 +++ b/pkiutilities/CTSecurityDialogs/Group/CTSecDialogImpl.mmp Thu Jul 22 14:15:39 2010 +0300 @@ -59,15 +59,15 @@ SOURCE DllMain.cpp SOURCE CTSecuritydialognotifier.cpp -SOURCE CTpinquerydialog.cpp -SOURCE CTQueryDialog.cpp -SOURCE CTSigntextdialog.cpp -SOURCE CTSelectcertificatedialog.cpp -SOURCE CTPinPinQueryDialog.cpp +//SOURCE CTpinquerydialog.cpp +//SOURCE CTQueryDialog.cpp +//SOURCE CTSigntextdialog.cpp +//SOURCE CTSelectcertificatedialog.cpp +//SOURCE CTPinPinQueryDialog.cpp SOURCE CTCertificateQuery.cpp SOURCE CTSecurityDialogsAO.cpp SOURCE CTUntrustedCertQuery.cpp -SOURCE CTInvalidCertNote.cpp +//SOURCE CTInvalidCertNote.cpp LIBRARY EUSER.LIB LIBRARY EIKSRV.LIB diff -r f1030a78d563 -r 61986511a9c8 pkiutilities/CTSecurityDialogs/Group/bld.inf --- a/pkiutilities/CTSecurityDialogs/Group/bld.inf Thu Jul 08 20:04:36 2010 +0300 +++ b/pkiutilities/CTSecurityDialogs/Group/bld.inf Thu Jul 22 14:15:39 2010 +0300 @@ -27,7 +27,8 @@ PRJ_MMPFILES CTSecDialogImpl.mmp -CTSecDlgNotifier.mmp +//TODO: remove completely, commented out to remove AVKON Notifier API dependency +//CTSecDlgNotifier.mmp #ifdef __JAVA_JSR_177_SECURITY_AND_TRUST_SERVICES CTSecDlgs.mmp #endif diff -r f1030a78d563 -r 61986511a9c8 pkiutilities/CTSecurityDialogs/NotifInc/CTSecurityDialogsAO.h --- a/pkiutilities/CTSecurityDialogs/NotifInc/CTSecurityDialogsAO.h Thu Jul 08 20:04:36 2010 +0300 +++ b/pkiutilities/CTSecurityDialogs/NotifInc/CTSecurityDialogsAO.h Thu Jul 22 14:15:39 2010 +0300 @@ -36,7 +36,7 @@ class CX500DistinguishedName; class MCTWritableCertStore; class CAknQueryDialog; -class CCTPinQueryDialog; +//class CCTPinQueryDialog; // CLASS DECLARATION @@ -325,8 +325,8 @@ TBool& iDeleted; - CCTPinQueryDialog* iPinQueryDialog; - TBool iPinQueryDialogDeleted; + //CCTPinQueryDialog* iPinQueryDialog; + //TBool iPinQueryDialogDeleted; }; #endif // CTSECURITYDIALOGSAO_H diff -r f1030a78d563 -r 61986511a9c8 pkiutilities/CTSecurityDialogs/NotifSrc/CTSecurityDialogsAO.cpp --- a/pkiutilities/CTSecurityDialogs/NotifSrc/CTSecurityDialogsAO.cpp Thu Jul 08 20:04:36 2010 +0300 +++ b/pkiutilities/CTSecurityDialogs/NotifSrc/CTSecurityDialogsAO.cpp Thu Jul 22 14:15:39 2010 +0300 @@ -19,17 +19,17 @@ // INCLUDE FILES #include "CTSecurityDialogsAO.h" #include "CTSecurityDialogNotifier.h" -#include "CTPinQueryDialog.h" -#include "CTSignTextDialog.h" -#include "CTSelectCertificateDialog.h" -#include "CTQueryDialog.h" -#include "CTPinPinQueryDialog.h" +//#include "CTPinQueryDialog.h" +//#include "CTSignTextDialog.h" +//#include "CTSelectCertificateDialog.h" +//#include "CTQueryDialog.h" +//#include "CTPinPinQueryDialog.h" #include "CTUntrustedCertQuery.h" -#include "CTInvalidCertNote.h" +//#include "CTInvalidCertNote.h" #include #include #include -#include +//#include #include #include #include @@ -45,6 +45,8 @@ #include #include #include +#include // CEikonEnv +#include // AknTextUtils #include "SecQueryUi.h" // needed for password dialog @@ -273,7 +275,10 @@ pinLabel.Copy( pinLabelPtr ); HBufC* text = iNotifier->LoadResourceStringLC( iOperation, pinLabel ); - CCTSignTextDialog::RunDlgLD( R_WIM_UNBLOCK_INFO_DIALOG, *text, iStatus, iRetValue ); + // TODO + //CCTSignTextDialog::RunDlgLD( R_WIM_UNBLOCK_INFO_DIALOG, *text, iStatus, iRetValue ); + User::Leave( KErrGeneral ); + CleanupStack::PopAndDestroy( text ); iStatus = KRequestPending; SetActive(); @@ -504,8 +509,10 @@ { case EUserAuthenticationText: { - CCTSignTextDialog::RunDlgLD( R_WIM_USERAUTHTEXT_DIALOG, - *textToSign, iStatus, iRetValue ); + // TODO + //CCTSignTextDialog::RunDlgLD( R_WIM_USERAUTHTEXT_DIALOG, + // *textToSign, iStatus, iRetValue ); + User::Leave( KErrGeneral ); break; } case EUserAuthentication: @@ -515,7 +522,9 @@ } case ESignText: { - CCTSignTextDialog::RunDlgLD( R_WIM_SIGNTEXT_DIALOG,*textToSign, iStatus, iRetValue ); + // TODO + //CCTSignTextDialog::RunDlgLD( R_WIM_SIGNTEXT_DIALOG,*textToSign, iStatus, iRetValue ); + User::Leave( KErrGeneral ); break; } default: @@ -576,12 +585,12 @@ HBufC* header = StringLoader::LoadLC( R_QTN_CM_HEADING_PHONE_KEYSTORE, CEikonEnv::Static() ); iPIN.iMinLength = KMaxKeystorePwLength; - DoHandleMessageL( EEnterKeyStorePw, KNullDesC, *header, - iPIN.iMinLength, iPIN.iMaxLength ); - iMultiLineDlgType = EEnterNewKeyStorePw; - CleanupStack::PopAndDestroy( header ); + DoHandleMessageL( EEnterKeyStorePw, KNullDesC, *header, + iPIN.iMinLength, iPIN.iMaxLength ); + iMultiLineDlgType = EEnterNewKeyStorePw; + CleanupStack::PopAndDestroy( header ); RunL(); - + } else if ( iPIN.iPINLabel == KKeyStoreImportKeyLabel ) { @@ -623,8 +632,10 @@ // CCTSecurityDialogsAO::DoHandleMultilinePinQueryL() // ----------------------------------------------------------------------------- // -void CCTSecurityDialogsAO::DoHandleMultilinePinQueryL( const TInt& aDlgType ) +void CCTSecurityDialogsAO::DoHandleMultilinePinQueryL( const TInt& /*aDlgType*/ ) { + // TODO +#if 0 iMultiLineDlgType = aDlgType; HBufC* dlgText1 = NULL; HBufC* dlgText2 = NULL; @@ -633,35 +644,36 @@ if ( EEnterNewKeyStorePw == dlgType ) { /* - dlgText1 = iNotifier->LoadResourceStringLC( dlgType, KNullDesC ); + dlgText1 = iNotifier->LoadResourceStringLC( dlgType, KNullDesC ); dlgText2 = iNotifier->LoadResourceStringLC( EVerifyKeyStorePw, KNullDesC ); - dlg = CCTPinPinQueryDialog::NewL( *dlgText1, *dlgText2, iPINValue2, - iPINValueVerify, iPIN.iMinLength, iPIN.iMaxLength, iRetValue ); - dlg->RunDlgLD( iStatus, R_WIM_PWPW_QUERY_DIALOG ); - CleanupStack::PopAndDestroy( 2, dlgText1 ); // dlgText1, dlgText2 + dlg = CCTPinPinQueryDialog::NewL( *dlgText1, *dlgText2, iPINValue2, + iPINValueVerify, iPIN.iMinLength, iPIN.iMaxLength, iRetValue );16:19:13.812 xti1:MCU_ASCII_PRINTF; channel:0xE0; msg:*PlatSec* ERROR - Capability check failed - Process #tlstest[e8dc94b1]0001 was checked by Thread c32exe.exe[101f7989]0001::ESock_IP and was found to be missing the capabilities: NetworkControl . + + dlg->RunDlgLD( iStatus, R_WIM_PWPW_QUERY_DIALOG ); + CleanupStack::PopAndDestroy( 2, dlgText1 ); // dlgText1, dlgText2 */ - dlgText1 = StringLoader::LoadLC( R_QTN_SN_NEW_PHONE_KEYSTORE ); - dlgText2 = StringLoader::LoadLC( R_QTN_WIM_VERIFY_PIN ); - HBufC* message = HBufC::NewLC( KMaxLengthTextCertLabelVisible ); - message->Des().Append(dlgText1->Des()); - message->Des().Append(_L("|")); - message->Des().Append(dlgText2->Des()); - CSecQueryUi* SecQueryUi = CSecQueryUi::NewL(); + dlgText1 = StringLoader::LoadLC( R_QTN_SN_NEW_PHONE_KEYSTORE ); + dlgText2 = StringLoader::LoadLC( R_QTN_WIM_VERIFY_PIN ); + HBufC* message = HBufC::NewLC( KMaxLengthTextCertLabelVisible ); + message->Des().Append(dlgText1->Des()); + message->Des().Append(_L("|")); + message->Des().Append(dlgText2->Des()); + CSecQueryUi* SecQueryUi = CSecQueryUi::NewL(); TInt queryAccepted = SecQueryUi->SecQueryDialog(message->Des(), iPINValueVerify, - iPIN.iMinLength,iPIN.iMaxLength, - ESecUiAlphaSupported | - ESecUiCancelSupported | - ESecUiSecretSupported | + iPIN.iMinLength,iPIN.iMaxLength, + ESecUiAlphaSupported | + ESecUiCancelSupported | + ESecUiSecretSupported | ESecUiEmergencyNotSupported); - iRetValue=(queryAccepted==KErrNone); - if(iRetValue) + iRetValue=(queryAccepted==KErrNone); + if(iRetValue) iPINValue2.Copy(iPINValueVerify); // dialog already does not OK with different pin codes - delete SecQueryUi; - SecQueryUi=NULL; - CleanupStack::PopAndDestroy( message ); - CleanupStack::PopAndDestroy( dlgText2 ); - CleanupStack::PopAndDestroy( dlgText1 ); - RunL(); // had to call it this way + delete SecQueryUi; + SecQueryUi=NULL; + CleanupStack::PopAndDestroy( message ); + CleanupStack::PopAndDestroy( dlgText2 ); + CleanupStack::PopAndDestroy( dlgText1 ); + RunL(); // had to call it this way } else if ( EExportKeyPw == dlgType ) { @@ -681,6 +693,8 @@ dlg->RunDlgLD( iStatus, R_WIM_PINPIN_QUERY_DIALOG ); CleanupStack::PopAndDestroy( 2, dlgText1 ); // dlgText1, dlgText2 } +#endif + User::Leave( KErrGeneral ); } // ----------------------------------------------------------------------------- @@ -700,7 +714,7 @@ TDialogTypeItem item = iNotifier->GetDialogTypeItem( dlgType ); - CAknResourceNoteDialog* dlg = NULL; + //CAknResourceNoteDialog* dlg = NULL; TInt resource = 0; @@ -708,44 +722,62 @@ { case EInfoNote: { - dlg = new ( ELeave ) CAknInformationNote( ETrue ); + // TODO + //dlg = new ( ELeave ) CAknInformationNote( ETrue ); + User::Leave( KErrGeneral ); break; } case EErrorNote: { - dlg = new ( ELeave ) CAknErrorNote( ETrue ); + // TODO + //dlg = new ( ELeave ) CAknErrorNote( ETrue ); + User::Leave( KErrGeneral ); break; } case EConfirmationNote: { - dlg = new ( ELeave ) CAknConfirmationNote( ETrue ); + // TODO + //dlg = new ( ELeave ) CAknConfirmationNote( ETrue ); + User::Leave( KErrGeneral ); break; } case EInfoDialog: { + // TODO + /* CCTQueryDialog::RunDlgLD( iStatus, iRetValue, *dlgText, item.iSoftKeyResource, ECTInfoDialog ); iStatus = KRequestPending; SetActive(); + */ + User::Leave( KErrGeneral ); break; } case EEnterPwPwDialog: { + // TODO + /* CCTPinPinQueryDialog* dialog = CCTPinPinQueryDialog::NewL( *dlgText, *dlgText, iPINValue2, iPINValueVerify, aMinLength, aMaxLength, iRetValue ); dialog->RunDlgLD( iStatus, R_WIM_PWPW_QUERY_DIALOG ); + */ + User::Leave( KErrGeneral ); break; } case EEnterPinPinCodeDialog: { + // TODO + /* CCTPinPinQueryDialog* dialog = CCTPinPinQueryDialog::NewL( *dlgText, *dlgText, iPINValue2, iPINValueVerify, aMinLength, aMaxLength, iRetValue ); dialog->RunDlgLD( iStatus, R_WIM_PINPIN_QUERY_DIALOG ); + */ + User::Leave( KErrGeneral ); break; } case EEnterPwDialog: @@ -789,9 +821,11 @@ User::Panic(_L("CSecDlgNotifier"), 0); } } - iPinQueryDialogDeleted = EFalse; + //iPinQueryDialogDeleted = EFalse; if(aDlgType!=EEnterKeyStorePw) { - CCTPinQueryDialog::RunDlgLD( iStatus, + // TODO + /* + CCTPinQueryDialog::RunDlgLD( iStatus, *dlgText, *pinValue, aMinLength, @@ -800,23 +834,26 @@ resource, iPinQueryDialog, iPinQueryDialogDeleted ); - break; + */ + User::Leave( KErrGeneral ); + resource = resource; // avoids compiler warning + break; } else { - iPIN.iMinLength = KMaxKeystorePwLength; - CSecQueryUi* SecQueryUi = CSecQueryUi::NewL(); - HBufC* header =StringLoader::LoadLC( R_QTN_SN_ENTER_PHONE_KEYSTORE); + iPIN.iMinLength = KMaxKeystorePwLength; + CSecQueryUi* SecQueryUi = CSecQueryUi::NewL(); + HBufC* header =StringLoader::LoadLC( R_QTN_SN_ENTER_PHONE_KEYSTORE); TInt queryAccepted = SecQueryUi->SecQueryDialog(header->Des(), *pinValue, - aMinLength,aMaxLength, - ESecUiAlphaSupported | - ESecUiCancelSupported | - ESecUiSecretSupported | - ESecUiEmergencyNotSupported); - delete SecQueryUi; - SecQueryUi=NULL; - iRetValue=(queryAccepted==KErrNone); - CleanupStack::PopAndDestroy( header ); + aMinLength,aMaxLength, + ESecUiAlphaSupported | + ESecUiCancelSupported | + ESecUiSecretSupported | + ESecUiEmergencyNotSupported); + delete SecQueryUi; + SecQueryUi=NULL; + iRetValue=(queryAccepted==KErrNone); + CleanupStack::PopAndDestroy( header ); break; } } @@ -826,12 +863,16 @@ } } - if ( dlg && aDlgType!=EEnterKeyStorePw) - { - - dlg->ExecuteLD( *dlgText ); - dlg = NULL; - } + // TODO + /* + if ( dlg && aDlgType!=EEnterKeyStorePw) + { + + dlg->ExecuteLD( *dlgText ); + dlg = NULL; + } + */ + User::Leave( KErrGeneral ); CleanupStack::PopAndDestroy( dlgText ); // dlgText } @@ -1498,6 +1539,7 @@ { // No certificate from Device Certificate Store. Prompt user // for certificate selection + /* CCTSelectCertificateDialog::RunDlgLD( iCertArray, iCertHandleList, iTokenHandle, iStatus, iRetValue ); // Takes ownerhip of array @@ -1505,6 +1547,8 @@ iNextStep = EOperationCompleted; iStatus = KRequestPending; SetActive(); + */ + User::Leave( KErrGeneral ); // TODO: to be implemented } } @@ -1573,7 +1617,9 @@ AddKeySizeL( messagePtr, iKeyInfo ); AddKeyLocationL( messagePtr, iKeyInfo ); - CCTSignTextDialog::RunDlgLD( R_WIM_CSR_DIALOG, *message, iStatus, iRetValue ); + // TODO + //CCTSignTextDialog::RunDlgLD( R_WIM_CSR_DIALOG, *message, iStatus, iRetValue ); + User::Leave( KErrGeneral ); CleanupStack::PopAndDestroy( message ); iStatus = KRequestPending; @@ -1634,7 +1680,10 @@ User::Panic(_L("CTestSecDlgNotifier"), 0); } } - CCTSignTextDialog::RunDlgLD( resource, *message, iStatus, iRetValue ); + // TODO + //CCTSignTextDialog::RunDlgLD( resource, *message, iStatus, iRetValue ); + User::Leave( KErrGeneral ); + resource = resource; // avoids compiler warning CleanupStack::PopAndDestroy( message ); iStatus = KRequestPending; @@ -2467,12 +2516,14 @@ void CCTSecurityDialogsAO::DoCancel() { WIMSECURITYDIALOGS_WRITE( "CCTSecurityDialogsAO::DoCancel" ); + /* if( !iPinQueryDialogDeleted ) { delete iPinQueryDialog; iPinQueryDialogDeleted = ETrue; } iPinQueryDialog = NULL; + */ // Complete message if it has not been completed earlier. if( !iMessagePtr.IsNull() ) @@ -2540,10 +2591,10 @@ { HBufC* buffer = CEikonEnv::Static()->AllocReadResourceLC( aResourceID ); CHbDeviceMessageBoxSymbian* iMessageBox = CHbDeviceMessageBoxSymbian::NewL(CHbDeviceMessageBoxSymbian::EInformation); - CleanupStack::PushL(iMessageBox); - iMessageBox->SetTextL(buffer->Des()); - iMessageBox->SetTimeout(6000); - iMessageBox->ExecL(); - CleanupStack::PopAndDestroy(iMessageBox); - CleanupStack::PopAndDestroy( buffer ); + CleanupStack::PushL(iMessageBox); + iMessageBox->SetTextL(buffer->Des()); + iMessageBox->SetTimeout(6000); + iMessageBox->ExecL(); + CleanupStack::PopAndDestroy(iMessageBox); + CleanupStack::PopAndDestroy( buffer ); } diff -r f1030a78d563 -r 61986511a9c8 pkiutilities/CertSaver/src/CertSaverModel.cpp --- a/pkiutilities/CertSaver/src/CertSaverModel.cpp Thu Jul 08 20:04:36 2010 +0300 +++ b/pkiutilities/CertSaver/src/CertSaverModel.cpp Thu Jul 22 14:15:39 2010 +0300 @@ -16,11 +16,6 @@ */ -// INCLUDE FILES -#include // Note dialogs - - - #include // For loading resource strings #include // For saving the certificates #include // For saving the certificates @@ -37,6 +32,8 @@ #include #include #include +#include // CEikonEnv +#include // AknTextUtils #include #include "CertSaverModel.h" diff -r f1030a78d563 -r 61986511a9c8 pkiutilities/CertSaver/src/certparser.cpp --- a/pkiutilities/CertSaver/src/certparser.cpp Thu Jul 08 20:04:36 2010 +0300 +++ b/pkiutilities/CertSaver/src/certparser.cpp Thu Jul 22 14:15:39 2010 +0300 @@ -28,8 +28,8 @@ #include #include #include -#include // Note dialogs text, TODO: could be removed after localization is ready #include +#include // CEikonEnv #include "certparser.h" #include "SecQueryUi.h" // needed for password dialog diff -r f1030a78d563 -r 61986511a9c8 pkiutilities/rom/CTSecurityDialogs.iby --- a/pkiutilities/rom/CTSecurityDialogs.iby Thu Jul 08 20:04:36 2010 +0300 +++ b/pkiutilities/rom/CTSecurityDialogs.iby Thu Jul 22 14:15:39 2010 +0300 @@ -27,7 +27,7 @@ file=ABI_DIR\BUILD_DIR\CTSecDialogImpl.dll SHARED_LIB_DIR\CTSecDialogImpl.dll -ECOM_PLUGIN(CTSECDLGNOTIFIER.dll, 10008D4F.rsc) +//ECOM_PLUGIN(CTSECDLGNOTIFIER.dll, 10008D4F.rsc) #endif // __CTSECURITYDIALOGS_IBY diff -r f1030a78d563 -r 61986511a9c8 securitydialogs/Autolock/Autolock.pro --- a/securitydialogs/Autolock/Autolock.pro Thu Jul 08 20:04:36 2010 +0300 +++ b/securitydialogs/Autolock/Autolock.pro Thu Jul 22 14:15:39 2010 +0300 @@ -57,6 +57,7 @@ BLD_INF_RULES.prj_exports += "./rom/Autolock.iby CORE_APP_LAYER_IBY_EXPORT_PATH(Autolock.iby)" BLD_INF_RULES.prj_exports += "./conf/Autolock.confml MW_LAYER_CONFML(Autolock.confml)" -BLD_INF_RULES.prj_exports += "./conf/CI_Autolock.confml MW_LAYER_CONFML(CI_Autolock.confml)" +# remove CI_autolock.confml because CI already exports it +# BLD_INF_RULES.prj_exports += "./conf/CI_Autolock.confml MW_LAYER_CONFML(CI_Autolock.confml)" BLD_INF_RULES.prj_exports += "./rom/AutolockSrv.iby CORE_APP_LAYER_IBY_EXPORT_PATH(AutolockSrv.iby)" BLD_INF_RULES.prj_exports += "./PubSub/SecurityUIsPrivatePSKeys.h |../../inc/securityuisprivatepskeys.h" diff -r f1030a78d563 -r 61986511a9c8 securitydialogs/Autolock/conf/CI_Autolock.confml Binary file securitydialogs/Autolock/conf/CI_Autolock.confml has changed diff -r f1030a78d563 -r 61986511a9c8 securitydialogs/SecUi/Src/SecUiManualSecuritySettings.cpp --- a/securitydialogs/SecUi/Src/SecUiManualSecuritySettings.cpp Thu Jul 08 20:04:36 2010 +0300 +++ b/securitydialogs/SecUi/Src/SecUiManualSecuritySettings.cpp Thu Jul 22 14:15:39 2010 +0300 @@ -376,8 +376,8 @@ TInt length = aLockCode.Length(); RDEBUG("length", length); - // from now on, it accepts all lenghts, because some locks are 20, others are 13 - // if(aLockCode.Length() <= KSimLockMaxPasswordSize) + // from now on, it accepts restricted lengths, although some locks are 20, others are 13 + if(aLockCode.Length() <= KSimLockMaxPasswordSize) { if (aType.CompareF(Operator) == 0) { @@ -473,8 +473,8 @@ TInt length = aUnlockCode.Length(); RDEBUG("length", length); - // from now on, it accepts all lenghts, because some locks are 20, others are 13 - // if(aUnlockCode.Length() <= KSimLockMaxPasswordSize) + // from now on, it accepts restricted lengths, although some locks are 20, others are 13 + if(aUnlockCode.Length() <= KSimLockMaxPasswordSize) { if (aType.CompareF(Operator) == 0) { diff -r f1030a78d563 -r 61986511a9c8 securitydialogs/SecUi/Src/SecUiSecurityHandler.cpp --- a/securitydialogs/SecUi/Src/SecUiSecurityHandler.cpp Thu Jul 08 20:04:36 2010 +0300 +++ b/securitydialogs/SecUi/Src/SecUiSecurityHandler.cpp Thu Jul 22 14:15:39 2010 +0300 @@ -31,10 +31,10 @@ #include // Property values #include #include -#include +// #include #include #include -#include +// #include #include #include diff -r f1030a78d563 -r 61986511a9c8 securitydialogs/Securitynotifier/Src/SecurityNotifier.cpp --- a/securitydialogs/Securitynotifier/Src/SecurityNotifier.cpp Thu Jul 08 20:04:36 2010 +0300 +++ b/securitydialogs/Securitynotifier/Src/SecurityNotifier.cpp Thu Jul 22 14:15:39 2010 +0300 @@ -34,10 +34,10 @@ #include // LOCAL CONSTANTS AND MACROS - /***************************************************** - * Series 60 Customer / TSY - * Needs customer TSY implementation - *****************************************************/ + /***************************************************** + * Series 60 Customer / TSY + * Needs customer TSY implementation + *****************************************************/ const TInt KTriesToConnectServer( 2 ); const TInt KTimeBeforeRetryingServerConnection( 50000 ); @@ -92,10 +92,10 @@ if ( scpClient.QueryAdminCmd( ESCPCommandLockPhone ) ) { #if defined(_DEBUG) - RDebug::Print(_L("CSecObsNotify::SCP admin command, no action required")); - #endif + RDebug::Print(_L("CSecObsNotify::SCP admin command, no action required")); + #endif - isAdminCall = ETrue; + isAdminCall = ETrue; } scpClient.Close(); @@ -137,7 +137,7 @@ // CSecurityNotifier::~CSecurityNotifier() { - FeatureManager::UnInitializeLib(); + FeatureManager::UnInitializeLib(); } // // ---------------------------------------------------------- @@ -158,9 +158,9 @@ // MEikSrvNotifierBase2::TNotifierInfo CSecurityNotifier::RegisterL() { - #if defined(_DEBUG) + #if defined(_DEBUG) RDebug::Print(_L("(SECURITYNOTIFIER)CSecurityNotifier::RegisterL()")); - #endif + #endif iInfo.iUid = KSecurityNotifierUid; iInfo.iChannel = KSecurityNotifierChannel; iInfo.iPriority = ENotifierPriorityHigh; @@ -174,9 +174,9 @@ // MEikSrvNotifierBase2::TNotifierInfo CSecurityNotifier::Info() const { - #if defined(_DEBUG) + #if defined(_DEBUG) RDebug::Print(_L("(SECURITYNOTIFIER)CSecurityNotifier::Info()")); - #endif + #endif return iInfo; } @@ -190,9 +190,9 @@ // TPtrC8 CSecurityNotifier::StartL(const TDesC8& /*aBuffer*/) { - #if defined(_DEBUG) + #if defined(_DEBUG) RDebug::Print(_L("(SECURITYNOTIFIER)CSecurityNotifier::StartL()")); - #endif + #endif TPtrC8 ret(KNullDesC8); return (ret); } @@ -204,9 +204,9 @@ // void CSecurityNotifier::StartL(const TDesC8& aBuffer, TInt aReturnVal,const RMessagePtr2& aMessage) { - #if defined(_DEBUG) + #if defined(_DEBUG) RDebug::Print(_L("(SECURITYNOTIFIER)CSecurityNotifier::StartL2()")); - #endif + #endif TRAPD(err, GetParamsL(aBuffer, aReturnVal, aMessage)); if (err) { @@ -225,44 +225,44 @@ // void CSecurityNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReturnVal, const RMessagePtr2& aMessage) { - #if defined(_DEBUG) - RDebug::Printf( "%s %s (%u) searching for autolock.exe =%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x0 ); - #endif - - TApaTaskList taskList( CCoeEnv::Static()->WsSession() ); - const TUid KAutolockUid = { 0x100059B5 }; - TApaTask task( taskList.FindApp( KAutolockUid ) ); - if ( !task.Exists() ) - { - #if defined(_DEBUG) - RDebug::Printf( "%s %s (%u) autolock.exe not running. Starting now=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x1 ); - #endif - RApaLsSession ls; - User::LeaveIfError(ls.Connect()); - CleanupClosePushL(ls); - - CApaCommandLine* commandLine = CApaCommandLine::NewLC(); - commandLine->SetExecutableNameL( _L("autolock.exe" ) ); - commandLine->SetCommandL( EApaCommandRun ); - - // Try to launch the application. - TInt err = ls.StartApp(*commandLine); - #if defined(_DEBUG) - RDebug::Printf( "%s %s (%u) autolock.exe err=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, err ); - #endif - - CleanupStack::PopAndDestroy(2); // commandLine, ls - } + #if defined(_DEBUG) + RDebug::Printf( "%s %s (%u) searching for autolock.exe =%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x0 ); + #endif + + TApaTaskList taskList( CCoeEnv::Static()->WsSession() ); + const TUid KAutolockUid = { 0x100059B5 }; + TApaTask task( taskList.FindApp( KAutolockUid ) ); + if ( !task.Exists() ) + { + #if defined(_DEBUG) + RDebug::Printf( "%s %s (%u) autolock.exe not running. Starting now=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x1 ); + #endif + RApaLsSession ls; + User::LeaveIfError(ls.Connect()); + CleanupClosePushL(ls); + + CApaCommandLine* commandLine = CApaCommandLine::NewLC(); + commandLine->SetExecutableNameL( _L("autolock.exe" ) ); + commandLine->SetCommandL( EApaCommandRun ); + + // Try to launch the application. + TInt err = ls.StartApp(*commandLine); + #if defined(_DEBUG) + RDebug::Printf( "%s %s (%u) autolock.exe err=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, err ); + #endif + + CleanupStack::PopAndDestroy(2); // commandLine, ls + } - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ iMessage = aMessage; iReturnVal = aReturnVal; TBool skipQuery = EFalse; // In some cases the query is handled by some other entity and SecurityNotifier should skip it. - #if defined(_DEBUG) + #if defined(_DEBUG) RDebug::Print(_L("(SECURITYNOTIFIER)CSecurityNotifier::GetParamsL() Start BEGIN")); #endif @@ -274,7 +274,7 @@ if(FeatureManager::FeatureSupported(KFeatureIdSapTerminalControlFw )) - { + { if(iEvent == RMobilePhone::EPhonePasswordRequired) { skipQuery = IsAdminCall(); // SCP handles the call. @@ -292,7 +292,7 @@ SetActive(); iStatus = KRequestPending; TRequestStatus* stat = &iStatus; - #if defined(_DEBUG) + #if defined(_DEBUG) RDebug::Print(_L("CSecurityNotifier::GetParamsL() End")); #endif User::RequestComplete(stat, KErrNone); // jump to RunL @@ -305,26 +305,26 @@ // ---------------------------------------------------------- void CSecurityNotifier::RunL() { - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ - /***************************************************** - * Series 60 Customer / TSY - * Needs customer TSY implementation - *****************************************************/ + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + /***************************************************** + * Series 60 Customer / TSY + * Needs customer TSY implementation + *****************************************************/ TInt err( KErrGeneral ); TInt thisTry( 0 ); - RTelServer::TPhoneInfo PhoneInfo; - #if defined(_DEBUG) + RTelServer::TPhoneInfo PhoneInfo; + #if defined(_DEBUG) RDebug::Print(_L("CSecurityNotifier::RunL() Start")); #endif /*All server connections are tried to be made KTriesToConnectServer times because occasional fails on connections are possible, at least on some servers*/ // connect to ETel server - #if defined(_DEBUG) + #if defined(_DEBUG) RDebug::Print(_L("CSecurityNotifier::RunL() connect to ETel server")); #endif while ( ( err = iServer.Connect() ) != KErrNone && ( thisTry++ ) <= KTriesToConnectServer ) @@ -336,11 +336,14 @@ thisTry = 0; // load TSY - #if defined(_DEBUG) + #if defined(_DEBUG) RDebug::Print(_L("CSecurityNotifier::RunL() load TSY")); #endif - err = iServer.LoadPhoneModule( KMmTsyModuleName ); - if ( err != KErrAlreadyExists ) + + if ( !iPhone.SubSessionHandle() ) + { + err = iServer.LoadPhoneModule( KMmTsyModuleName ); + if ( err != KErrAlreadyExists ) { // may also return KErrAlreadyExists if something // else has already loaded the TSY module. And that is @@ -348,20 +351,22 @@ User::LeaveIfError( err ); } - // open phones - #if defined(_DEBUG) - RDebug::Print(_L("CSecurityNotifier::RunL() open phones")); - #endif - User::LeaveIfError(iServer.SetExtendedErrorGranularity(RTelServer::EErrorExtended)); - User::LeaveIfError(iServer.GetPhoneInfo(PhoneIndex, PhoneInfo)); - User::LeaveIfError(iPhone.Open(iServer,PhoneInfo.iName)); + // open phones + #if defined(_DEBUG) + RDebug::Print(_L("CSecurityNotifier::RunL() open phones")); + #endif + User::LeaveIfError(iServer.SetExtendedErrorGranularity(RTelServer::EErrorExtended)); + User::LeaveIfError(iServer.GetPhoneInfo(PhoneIndex, PhoneInfo)); + User::LeaveIfError(iPhone.Open(iServer,PhoneInfo.iName)); + } + RProperty Property; CleanupClosePushL( Property ); err = Property.Set(KPSUidStartup, KStartupSecurityCodeQueryStatus, ESecurityQueryActive); User::LeaveIfError( err ); // initialize security ui - #if defined(_DEBUG) + #if defined(_DEBUG) RDebug::Print(_L("CSecurityNotifier::RunL() initialize security ui")); #endif CSecurityHandler* handler = new(ELeave) CSecurityHandler(iPhone); @@ -388,11 +393,11 @@ // if something went wrong cancel the code request if (error) { - #if defined(_DEBUG) - RDebug::Print(_L("CSecurityNotifier::RunL() ERROR: %d"), error); - #endif - TBool wcdmaSupported(FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma )); - TBool upinSupported(FeatureManager::FeatureSupported( KFeatureIdUpin )); + #if defined(_DEBUG) + RDebug::Print(_L("CSecurityNotifier::RunL() ERROR: %d"), error); + #endif + TBool wcdmaSupported(FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma )); + TBool upinSupported(FeatureManager::FeatureSupported( KFeatureIdUpin )); switch (iEvent) { case RMobilePhone::EUniversalPinRequired: @@ -407,19 +412,19 @@ iPhone.AbortSecurityCode(RMobilePhone::ESecurityUniversalPuk); } break; - case RMobilePhone::EPin1Required: + case RMobilePhone::EPin1Required: iPhone.AbortSecurityCode(RMobilePhone::ESecurityCodePin1); break; - case RMobilePhone::EPuk1Required: + case RMobilePhone::EPuk1Required: iPhone.AbortSecurityCode(RMobilePhone::ESecurityCodePuk1); break; - case RMobilePhone::EPin2Required: + case RMobilePhone::EPin2Required: iPhone.AbortSecurityCode(RMobilePhone::ESecurityCodePin2); break; - case RMobilePhone::EPuk2Required: + case RMobilePhone::EPuk2Required: iPhone.AbortSecurityCode(RMobilePhone::ESecurityCodePuk2); break; - case RMobilePhone::EPhonePasswordRequired: + case RMobilePhone::EPhonePasswordRequired: iPhone.AbortSecurityCode(RMobilePhone::ESecurityCodePhonePassword); break; default: @@ -449,9 +454,9 @@ iReturnVal = KErrNone; //Leave the window group to foreground for a short time to absorb key presses so that autolock has time to activate. if(!StartUp) - User::After(KDelayPeriod); - ( CEikonEnv::Static() )->BringForwards(EFalse); - #if defined(_DEBUG) + User::After(KDelayPeriod); + ( CEikonEnv::Static() )->BringForwards(EFalse); + #if defined(_DEBUG) RDebug::Print(_L("CSecurityNotifier::RunL() End")); #endif } diff -r f1030a78d563 -r 61986511a9c8 securitydialogs/Securitynotifier/Src/Securitynotifierwrapper.cpp --- a/securitydialogs/Securitynotifier/Src/Securitynotifierwrapper.cpp Thu Jul 08 20:04:36 2010 +0300 +++ b/securitydialogs/Securitynotifier/Src/Securitynotifierwrapper.cpp Thu Jul 22 14:15:39 2010 +0300 @@ -19,7 +19,9 @@ #include #include -#include // link against aknnotifierwrapper.lib +#include +#include +// #include // link against aknnotifierwrapper.lib #define KMyNotifierUid TUid::Uid(0x10005988) // uid #define KMyPriority TInt(MEikSrvNotifierBase2::ENotifierPriorityHigh) @@ -48,6 +50,9 @@ // Create Wrappers // Session owning notifier(if default implementation is enough) + RDebug::Printf( "%s %s (%u) !!!!** Not creating SecurityNotifier.dll . This means that PIN/unlock queries don't work **!!!! 0=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + + /* CAknCommonNotifierWrapper* master = CAknCommonNotifierWrapper::NewL( KMyNotifierUid, KMyNotifierUid, @@ -58,6 +63,7 @@ subjects->AppendL( master ); + */ CleanupStack::Pop(); // array cleanup #if defined(_DEBUG) RDebug::Print(_L("(SECURITYNOTIFIER)WRAPPER DoCreateNotifierArrayL END")); diff -r f1030a78d563 -r 61986511a9c8 wim/Scard/src/ScardReaderRegistry.cpp --- a/wim/Scard/src/ScardReaderRegistry.cpp Thu Jul 08 20:04:36 2010 +0300 +++ b/wim/Scard/src/ScardReaderRegistry.cpp Thu Jul 22 14:15:39 2010 +0300 @@ -298,7 +298,7 @@ TLauncherStruct launcher; launcher.iGroupID = KGroupID; //This is always 1 launcher.iReaderID = KReaderID; //This is always 1 - launcher.iSession.Connect(); + User::LeaveIfError( launcher.iSession.Connect() ); User::LeaveIfError( launcher.iLibrary.Load( KSwimReaderDLL ) );