# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1271422404 -10800 # Node ID 318c4eab243953b85b9bb108d31fb973fdff1950 # Parent b75757c81051ddb7be08b7217745ce171c10509d Revision: 201011 Kit: 201015 diff -r b75757c81051 -r 318c4eab2439 boottimeintegritycheck/src/IntegrityCheck.cpp --- a/boottimeintegritycheck/src/IntegrityCheck.cpp Fri Mar 19 09:41:08 2010 +0200 +++ b/boottimeintegritycheck/src/IntegrityCheck.cpp Fri Apr 16 15:53:24 2010 +0300 @@ -78,6 +78,37 @@ // FUNCTION PROTOTYPES +template +class CleanupResetAndDestroy + { +public: + inline static void PushL(T& aRef); +private: + static void ResetAndDestroy(TAny *aPtr); + }; + +template +inline void CleanupResetAndDestroyPushL(T& aRef); + +template +inline void CleanupResetAndDestroy::PushL(T& aRef) + { + CleanupStack::PushL(TCleanupItem(&ResetAndDestroy,&aRef)); + } + +template +void CleanupResetAndDestroy::ResetAndDestroy(TAny *aPtr) + { + static_cast(aPtr)->ResetAndDestroy(); + } + +template +inline void CleanupResetAndDestroyPushL(T& aRef) + { + CleanupResetAndDestroy::PushL(aRef); + } + + LOCAL_C TInt ThreadStartL(); LOCAL_C TInt ReadCertificatesL( @@ -390,10 +421,14 @@ BTIC_TRACE_PRINT_NUM("Updated store read enabled(1) = %d",certFileFound); BTIC_TRACE_PRINT_NUM("Binaries check enabled(0) = %d",binariesCheckEnbled); - +//FIX // Create pointer array for root certificates. - RPointerArray x509CertArray; + RPointerArray x509CertArray; + CleanupResetAndDestroyPushL( x509CertArray ); + pushToStack++; RPointerArray certCapaArray; + CleanupResetAndDestroyPushL( certCapaArray ); + pushToStack++; TInt fileError = 0; // Read root certificates if needed. @@ -413,16 +448,19 @@ { BTIC_TRACE_PRINT("ERROR Can't read root certificates ! ! !"); CleanupStack::PopAndDestroy( pushToStack ); - x509CertArray.ResetAndDestroy(); - certCapaArray.ResetAndDestroy(); + User::Leave( fileError ); } } - + // Create temporary pointer array for C-drive updated certificates. - RPointerArray tempCertArray; - RPointerArray tempCapaArray; - + RPointerArray tempCertArray; + CleanupResetAndDestroyPushL( tempCertArray ); + pushToStack++; + RPointerArray tempCapaArray; + CleanupResetAndDestroyPushL( tempCapaArray ); + pushToStack++; + // If candidate for certstore file is found read it and validate file. if ( certFileFound ) { @@ -512,13 +550,9 @@ */ BTIC_TRACE_PRINT("\nProgram complete\n"); - // DELETE ALL ARRAYS AND ARRAY CONTENT - x509CertArray.ResetAndDestroy(); - tempCertArray.ResetAndDestroy(); - certCapaArray.ResetAndDestroy(); - tempCapaArray.ResetAndDestroy(); - - CleanupStack::PopAndDestroy( pushToStack ); //fs, buffers + // DELETE ALL ARRAYS AND ARRAY CONTENT + // x509CertArray, tempCertArray, certCapaArray, tempCapaArray, fs, buffers + CleanupStack::PopAndDestroy( pushToStack ); BTIC_TRACE_PRINT("UHEAP MARK END"); __UHEAP_MARKEND; @@ -683,8 +717,12 @@ __UHEAP_MARK; TBool storeOK = EFalse; + + RPointerArray updaterExePaths; + CleanupResetAndDestroyPushL( updaterExePaths ); - RPointerArray updaterExePaths; + RPointerArray sisPackages; + CleanupResetAndDestroyPushL( sisPackages ); Swi::RSisRegistrySession sisRegSession; @@ -693,8 +731,6 @@ User::LeaveIfError( sisRegSession.Connect() ); CleanupClosePushL( sisRegSession ); - - RPointerArray sisPackages; // Find installed packages. sisRegSession.InstalledPackagesL( sisPackages ); @@ -778,10 +814,7 @@ } } } - - // Cleanup array. - sisPackages.ResetAndDestroy(); - + if ( entryOpen ) { CleanupStack::PopAndDestroy(); //RSisRegistryEntry @@ -796,8 +829,9 @@ { storeOK = RunUpdaterL( aFs, updaterExePaths ); } - - updaterExePaths.ResetAndDestroy(); + + CleanupStack::PopAndDestroy( 1, &sisPackages ); + CleanupStack::PopAndDestroy( 1, &updaterExePaths ); BTIC_TRACE_PRINT("UHEAP MARK END"); __UHEAP_MARKEND; @@ -827,7 +861,7 @@ { BTIC_TRACE_PRINT("[BOOT INTECRITY CHECK] ValidateProvisonerStoreL --->"); __UHEAP_MARK; - + TBool retOK = EFalse; // installedFiles array owns entry's files. RPointerArray installedFilesArray; @@ -838,6 +872,12 @@ RPointerArray stringArray; HBufC* string = NULL; + CleanupResetAndDestroyPushL( installedFilesArray ); + CleanupResetAndDestroyPushL( foundFilesArray ); + CleanupResetAndDestroyPushL( fileArray ); + CleanupResetAndDestroyPushL( hashArray ); + CleanupResetAndDestroyPushL( stringArray ); + TUint64* capaVector = new( ELeave ) TUint64[KBTICCapaCount]; CleanupArrayDeletePushL( capaVector ); capaVector[0] = KBTIC_TCB; @@ -1050,7 +1090,13 @@ } CleanupStack::PopAndDestroy(); //capaVector - + + CleanupStack::Pop( &stringArray ); + CleanupStack::Pop( &hashArray ); + CleanupStack::Pop( &fileArray ); + CleanupStack::Pop( &foundFilesArray ); + CleanupStack::Pop( &installedFilesArray ); + // Reset only. InstalledFiles array owns buffers. foundFilesArray.Reset(); fileArray.Reset(); @@ -1096,6 +1142,12 @@ RArray capaArray; RPointerArray stringArray; HBufC* string = NULL; + + CleanupResetAndDestroyPushL( installedFilesArray ); + CleanupResetAndDestroyPushL( foundFilesArray ); + CleanupResetAndDestroyPushL( fileArray ); + CleanupResetAndDestroyPushL( hashArray ); + CleanupResetAndDestroyPushL( stringArray ); TUint64* capaVector = new( ELeave ) TUint64[KBTICCapaCount]; CleanupArrayDeletePushL( capaVector ); @@ -1161,7 +1213,13 @@ } CleanupStack::PopAndDestroy(); //capaVector - + + CleanupStack::Pop( &stringArray ); + CleanupStack::Pop( &hashArray ); + CleanupStack::Pop( &fileArray ); + CleanupStack::Pop( &foundFilesArray ); + CleanupStack::Pop( &installedFilesArray ); + // Reset only. InstalledFiles array owns buffers. foundFilesArray.Reset(); fileArray.Reset(); @@ -1392,6 +1450,8 @@ BTIC_TRACE_PRINT("[BOOT INTECRITY CHECK] SearchValidCertificate v2.1 --->"); RPointerArray binaryCertChainArray; + CleanupResetAndDestroyPushL( binaryCertChainArray ); + // Get certificates in binary format. aEntry.CertificateChainsL( binaryCertChainArray ); @@ -1401,7 +1461,8 @@ TBool retVal = EFalse; RPointerArray chainCertArray; - + CleanupResetAndDestroyPushL( chainCertArray ); + // Check all entry's chains for ( TInt chain = 0; chain < chainCount; chain++ ) { @@ -1546,13 +1607,12 @@ if ( retVal ) { break; - } - + } } // FOR LOOP - - binaryCertChainArray.ResetAndDestroy(); - - + + CleanupStack::PopAndDestroy( &chainCertArray ); + CleanupStack::PopAndDestroy( &binaryCertChainArray ); + BTIC_TRACE_PRINT("[BOOT INTECRITY CHECK] SearchValidCertificate v2.1 <---"); return retVal; diff -r b75757c81051 -r 318c4eab2439 devencdiskutils/DevEncCommonUtils/group/DevEncCommonUtils.mmp --- a/devencdiskutils/DevEncCommonUtils/group/DevEncCommonUtils.mmp Fri Mar 19 09:41:08 2010 +0200 +++ b/devencdiskutils/DevEncCommonUtils/group/DevEncCommonUtils.mmp Fri Apr 16 15:53:24 2010 +0300 @@ -51,7 +51,9 @@ LIBRARY pbe.lib LIBRARY random.lib // for PKCS5 LIBRARY x509.lib // for PKCS5 -LIBRARY imut.lib // for base64 coding +LIBRARY inetprotutil.lib // for base64 coding , was using imut.lib before + + DEBUGLIBRARY flogger.lib // EXPORTUNFROZEN diff -r b75757c81051 -r 318c4eab2439 devencdiskutils/DevEncCommonUtils/src/DevEncKeyUtils.cpp --- a/devencdiskutils/DevEncCommonUtils/src/DevEncKeyUtils.cpp Fri Mar 19 09:41:08 2010 +0200 +++ b/devencdiskutils/DevEncCommonUtils/src/DevEncKeyUtils.cpp Fri Apr 16 15:53:24 2010 +0300 @@ -24,13 +24,14 @@ #include "DevEncLog.h" #include "DevEncUids.hrh" + #include #include //#include // for system path literals #include #include #include -#include +#include #include #include @@ -273,8 +274,7 @@ aResult = HBufC8::NewL( resultPtr.Length()*4/3+3 ); TPtr8 returnPtr = aResult->Des(); returnPtr.SetLength( 0 ); - TImCodecB64 b64codec; - b64codec.Initialise(); + TBase64 b64codec; b64codec.Encode( *result, returnPtr ); // Destroy the evidence @@ -320,8 +320,7 @@ HBufC8* decodedKey = HBufC8::NewLC( aPkcs5Key.Length()*3/4 ); TPtr8 keyPtr = decodedKey->Des(); keyPtr.SetLength( 0 ); - TImCodecB64 b64codec; - b64codec.Initialise(); + TBase64 b64codec; b64codec.Decode( aPkcs5Key, keyPtr ); // Read the parameters and ciphertext from the input diff -r b75757c81051 -r 318c4eab2439 gba/common/GBALogger.cpp --- a/gba/common/GBALogger.cpp Fri Mar 19 09:41:08 2010 +0200 +++ b/gba/common/GBALogger.cpp Fri Apr 16 15:53:24 2010 +0300 @@ -21,178 +21,154 @@ #include "GBALogger.h" #include -const TInt KDebugBufferSize1024 = 1024; -const TInt KDebugBufferSize512 = 512; -const TInt KDebugBufferSize240 = 240; -const TInt KDebugBufferSize120 = 120; +const TInt KDebugBufferSize1024 = 1024; +const TInt KDebugBufferSize512 = 512; +const TInt KDebugBufferSize256 = 256; +const TInt KDebugBufferFragmentSize = 120; +const TInt KDebugBufferSize128 = 128; _LIT(KTimeFormat, "%F%D/%M/%Y %J:%T:%S"); -void debugline(const char *a, void *arg1, void* arg1b, void *arg2, void *arg3, const char *arg4) +void debugline(const char *aFormatString, void *aArg1, void* aArg2, void *aArg3, void *aArg4, const char *aArg5) { TBuf8 logbuffer; - TPtrC8 p((const TUint8 *)a); - TPtrC8 temp_arg4((const TUint8 *)arg4); + TPtrC8 p((const TUint8 *)aFormatString); + TPtrC8 tempArg5((const TUint8 *)aArg5); + logbuffer.Format(p, aArg1,aArg2, aArg3, aArg4); - if( temp_arg4.Length() > KDebugBufferSize1024 - KDebugBufferSize120 ) + if( KDebugBufferSize1024 < logbuffer.Size() + tempArg5.Size() ) return; - logbuffer.Format(p, arg1,arg1b, arg2, arg3); - logbuffer.Append(temp_arg4); + logbuffer.Append(tempArg5); + + TInt iterator = 0; - if ( logbuffer.Length() <= KDebugBufferSize120 ) + TBuf8 tempbuffer; + TInt bufferSize = logbuffer.Size(); + while( iterator < bufferSize ) { - RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName, - EFileLoggingModeAppend, - logbuffer ); - } - else - { - RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName, - EFileLoggingModeAppend, - logbuffer.Left( KDebugBufferSize120 ) ); - //max length is 150, print another line - if (logbuffer.Mid(KDebugBufferSize120).Length()<= KDebugBufferSize120 ) - { + if( (bufferSize - iterator) > KDebugBufferFragmentSize ) + { + tempbuffer.Copy(logbuffer.Mid(iterator, KDebugBufferFragmentSize)); RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName, - EFileLoggingModeAppend, - logbuffer.Mid(KDebugBufferSize120) ); + EFileLoggingModeAppend, + _L8("%S"), &tempbuffer); } else { - RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName, - EFileLoggingModeAppend, - logbuffer.Mid(KDebugBufferSize120, KDebugBufferSize120) ); + tempbuffer.Copy(logbuffer.Mid(iterator, bufferSize - iterator)); RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName, - EFileLoggingModeAppend, - logbuffer.Mid(KDebugBufferSize240) ); - } - } + EFileLoggingModeAppend, + _L8("%S"), &tempbuffer); + } + iterator += KDebugBufferFragmentSize; + } } - -void debugline(const char *a, void *arg1, void* arg1b, void *arg2, void *arg3, const TDesC &arg4) +void debugline(const char *aFormatString, void *aArg1, void* aArg2, void *aArg3, void *aArg4, const TDesC &aArg5) { TBuf8 logbuffer; + TPtrC8 p((const TUint8 *)aFormatString); + logbuffer.Format(p, aArg1,aArg2, aArg3, aArg4); - if( arg4.Length() > KDebugBufferSize1024 - KDebugBufferSize120 ) + if( KDebugBufferSize1024 < logbuffer.Size() + aArg5.Length() ) return; - TPtrC8 p((const TUint8 *)a); - logbuffer.Format(p, arg1,arg1b, arg2, arg3); - logbuffer.Append(arg4); + logbuffer.Append(aArg5); + + TInt iterator = 0; - if ( logbuffer.Length() <= KDebugBufferSize120 ) + TBuf8 tempbuffer; + TInt bufferSize = logbuffer.Size(); + while( iterator < bufferSize ) { - RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName, - EFileLoggingModeAppend, - logbuffer ); - } - else - { - RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName, - EFileLoggingModeAppend, - logbuffer.Left( KDebugBufferSize120 ) ); - //max length is 150, print another line - if (logbuffer.Mid(KDebugBufferSize120).Length()<= KDebugBufferSize120 ) - { + if( (bufferSize - iterator) > KDebugBufferFragmentSize ) + { + tempbuffer.Copy(logbuffer.Mid(iterator, KDebugBufferFragmentSize)); RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName, - EFileLoggingModeAppend, - logbuffer.Mid(KDebugBufferSize120) ); + EFileLoggingModeAppend, + _L8("%S"), &tempbuffer); } else { - RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName, - EFileLoggingModeAppend, - logbuffer.Mid(KDebugBufferSize120, KDebugBufferSize120) ); + tempbuffer.Copy(logbuffer.Mid(iterator, bufferSize - iterator)); RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName, - EFileLoggingModeAppend, - logbuffer.Mid(KDebugBufferSize240) ); - } - } + EFileLoggingModeAppend, + _L8("%S"), &tempbuffer); + } + iterator += KDebugBufferFragmentSize; + } } -void debugline(const char *a, void *arg1, void *arg1b, void *arg2, void *arg3, const TDesC8 &arg4) - { +void debugline(const char *aFormatString, void *aArg1, void *aArg2, void *aArg3, void *aArg4, const TDesC8 &aArg5) + { TBuf8 logbuffer; + TPtrC8 p((const TUint8 *)aFormatString); + logbuffer.Format(p, aArg1,aArg2, aArg3, aArg4); - if( arg4.Length() > KDebugBufferSize1024 - KDebugBufferSize120) + if( KDebugBufferSize1024 < logbuffer.Size() + aArg5.Size() ) return; - TPtrC8 p((const TUint8 *)a); - logbuffer.Format(p, arg1,arg1b, arg2, arg3); - logbuffer.Append(arg4); + logbuffer.Append(aArg5); + + TInt iterator = 0; - if ( logbuffer.Length() <= KDebugBufferSize120 ) + TBuf8 tempbuffer; + TInt bufferSize = logbuffer.Size(); + while( iterator < bufferSize ) { - RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName, - EFileLoggingModeAppend, - logbuffer ); - } - else - { - RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName, - EFileLoggingModeAppend, - logbuffer.Left(KDebugBufferSize120) ); - //max length is 150, print another line - - if (logbuffer.Mid(KDebugBufferSize120).Length()<= KDebugBufferSize120 ) - { + if( (bufferSize - iterator) > KDebugBufferFragmentSize ) + { + tempbuffer.Copy(logbuffer.Mid(iterator, KDebugBufferFragmentSize)); RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName, - EFileLoggingModeAppend, - logbuffer.Mid(KDebugBufferSize120) ); + EFileLoggingModeAppend, + _L8("%S"), &tempbuffer); } else { - RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName, - EFileLoggingModeAppend, - logbuffer.Mid(KDebugBufferSize120, KDebugBufferSize120) ); + tempbuffer.Copy(logbuffer.Mid(iterator, bufferSize - iterator)); RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName, - EFileLoggingModeAppend, - logbuffer.Mid(KDebugBufferSize240) ); - } - } + EFileLoggingModeAppend, + _L8("%S"), &tempbuffer); + } + iterator += KDebugBufferFragmentSize; + } } -void debugline(const char *a, void *arg1, void *arg1b, void *arg2, void *arg3, const char *arg4, const TInt& aNum ) +void debugline(const char *aFormatString, void *aArg1, void *aArg2, void *aArg3, void *aArg4, const char *aArg5, const TInt& aNum ) { - TBuf8 logbuf; - TPtrC8 temp_arg4((TUint8 *)arg4); - - if( temp_arg4.Length() > KDebugBufferSize512 - KDebugBufferSize120) + TBuf8 logbuffer; + TPtrC8 tempArg5((const TUint8 *)aArg5); + if( tempArg5.Size() > KDebugBufferSize512 - KDebugBufferSize128 ) return; - logbuf.Format( temp_arg4, aNum ); - debugline(a, arg1, arg1b, arg2, arg3, logbuf); - } + TPtrC8 p((const TUint8 *)aFormatString); + logbuffer.Format(p, aArg1,aArg2, aArg3, aArg4); + //Print in two seperate lines + RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName, + EFileLoggingModeAppend, + _L8("%S"), &logbuffer); + RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName, + EFileLoggingModeAppend, + _L8(aArg5), aNum); + } -void debugline(const char *a, void *arg1, void *arg1b, void *arg2, void *arg3, const TDesC &arg4, const TInt& aNum ) - { - TBuf logbuf; - - if( arg4.Length() > KDebugBufferSize512 - KDebugBufferSize120 ) - return; - - logbuf.Format( arg4, aNum ); - debugline(a, arg1, arg1b, arg2, arg3, logbuf); - } - -void DebugBinary( const TDesC8 &buf ) +void debugBinary( const TDesC8 &aBuffer ) { RFileLogger::HexDump( KGBALogDir, KGBALogFileName, - EFileLoggingModeAppend, - NULL, NULL , buf.Ptr(), buf.Length() ); - } + EFileLoggingModeAppend, + NULL, NULL , aBuffer.Ptr(), aBuffer.Length() ); + } void debugTTime( TTime& aTime ) { - TBuf buf; + TBuf buf; TRAPD(error , aTime.FormatL( buf, KTimeFormat)); if(error != KErrNone) return; RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName, - EFileLoggingModeAppend, - buf ); + EFileLoggingModeAppend, + buf ); } #endif diff -r b75757c81051 -r 318c4eab2439 gba/gbafilter/group/httpfiltergba.mmp --- a/gba/gbafilter/group/httpfiltergba.mmp Fri Mar 19 09:41:08 2010 +0200 +++ b/gba/gbafilter/group/httpfiltergba.mmp Fri Apr 16 15:53:24 2010 +0300 @@ -38,7 +38,7 @@ SYSTEMINCLUDE /epoc32/include/ecom -APP_LAYER_SYSTEMINCLUDE +MW_LAYER_SYSTEMINCLUDE SOURCEPATH ../Data diff -r b75757c81051 -r 318c4eab2439 gba/gbafilter/src/HTTPFilterGBA.cpp --- a/gba/gbafilter/src/HTTPFilterGBA.cpp Fri Mar 19 09:41:08 2010 +0200 +++ b/gba/gbafilter/src/HTTPFilterGBA.cpp Fri Apr 16 15:53:24 2010 +0300 @@ -20,7 +20,7 @@ #include #include #include -#include //for base64 en/decoding +#include //for base64 en/decoding #include "HTTPFilterGBA.h" #include "GbaCommon.h" #include @@ -609,9 +609,8 @@ GBA_TRACE_DEBUG(("BTID:")); GBA_TRACE_DEBUG(iGbaOutputParams.iBTID); // Encodes the KNAF to generate a password - TImCodecB64 b64coder; + TBase64 b64coder; TBuf8 keyBase64; - b64coder.Initialise(); b64coder.Encode( iGbaOutputParams.iKNAF, keyBase64 ); RString username = iStringPool.OpenStringL( iGbaOutputParams.iBTID ); CleanupClosePushL( username ); diff -r b75757c81051 -r 318c4eab2439 gba/gbaserver/group/gbaserver.mmp --- a/gba/gbaserver/group/gbaserver.mmp Fri Mar 19 09:41:08 2010 +0200 +++ b/gba/gbaserver/group/gbaserver.mmp Fri Apr 16 15:53:24 2010 +0300 @@ -29,7 +29,7 @@ USERINCLUDE ../inc USERINCLUDE ../../inc -APP_LAYER_SYSTEMINCLUDE +MW_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE /epoc32/include/ecom SOURCEPATH ../src diff -r b75757c81051 -r 318c4eab2439 gba/gbaserver/src/bootstrap.cpp --- a/gba/gbaserver/src/bootstrap.cpp Fri Mar 19 09:41:08 2010 +0200 +++ b/gba/gbaserver/src/bootstrap.cpp Fri Apr 16 15:53:24 2010 +0300 @@ -25,7 +25,10 @@ // 6. return SRES // 7. Store keymaterial to a token -#include //for base64 en/decoding +#include +#include +#include //for base64 en/decoding + #include #include "dataretriever.h" #include "bootstrap.h" @@ -699,8 +702,7 @@ ptrDecNonce.FillZ(); // decodes the base64 nonce - TImCodecB64 b64coder; - b64coder.Initialise(); + TBase64 b64coder; b64coder.Decode( *nonce, ptrDecNonce ); GBA_TRACE_DEBUG((" The decoded nonce value in binary")); @@ -1037,7 +1039,8 @@ } GBA_TRACE_DEBUG(("Cached IMPI = ")); - GBA_TRACE_DEBUG(*tmpIdentity); + if(tmpIdentity != NULL) + GBA_TRACE_DEBUG(*tmpIdentity); GBA_TRACE_DEBUG(("IMPI from smart card = ")); GBA_TRACE_DEBUG(*iIdentity); diff -r b75757c81051 -r 318c4eab2439 gba/inc/GBALogger.h --- a/gba/inc/GBALogger.h Fri Mar 19 09:41:08 2010 +0200 +++ b/gba/inc/GBALogger.h Fri Apr 16 15:53:24 2010 +0300 @@ -27,31 +27,29 @@ #ifdef _DEBUG - void debugline(const char *a, void *arg1, void* f, void *arg2, void *arg3, const TDesC &arg4); - void debugline(const char *a, void *arg1, void* f, void *arg2, void *arg3, const TDesC8 &arg4); - void debugline(const char *a, void *arg1, void* f, void *arg2, void *arg3, const char *arg4, const TInt &aNum); - void debugline(const char *a, void *arg1, void* f, void *arg2, void *arg3, const TDesC &arg4, const TInt &aNum); - void DebugBinary(const TDesC8 &buf); + void debugline( const char *aFormatString, void *aArg1, void* aArg2, void *aArg3, void *aArg4, const TDesC &aArg5 ); + void debugline( const char *aFormatString, void *aArg1, void *aArg2, void *aArg3, void *aArg4, const TDesC8 &aArg5 ); + void debugline( const char *aFormatString, void *aArg1, void* aArg2, void *aArg3, void *aArg4, const char *aArg5 ); + void debugline( const char *aFormatString, void *aArg1, void *aArg2, void *aArg3, void *aArg4, const char *aArg5, const TInt& aNum ); + void debugBinary( const TDesC8 &aBuffer ); void debugTTime( TTime& aTime ); - void debugline(const char *a, void *arg1, void* f, void *arg2, void *arg3, const char *arg4); - + + //Macro's #define GBA_DEBUG #define GBA_TRACE_DEBUG_DESC(a) debugline("%s:%s %d: %d",(void *) __FILE__, (void *) __func__, (void *)__LINE__, (void *)User::TickCount(),(a)) #define GBA_TRACE_DEBUG_NUM( a,b ) debugline("%s:%s %d: %d",(void *) __FILE__, (void *) __func__, (void *)__LINE__, (void *)User::TickCount(),(a),b) - -#ifdef LOG_GBA_KEYS - #define GBA_TRACE_DEBUG_BINARY(a) DebugBinary((a)); -#else - #define GBA_TRACE_DEBUG_BINARY(a) -#endif - #define GBA_TRACE_BEGIN() debugline("%s:%s %d: %d",(void *) __FILE__, (void *) __func__, (void *)__LINE__, (void *)User::TickCount(),(KEnter)) #define GBA_TRACE_END() debugline("%s:%s %d: %d",(void *) __FILE__, (void *) __func__, (void *)__LINE__, (void *)User::TickCount(),(KEnd)) #define GBA_TRACE_TIME( a ) debugTTime( (a) ); #define GBA_TRACE_DEBUG(a) debugline("%s:%s %d: %d",(void *) __FILE__, (void *) __func__, (void *)__LINE__, (void *)User::TickCount(),(a)) - +#ifdef LOG_GBA_KEYS + #define GBA_TRACE_DEBUG_BINARY(a) debugBinary((a)); #else + #define GBA_TRACE_DEBUG_BINARY(a) +#endif +#else //_DEBUG + #define GBA_TRACE_DEBUG_DESC(a) #define GBA_TRACE_DEBUG(a) #define GBA_TRACE_DEBUG_NUM(a,b) @@ -60,8 +58,8 @@ #define GBA_TRACE_END() #define GBA_TRACE_TIME( a ) -#endif - +#endif //_DEBUG + #endif //__GBALOGGER_H_ diff -r b75757c81051 -r 318c4eab2439 gba/sis/gba.pkg --- a/gba/sis/gba.pkg Fri Mar 19 09:41:08 2010 +0200 +++ b/gba/sis/gba.pkg Fri Apr 16 15:53:24 2010 +0300 @@ -17,7 +17,7 @@ &EN ; Header -#{"GBA (Beta)"},(0x20029F08), 0, 4, 0, TYPE=SA,RU +#{"GBA (Beta)"},(0x20029F08), 0, 5, 0, TYPE=SA,RU ; Localised Vendor name %{"Nokia"} diff -r b75757c81051 -r 318c4eab2439 layers.sysdef.xml --- a/layers.sysdef.xml Fri Mar 19 09:41:08 2010 +0200 +++ b/layers.sysdef.xml Fri Apr 16 15:53:24 2010 +0300 @@ -1,15 +1,18 @@ - ]> - + + + + diff -r b75757c81051 -r 318c4eab2439 pkiutilities/CTSecurityDialogs/NotifSrc/CTCertificateQuery.cpp --- a/pkiutilities/CTSecurityDialogs/NotifSrc/CTCertificateQuery.cpp Fri Mar 19 09:41:08 2010 +0200 +++ b/pkiutilities/CTSecurityDialogs/NotifSrc/CTCertificateQuery.cpp Fri Apr 16 15:53:24 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -11,7 +11,7 @@ * * Contributors: * -* Description: +* Description: * */ @@ -23,36 +23,40 @@ #include "CTSecurityDialogsAO.h" #include -#include +//#include #include #include // ================= MEMBER FUNCTIONS ========================================== -CCTCertificateQuery::CCTCertificateQuery(CCTSecurityDialogsAO& aAO): - CAknMessageQueryDialog( CAknQueryDialog::ENoTone ), - iNotifier(aAO) +CCTCertificateQuery::CCTCertificateQuery(CCTSecurityDialogsAO& aAO): + CAknMessageQueryDialog( CAknQueryDialog::ENoTone ), + iNotifier(aAO) { } CCTCertificateQuery* CCTCertificateQuery::NewL(CCTSecurityDialogsAO& aAO) { - CCTCertificateQuery* query = + CCTCertificateQuery* query = new( ELeave ) CCTCertificateQuery(aAO); CleanupStack::PushL( query ); query->ConstructL(); CleanupStack::Pop(); - + return query; } void CCTCertificateQuery::ConstructL() - { - iHeader = CEikonEnv::Static()->AllocReadResourceL( R_TEXT_RESOURCE_DETAILS_VIEW_HEADER ); - SetHeaderTextL( *iHeader ); - iMessage = iNotifier.CreateMessageL(); - SetMessageTextL( *iMessage ); + { + // Temporary fix. Resource file certmanui.rsg is removed. + //iHeader = CEikonEnv::Static()->AllocReadResourceL( R_TEXT_RESOURCE_DETAILS_VIEW_HEADER ); + _LIT( KHeader, "Certificate details" ); + iHeader = KHeader().AllocL(); + + SetHeaderTextL( *iHeader ); + iMessage = iNotifier.CreateMessageL(); + SetMessageTextL( *iMessage ); } CCTCertificateQuery::~CCTCertificateQuery() diff -r b75757c81051 -r 318c4eab2439 pkiutilities/CTSecurityDialogs/NotifSrc/CTSecurityDialogsAO.cpp --- a/pkiutilities/CTSecurityDialogs/NotifSrc/CTSecurityDialogsAO.cpp Fri Mar 19 09:41:08 2010 +0200 +++ b/pkiutilities/CTSecurityDialogs/NotifSrc/CTSecurityDialogsAO.cpp Fri Apr 16 15:53:24 2010 +0300 @@ -37,7 +37,7 @@ #include #include #include -#include +//#include #include #include #include @@ -1528,9 +1528,9 @@ messagePtr.Append( KEnter ); - DetailsFieldDynamicL( messagePtr, *iText, - R_TEXT_RESOURCE_DETAILS_VIEW_SUBJECT, - R_TEXT_RESOURCE_VIEW_NO_SUBJECT_DETAILS ); + //DetailsFieldDynamicL( messagePtr, *iText, + // R_TEXT_RESOURCE_DETAILS_VIEW_SUBJECT, + // R_TEXT_RESOURCE_VIEW_NO_SUBJECT_DETAILS ); AddKeyUsageL( messagePtr, iKeyInfo ); AddKeyAlgorithmL( messagePtr, iKeyInfo ); @@ -1613,13 +1613,14 @@ // --------------------------------------------------------- // HBufC* CCTSecurityDialogsAO::MessageQueryCertDetailsL( - const TDesC8& aCert, - const CCTCertInfo* aCertInfo, - TCertificateFormat aCertFormat, - const CCTKeyInfo* aKeyInfo) + const TDesC8& /*aCert*/, + const CCTCertInfo* /*aCertInfo*/, + TCertificateFormat /*aCertFormat*/, + const CCTKeyInfo* /*aKeyInfo*/) { // Create message buffer HBufC* message = HBufC::NewLC( KMaxLengthTextDetailsBody ); +/* TPtr messagePtr = message->Des(); // Label if ( aCertInfo ) @@ -1681,7 +1682,7 @@ User::Leave( KErrNotSupported ); } } - +*/ CleanupStack::Pop( message ); return message; } @@ -1690,22 +1691,25 @@ // CCTSecurityDialogsAO::AddIssuerAndSubjectL(...) // ----------------------------------------------------------------------------- // -void CCTSecurityDialogsAO::AddSiteL( TDes& aMessage ) +void CCTSecurityDialogsAO::AddSiteL( TDes& /*aMessage*/ ) { +/* if ( iServerName ) { DetailsFieldDynamicL( aMessage, iServerName->Des(), R_QTN_CM_SITE, R_TEXT_RESOURCE_DETAILS_VIEW_NOT_DEFINED ); } +*/ } // ----------------------------------------------------------------------------- // CCTSecurityDialogsAO::AddIssuerAndSubjectL(...) // ----------------------------------------------------------------------------- // -void CCTSecurityDialogsAO::AddIssuerAndSubjectL( TDes& aMessage, const CX509Certificate& aCert ) +void CCTSecurityDialogsAO::AddIssuerAndSubjectL( TDes& /*aMessage*/, const CX509Certificate& /*aCert*/ ) { +/* HBufC* issuer = NULL; HBufC* owner = NULL; X509CertNameParser::SubjectFullNameL( aCert, owner ); @@ -1723,14 +1727,16 @@ R_TEXT_RESOURCE_DETAILS_VIEW_SUBJECT, R_TEXT_RESOURCE_VIEW_NO_SUBJECT_DETAILS ); CleanupStack::PopAndDestroy( owner ); //owner +*/ } // ----------------------------------------------------------------------------- // CCTSecurityDialogsAO::AddKeySizeL(...) // ----------------------------------------------------------------------------- // -void CCTSecurityDialogsAO::AddKeySizeL( TDes& aMessage, const CCTKeyInfo* aKeyInfo ) +void CCTSecurityDialogsAO::AddKeySizeL( TDes& /*aMessage*/, const CCTKeyInfo* /*aKeyInfo*/ ) { +/* TUint keySize = aKeyInfo->Size(); TBuf sizeBuf; @@ -1744,14 +1750,16 @@ R_TEXT_RESOURCE_DETAILS_VIEW_NOT_DEFINED ); aMessage.Append( KEnterEnter ); +*/ } // ----------------------------------------------------------------------------- // CCTSecurityDialogsAO::AddKeyUsageL(...) // ----------------------------------------------------------------------------- // -void CCTSecurityDialogsAO::AddKeyUsageL( TDes& aMessage, const CCTKeyInfo* aKeyInfo ) +void CCTSecurityDialogsAO::AddKeyUsageL( TDes& /*aMessage*/, const CCTKeyInfo* /*aKeyInfo*/ ) { +/* if ( aKeyInfo != NULL ) { TKeyUsagePKCS15 keyUsage = aKeyInfo->Usage(); @@ -1774,14 +1782,16 @@ DetailsFieldResourceL( aMessage, R_TEXT_RESOURCE_DETAILS_VIEW_KEY_USAGE, usage); } +*/ } // ----------------------------------------------------------------------------- // CCTSecurityDialogsAO::AddKeyUsageL(...) // ----------------------------------------------------------------------------- // -void CCTSecurityDialogsAO::AddKeyUsageL( TDes& aMessage, const CX509Certificate& aCert ) +void CCTSecurityDialogsAO::AddKeyUsageL( TDes& /*aMessage*/, const CX509Certificate& /*aCert*/ ) { +/* TKeyUsageX509 x509Usage = EX509UsageNone; TKeyUsagePKCS15 pkcs15KeyUsage = EPKCS15UsageNone; const CX509CertExtension* ext = aCert.Extension(KKeyUsage); @@ -1854,14 +1864,16 @@ } DetailsFieldResourceL( aMessage, R_TEXT_RESOURCE_DETAILS_VIEW_KEY_USAGE, usage ); +*/ } // ----------------------------------------------------------------------------- // CCTSecurityDialogsAO::AddKeyAlgorithmL(...) // ----------------------------------------------------------------------------- // -void CCTSecurityDialogsAO::AddKeyAlgorithmL( TDes& aMessage, const CCTKeyInfo* aKeyInfo ) +void CCTSecurityDialogsAO::AddKeyAlgorithmL( TDes& /*aMessage*/, const CCTKeyInfo* /*aKeyInfo*/ ) { +/* TInt algRes = 0; switch( aKeyInfo->Algorithm()) { @@ -1892,6 +1904,7 @@ } DetailsFieldResourceL( aMessage, R_TEXT_RESOURCE_DETAILS_VIEW_ALGORITHM, algRes); +*/ } // ----------------------------------------------------------------------------- @@ -1926,8 +1939,9 @@ // --------------------------------------------------------- // void CCTSecurityDialogsAO::AddLocationInfoL( - TDes& aMessage, TUid aUid, TBool aCertificate ) + TDes& /*aMessage*/, TUid /*aUid*/, TBool /*aCertificate*/ ) { +/* TInt location = 0; TInt locationRes =0; @@ -1968,6 +1982,7 @@ } DetailsFieldResourceL( aMessage, locationRes, location ); +*/ } // ----------------------------------------------------------------------------- @@ -1979,7 +1994,7 @@ { TLocale locale; TTimeIntervalSeconds offSet = locale.UniversalTimeOffset(); - DetailsResourceL( aMessage, R_TEXT_RESOURCE_DETAILS_VIEW_VALID_FROM ); + //DetailsResourceL( aMessage, R_TEXT_RESOURCE_DETAILS_VIEW_VALID_FROM ); const CValidityPeriod& validityPeriod = aCert.ValidityPeriod(); TTime startValue = validityPeriod.Start(); startValue += offSet; @@ -1994,7 +2009,7 @@ aMessage.Append( startString ); aMessage.Append( KEnterEnter ); - DetailsResourceL( aMessage, R_TEXT_RESOURCE_DETAILS_VIEW_VALID_UNTIL ); + //DetailsResourceL( aMessage, R_TEXT_RESOURCE_DETAILS_VIEW_VALID_UNTIL ); TTime finishValue = validityPeriod.Finish(); finishValue += offSet; TBuf finishString; @@ -2021,25 +2036,26 @@ case EX509CertificateUrl: case EX509Certificate: { - fieldType = R_TEXT_RESOURCE_DETAILS_VIEW_CERT_FORMAT_X509; + //fieldType = R_TEXT_RESOURCE_DETAILS_VIEW_CERT_FORMAT_X509; break; } default: { - fieldType = R_TEXT_RESOURCE_DETAILS_VIEW_NOT_DEFINED; + //fieldType = R_TEXT_RESOURCE_DETAILS_VIEW_NOT_DEFINED; break; } } - DetailsFieldResourceL( aMessage, - R_TEXT_RESOURCE_DETAILS_VIEW_CERT_FORMAT, fieldType ); + //DetailsFieldResourceL( aMessage, + // R_TEXT_RESOURCE_DETAILS_VIEW_CERT_FORMAT, fieldType ); } // ----------------------------------------------------------------------------- // CCTSecurityDialogsAO::AddCertAlgorithmsL(...) // ----------------------------------------------------------------------------- // -void CCTSecurityDialogsAO::AddCertAlgorithmsL( TDes& aMessage, const CX509Certificate& aCert ) +void CCTSecurityDialogsAO::AddCertAlgorithmsL( TDes& /*aMessage*/, const CX509Certificate& /*aCert*/ ) { +/* TInt fieldType = 0; TInt fieldType2 = 0; // digest algorithm @@ -2113,14 +2129,16 @@ CleanupStack::PopAndDestroy(); // stringHolder aMessage.Append( KEnterEnter ); } +*/ } // ----------------------------------------------------------------------------- // CCTSecurityDialogsAO::AddCertSerialNumberL(...) // ----------------------------------------------------------------------------- // -void CCTSecurityDialogsAO::AddCertSerialNumberL( TDes& aMessage, const CX509Certificate& aCert ) +void CCTSecurityDialogsAO::AddCertSerialNumberL( TDes& /*aMessage*/, const CX509Certificate& /*aCert*/ ) { +/* // certificate serial number DetailsResourceL( aMessage, R_TEXT_RESOURCE_DETAILS_VIEW_SERIAL_NUMBER ); TPtrC8 serialNumber = aCert.SerialNumber(); @@ -2133,14 +2151,16 @@ } aMessage.Append( KEnterEnter ); +*/ } // ----------------------------------------------------------------------------- // CCTSecurityDialogsAO::AddCertFingerprintsL(...) // ----------------------------------------------------------------------------- // -void CCTSecurityDialogsAO::AddCertFingerprintsL( TDes& aMessage, const CX509Certificate& aCert ) +void CCTSecurityDialogsAO::AddCertFingerprintsL( TDes& /*aMessage*/, const CX509Certificate& /*aCert*/ ) { +/* // certificate fingerprint SHA-1 DetailsResourceL( aMessage, R_TEXT_RESOURCE_DETAILS_VIEW_FINGERPRINT ); @@ -2158,6 +2178,7 @@ CleanupStack::PopAndDestroy( md5 ); DevideToBlocks( fingerprint, aMessage ); +*/ } // --------------------------------------------------------- diff -r b75757c81051 -r 318c4eab2439 pkiutilities/CTSecurityDialogs/data/CTsecdlgs.rss --- a/pkiutilities/CTSecurityDialogs/data/CTsecdlgs.rss Fri Mar 19 09:41:08 2010 +0200 +++ b/pkiutilities/CTSecurityDialogs/data/CTsecdlgs.rss Fri Apr 16 15:53:24 2010 +0300 @@ -24,7 +24,7 @@ #include #include #include -#include +//#include #include #include diff -r b75757c81051 -r 318c4eab2439 pkiutilities/CertSaver/data/CertSaver.rss --- a/pkiutilities/CertSaver/data/CertSaver.rss Fri Mar 19 09:41:08 2010 +0200 +++ b/pkiutilities/CertSaver/data/CertSaver.rss Fri Apr 16 15:53:24 2010 +0300 @@ -29,7 +29,7 @@ #include #include #include -#include //qtn_cm_not_valid_yet +//#include //qtn_cm_not_valid_yet #include #include "certsaver.hrh" diff -r b75757c81051 -r 318c4eab2439 pkiutilities/Certificates_OEM/data/S60_certificates/BeTrusted/BTCTRoot.der Binary file pkiutilities/Certificates_OEM/data/S60_certificates/BeTrusted/BTCTRoot.der has changed diff -r b75757c81051 -r 318c4eab2439 pkiutilities/Certificates_OEM/data/S60_certificates/BeTrusted/GTECTRoot.der Binary file pkiutilities/Certificates_OEM/data/S60_certificates/BeTrusted/GTECTRoot.der has changed diff -r b75757c81051 -r 318c4eab2439 pkiutilities/Certificates_OEM/data/S60_certificates/BeTrusted/btctmort.der Binary file pkiutilities/Certificates_OEM/data/S60_certificates/BeTrusted/btctmort.der has changed diff -r b75757c81051 -r 318c4eab2439 pkiutilities/Certificates_OEM/data/S60_certificates/BeTrusted/gtecybertrustroot.cer Binary file pkiutilities/Certificates_OEM/data/S60_certificates/BeTrusted/gtecybertrustroot.cer has changed diff -r b75757c81051 -r 318c4eab2439 pkiutilities/Certificates_OEM/data/S60_certificates/GoDaddy/gd-class2-root.der Binary file pkiutilities/Certificates_OEM/data/S60_certificates/GoDaddy/gd-class2-root.der has changed diff -r b75757c81051 -r 318c4eab2439 pkiutilities/group/bld.inf --- a/pkiutilities/group/bld.inf Fri Mar 19 09:41:08 2010 +0200 +++ b/pkiutilities/group/bld.inf Fri Apr 16 15:53:24 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -18,10 +18,8 @@ #include "../x509certnameparser/group/bld.inf" #include "../PKCS12/group/bld.inf" -#include "../CertmanUi/GROUP/bld.inf" #include "../CTSecurityDialogs/Group/bld.inf" #include "../CertSaver/group/bld.inf" -#include "../SecModUI/group/bld.inf" #include "../DeviceToken/Group/bld.inf" //Stub SIS @@ -40,14 +38,10 @@ // export iby files ../rom/x509certnameparser.iby CORE_MW_LAYER_IBY_EXPORT_PATH( x509certnameparser.iby ) ../rom/pkcs12.iby CORE_MW_LAYER_IBY_EXPORT_PATH( pkcs12.iby ) -../rom/certmanui.iby CORE_MW_LAYER_IBY_EXPORT_PATH( certmanui.iby ) -../rom/certmanui_resources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH( certmanui_resources.iby ) ../rom/CTSecurityDialogs.iby CORE_MW_LAYER_IBY_EXPORT_PATH( CTSecurityDialogs.iby ) ../rom/CTSecurityDialogs_resources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH( CTSecurityDialogs_resources.iby ) ../rom/CertSaver.iby CORE_MW_LAYER_IBY_EXPORT_PATH( CertSaver.iby ) ../rom/CertSaver_resources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH( CertSaver_resources.iby ) -../rom/SecModUI.iby CORE_MW_LAYER_IBY_EXPORT_PATH( SecModUI.iby ) -../rom/SecModUI_resources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH( SecModUI_resources.iby ) ../rom/DevToken.iby CORE_MW_LAYER_IBY_EXPORT_PATH( DevToken.iby ) ../rom/StubSIS.iby CORE_MW_LAYER_IBY_EXPORT_PATH( StubSIS.iby ) diff -r b75757c81051 -r 318c4eab2439 pkiutilities/ocsp/group/securitysrv_ocsp.mrp --- a/pkiutilities/ocsp/group/securitysrv_ocsp.mrp Fri Mar 19 09:41:08 2010 +0200 +++ b/pkiutilities/ocsp/group/securitysrv_ocsp.mrp Fri Apr 16 15:53:24 2010 +0300 @@ -1,3 +1,19 @@ +# +# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + component securitysrv_ocsp source \sf\mw\securitysrv\pkiutilities\ocsp binary \sf\mw\securitysrv\pkiutilities\ocsp\group all diff -r b75757c81051 -r 318c4eab2439 remotelock/RemoteLockEngine/Src/RemoteLock.cpp --- a/remotelock/RemoteLockEngine/Src/RemoteLock.cpp Fri Mar 19 09:41:08 2010 +0200 +++ b/remotelock/RemoteLockEngine/Src/RemoteLock.cpp Fri Apr 16 15:53:24 2010 +0300 @@ -26,7 +26,7 @@ #include //CSmsClientMtm #include #include //file system utilities -#include +#include #ifdef RD_MULTIPLE_DRIVE #include #else diff -r b75757c81051 -r 318c4eab2439 secsrv_plat/devicelock_access_api/group/ABLD.BAT --- a/secsrv_plat/devicelock_access_api/group/ABLD.BAT Fri Mar 19 09:41:08 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -@ECHO OFF - -REM Bldmake-generated batch file - ABLD.BAT -REM ** DO NOT EDIT ** - -perl -S ABLD.PL "\s60\mw\devicemanagement\devmngt_dom\devicelock_access_api\group\\" %1 %2 %3 %4 %5 %6 %7 %8 %9 -if errorlevel==1 goto CheckPerl -goto End - -:CheckPerl -perl -v >NUL -if errorlevel==1 echo Is Perl, version 5.003_07 or later, installed? -goto End - -:End diff -r b75757c81051 -r 318c4eab2439 secsrv_plat/keyguard_access_api/group/ABLD.BAT --- a/secsrv_plat/keyguard_access_api/group/ABLD.BAT Fri Mar 19 09:41:08 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -@ECHO OFF - -REM Bldmake-generated batch file - ABLD.BAT -REM ** DO NOT EDIT ** - -perl -S ABLD.PL "\s60\mw\devicemanagement\devmngt_dom\keyguard_access_api\group\\" %1 %2 %3 %4 %5 %6 %7 %8 %9 -if errorlevel==1 goto CheckPerl -goto End - -:CheckPerl -perl -v >NUL -if errorlevel==1 echo Is Perl, version 5.003_07 or later, installed? -goto End - -:End diff -r b75757c81051 -r 318c4eab2439 secsrv_plat/lockapp_server_api/group/ABLD.BAT --- a/secsrv_plat/lockapp_server_api/group/ABLD.BAT Fri Mar 19 09:41:08 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -@ECHO OFF - -REM Bldmake-generated batch file - ABLD.BAT -REM ** DO NOT EDIT ** - -perl -S ABLD.PL "\s60\mw\devicemanagement\devmngt_dom\lockapp_server_api\group\\" %1 %2 %3 %4 %5 %6 %7 %8 %9 -if errorlevel==1 goto CheckPerl -goto End - -:CheckPerl -perl -v >NUL -if errorlevel==1 echo Is Perl, version 5.003_07 or later, installed? -goto End - -:End diff -r b75757c81051 -r 318c4eab2439 secsrv_plat/security_code_ui_api/inc/SecUiSecuritySettings.h --- a/secsrv_plat/security_code_ui_api/inc/SecUiSecuritySettings.h Fri Mar 19 09:41:08 2010 +0200 +++ b/secsrv_plat/security_code_ui_api/inc/SecUiSecuritySettings.h Fri Apr 16 15:53:24 2010 +0300 @@ -26,6 +26,9 @@ #include #include +#define KSecUiAskNever 1 +#define KSecUiAskOnlyIfInvalid 2 +#define KSecUiAskAlways 3 class CWait; class CSecurityHandler; @@ -175,6 +178,27 @@ TInt RemoteLockCodeQueryL( TDes& aRemoteLockCode ); + /** + * Same functions, taking parameters. This is used in QT because the Settings handles it. + * + * @param aOldPassword RMobilePhone::TMobilePassword : current password, probably asked to the user by other means + * @param aNewPassword RMobilePhone::TMobilePassword : current password, probably asked to the user by other means + * @param aFlags TInt : when to ask for the password + * @param aCaption TDes& : caption to show in the dialog. If NULL, then the function will calculate it. If empty, it will be empty + * @param aShowError TInt : in case of error, it will show it. If this is not set, then no errors will be displayed. + * @return TInt: KErrNone (succesful) , KErrGsm0707IncorrectPassword, KErrAccessDenied, KErrGsmSSPasswordAttemptsViolation, KErrLocked, KErrGsm0707OperationNotAllowed, KErrAbort, KErrNotSupported, ... + */ + IMPORT_C TInt ChangePinParamsL(RMobilePhone::TMobilePassword aOldPassword, RMobilePhone::TMobilePassword aNewPassword, TInt aFlags, TDes& aCaption, TInt aShowError); + IMPORT_C TInt ChangeUPinParamsL(RMobilePhone::TMobilePassword aOldPassword, RMobilePhone::TMobilePassword aNewPassword, TInt aFlags, TDes& aCaption, TInt aShowError); + IMPORT_C TInt ChangePin2ParamsL(RMobilePhone::TMobilePassword aOldPassword, RMobilePhone::TMobilePassword aNewPassword, TInt aFlags, TDes& aCaption, TInt aShowError); + IMPORT_C TInt ChangeSecCodeParamsL(RMobilePhone::TMobilePassword aOldPassword, RMobilePhone::TMobilePassword aNewPassword, TInt aFlags, TDes& aCaption, TInt aShowError); + IMPORT_C TInt ChangeAutoLockPeriodParamsL(TInt aPeriod, RMobilePhone::TMobilePassword aOldPassword, TInt aFlags, TDes& aCaption, TInt aShowError); + /* if aOldPassword is used, then try to verify. + KSecUiAskNever, KSecUiAskOnlyIfInvalid, KSecUiAskAlways + */ + IMPORT_C TInt AskSecCodeParamsL(RMobilePhone::TMobilePassword &aOldPassword, TInt aFlags, TDes& aCaption, TInt aShowError); + IMPORT_C TInt ChangePinRequestParamsL(TInt aEnable, RMobilePhone::TMobilePassword aOldPassword, TInt aFlags, TDes& aCaption, TInt aShowError); + private: TInt RemoteLockSetLockSettingL( TBool aLockSetting ); diff -r b75757c81051 -r 318c4eab2439 securitydialogs/Autolock/src/AutoKeyguardObserver.cpp --- a/securitydialogs/Autolock/src/AutoKeyguardObserver.cpp Fri Mar 19 09:41:08 2010 +0200 +++ b/securitydialogs/Autolock/src/AutoKeyguardObserver.cpp Fri Apr 16 15:53:24 2010 +0300 @@ -29,7 +29,7 @@ #include #include #include -#include +// #include #include #include "AutoKeyguardCenRepI.h" #include "AutoKeyguardObserver.h" @@ -358,12 +358,18 @@ autolockOn = (value > EAutolockOff); value = 0; + /* This is not used any more because screensavers are removed now RProperty::Get(KPSUidScreenSaver, KScreenSaverOn, value); screenSaverOn = (value == KSsOn); + */ + screenSaverOn = ETrue; + /* This is not used any more because screensavers are removed now value = 0; RProperty::Get(KPSUidScreenSaver, KScreenSaverActivatedFromIdle, value); screenSaverStertedFromIdle = (value == KSsStartedFromIdle); + */ + screenSaverStertedFromIdle = ETrue; //See if all the startup related queries and graphics has been displayed value = 0; diff -r b75757c81051 -r 318c4eab2439 securitydialogs/SecUi/BWinsCw/SECUI_EKA2U.def --- a/securitydialogs/SecUi/BWinsCw/SECUI_EKA2U.def Fri Mar 19 09:41:08 2010 +0200 +++ b/securitydialogs/SecUi/BWinsCw/SECUI_EKA2U.def Fri Apr 16 15:53:24 2010 +0300 @@ -46,4 +46,26 @@ ?UnblockPinL@CManualSecuritySettings@@QAEHW4TPin@1@ABVTDesC16@@11@Z @ 45 NONAME ; int CManualSecuritySettings::UnblockPinL(enum CManualSecuritySettings::TPin, class TDesC16 const &, class TDesC16 const &, class TDesC16 const &) ?UnlockSimL@CManualSecuritySettings@@QAEHABVTDesC16@@0@Z @ 46 NONAME ; int CManualSecuritySettings::UnlockSimL(class TDesC16 const &, class TDesC16 const &) ?HandleEventL@CSecurityHandler@@QAEXW4TMobilePhoneSecurityEvent@RMobilePhone@@HAAH@Z @ 47 NONAME ; void CSecurityHandler::HandleEventL(enum RMobilePhone::TMobilePhoneSecurityEvent, int, int &) + ?DisplayPermanentNoteL@CSecQueryUi@@QAEXABVTDesC16@@@Z @ 48 NONAME ; void CSecQueryUi::DisplayPermanentNoteL(class TDesC16 const &) + ?DisplayErrorNoteL@CSecQueryUi@@QAEXABVTDesC16@@@Z @ 49 NONAME ; void CSecQueryUi::DisplayErrorNoteL(class TDesC16 const &) + ?NewLC@CSecQueryUi@@SAPAV1@XZ @ 50 NONAME ; class CSecQueryUi * CSecQueryUi::NewLC(void) + ?LaunchHelpL@CSecQueryUi@@QAEXABVTDesC16@@@Z @ 51 NONAME ; void CSecQueryUi::LaunchHelpL(class TDesC16 const &) + ?ChangePin2ParamsL@CSecuritySettings@@QAEHV?$TBuf@$09@@0HAAVTDes16@@H@Z @ 52 NONAME ; int CSecuritySettings::ChangePin2ParamsL(class TBuf<10>, class TBuf<10>, int, class TDes16 &, int) + ?InstallConfirmationQueryL@CSecQueryUi@@QAEHHAAV?$TBuf@$09@@@Z @ 53 NONAME ; int CSecQueryUi::InstallConfirmationQueryL(int, class TBuf<10> &) + ?ChangePinParamsL@CSecuritySettings@@QAEHV?$TBuf@$09@@0HAAVTDes16@@H@Z @ 54 NONAME ; int CSecuritySettings::ChangePinParamsL(class TBuf<10>, class TBuf<10>, int, class TDes16 &, int) + ?DisplayWarningNoteL@CSecQueryUi@@QAEXABVTDesC16@@@Z @ 55 NONAME ; void CSecQueryUi::DisplayWarningNoteL(class TDesC16 const &) + ?DisplayInformationNoteL@CSecQueryUi@@QAEXABVTDesC16@@@Z @ 56 NONAME ; void CSecQueryUi::DisplayInformationNoteL(class TDesC16 const &) + ?NewL@CSecQueryUi@@SAPAV1@XZ @ 57 NONAME ; class CSecQueryUi * CSecQueryUi::NewL(void) + ?SecQueryDialog@CSecQueryUi@@QAEHABVTDesC16@@AAVTDes16@@HHH@Z @ 58 NONAME ; int CSecQueryUi::SecQueryDialog(class TDesC16 const &, class TDes16 &, int, int, int) + ?ChangeUPinParamsL@CSecuritySettings@@QAEHV?$TBuf@$09@@0HAAVTDes16@@H@Z @ 59 NONAME ; int CSecuritySettings::ChangeUPinParamsL(class TBuf<10>, class TBuf<10>, int, class TDes16 &, int) + ?CloseWaitNote@CSecQueryUi@@QAEXXZ @ 60 NONAME ; void CSecQueryUi::CloseWaitNote(void) + ?UpdateProgressNoteValueL@CSecQueryUi@@QAEXH@Z @ 61 NONAME ; void CSecQueryUi::UpdateProgressNoteValueL(int) + ?DisplayProgressNoteL@CSecQueryUi@@QAEXABVTDesC16@@H@Z @ 62 NONAME ; void CSecQueryUi::DisplayProgressNoteL(class TDesC16 const &, int) + ?DisplayWaitNoteL@CSecQueryUi@@QAEXABVTDesC16@@AAVTRequestStatus@@@Z @ 63 NONAME ; void CSecQueryUi::DisplayWaitNoteL(class TDesC16 const &, class TRequestStatus &) + ?ChangePinRequestParamsL@CSecuritySettings@@QAEHHV?$TBuf@$09@@HAAVTDes16@@H@Z @ 64 NONAME ; int CSecuritySettings::ChangePinRequestParamsL(int, class TBuf<10>, int, class TDes16 &, int) + ?ChangeSecCodeParamsL@CSecuritySettings@@QAEHV?$TBuf@$09@@0HAAVTDes16@@H@Z @ 65 NONAME ; int CSecuritySettings::ChangeSecCodeParamsL(class TBuf<10>, class TBuf<10>, int, class TDes16 &, int) + ?CloseProgressNoteL@CSecQueryUi@@QAEXXZ @ 66 NONAME ; void CSecQueryUi::CloseProgressNoteL(void) + ?ClosePermanentNote@CSecQueryUi@@QAEXXZ @ 67 NONAME ; void CSecQueryUi::ClosePermanentNote(void) + ?ChangeAutoLockPeriodParamsL@CSecuritySettings@@QAEHHV?$TBuf@$09@@HAAVTDes16@@H@Z @ 68 NONAME ; int CSecuritySettings::ChangeAutoLockPeriodParamsL(int, class TBuf<10>, int, class TDes16 &, int) + ?LaunchHelpL@CSecQueryUi@@QAEXABVTDesC16@@ABVTUid@@@Z @ 69 NONAME ; void CSecQueryUi::LaunchHelpL(class TDesC16 const &, class TUid const &) diff -r b75757c81051 -r 318c4eab2439 securitydialogs/SecUi/EABI/Secuiu.def --- a/securitydialogs/SecUi/EABI/Secuiu.def Fri Mar 19 09:41:08 2010 +0200 +++ b/securitydialogs/SecUi/EABI/Secuiu.def Fri Apr 16 15:53:24 2010 +0300 @@ -75,4 +75,28 @@ _ZTV23CManualSecuritySettings @ 74 NONAME ; ## _ZTV5CWait @ 75 NONAME ; ## _ZN16CSecurityHandler12HandleEventLEN12RMobilePhone25TMobilePhoneSecurityEventEiRi @ 76 NONAME + _ZN11CSecQueryUi11LaunchHelpLERK7TDesC16 @ 77 NONAME + _ZN11CSecQueryUi11LaunchHelpLERK7TDesC16RK4TUid @ 78 NONAME + _ZN11CSecQueryUi13CloseWaitNoteEv @ 79 NONAME + _ZN11CSecQueryUi14SecQueryDialogERK7TDesC16R6TDes16iii @ 80 NONAME + _ZN11CSecQueryUi16DisplayWaitNoteLERK7TDesC16R14TRequestStatus @ 81 NONAME + _ZN11CSecQueryUi17DisplayErrorNoteLERK7TDesC16 @ 82 NONAME + _ZN11CSecQueryUi18ClosePermanentNoteEv @ 83 NONAME + _ZN11CSecQueryUi18CloseProgressNoteLEv @ 84 NONAME + _ZN11CSecQueryUi19DisplayWarningNoteLERK7TDesC16 @ 85 NONAME + _ZN11CSecQueryUi20DisplayProgressNoteLERK7TDesC16i @ 86 NONAME + _ZN11CSecQueryUi21DisplayPermanentNoteLERK7TDesC16 @ 87 NONAME + _ZN11CSecQueryUi23DisplayInformationNoteLERK7TDesC16 @ 88 NONAME + _ZN11CSecQueryUi24UpdateProgressNoteValueLEi @ 89 NONAME + _ZN11CSecQueryUi25InstallConfirmationQueryLEiR4TBufILi10EE @ 90 NONAME + _ZN11CSecQueryUi4NewLEv @ 91 NONAME + _ZN11CSecQueryUi5NewLCEv @ 92 NONAME + _ZN17CSecuritySettings16ChangePinParamsLE4TBufILi10EES1_iR6TDes16i @ 93 NONAME + _ZN17CSecuritySettings17ChangePin2ParamsLE4TBufILi10EES1_iR6TDes16i @ 94 NONAME + _ZN17CSecuritySettings17ChangeUPinParamsLE4TBufILi10EES1_iR6TDes16i @ 95 NONAME + _ZN17CSecuritySettings20ChangeSecCodeParamsLE4TBufILi10EES1_iR6TDes16i @ 96 NONAME + _ZN17CSecuritySettings23ChangePinRequestParamsLEi4TBufILi10EEiR6TDes16i @ 97 NONAME + _ZN17CSecuritySettings27ChangeAutoLockPeriodParamsLEi4TBufILi10EEiR6TDes16i @ 98 NONAME + _ZTI11CSecQueryUi @ 99 NONAME + _ZTV11CSecQueryUi @ 100 NONAME diff -r b75757c81051 -r 318c4eab2439 securitydialogs/SecUi/Inc/SecQueryUi.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/SecUi/Inc/SecQueryUi.h Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,205 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: CSecQueryUi API can be used to implement UI dialogs for +* SecUi plugins. +*/ + + +#ifndef C_SECQUERYUI_H +#define C_SECQUERYUI_H + +#include // CActive +#include // MHbDeviceDialogObserver +#include + +#define ESecUiCancelSupported 0x1000000 +#define ESecUiCancelNotSupported 0x0000000 + +#define ESecUiEmergencySupported 0x2000000 +#define ESecUiEmergencyNotSupported 0x0000000 + +class MSecQueryUiCertificateDetailsProvider; +class MSecQueryUiDrmDetailsProvider; +class CHbDeviceDialog; +class CHbSymbianVariantMap; +class CActiveSchedulerWait; +class CApaMaskedBitmap; + +/** + * CSecQueryUi provides UI dialogs for SW installation. UI dialogs are + * global and they can be used in a non-UI code (like in SIF plugins). + * SW install device dialog plugin implements the UI dialogs. + * + * @lib SecQueryUi.lib + * @since 10.1 + */ +class CSecQueryUi : public CActive, public MHbDeviceDialogObserver + { + public: // constructor and destructor + /** + * Creates new CSecQueryUi object and pushes it into cleanup stack. + * @returns CSecQueryUi* -- new CSecQueryUi object + */ + IMPORT_C static CSecQueryUi* NewLC(); + + /** + * Creates new CSecQueryUi object. + * @returns CSecQueryUi* -- new CSecQueryUi object + */ + IMPORT_C static CSecQueryUi* NewL(); + + /** + * Destructor. + */ + CSecQueryUi::~CSecQueryUi(); + + public: // new functions + /** + * Displays install confirmation query synchronously. Synchronous function + * returns after the user has accepted or cancelled the query. + * @param aAppDetails - other application details (like supplier) + * @return TBool - ETrue if user accepted the query, EFalse otherwise + */ + IMPORT_C TBool InstallConfirmationQueryL( TInt aType, RMobilePhone::TMobilePassword& password ); + IMPORT_C TInt SecQueryDialog(const TDesC& aCaption, TDes& aDataText, TInt aMinLength,TInt aMaxLength,TInt aMode); + /* + IMPORT_C TBool InstallConfirmationQueryL( const TDesC& aAppName, + const TDesC& aIconFile, const TDesC& aAppVersion, TInt aAppSize, + const TDesC& aAppDetails ); + */ + + /** + * Displays information note. If the information note is already displayed, then + * only the dialog text is updated. Information note is closed automatically after + * pre-defined time (e.g. after 1.5 seconds). User can also press any key to close + * the note faster. + * @param aText - info text to be displayed + */ + IMPORT_C void DisplayInformationNoteL( const TDesC& aText ); + + /** + * Displays warning note. If the warning note is already displayed, then only the note + * text is updated. Warning note is closed automatically after pre-defined time (e.g. + * after three seconds). User can also press any key to close the note faster. + * @param aText - error text to be displayed + */ + IMPORT_C void DisplayWarningNoteL( const TDesC& aText ); + + /** + * Displays error note. If the error note is already displayed, then only the dialog + * text is updated. Error note is closed automatically after pre-defined time (e.g. + * after three seconds). User can also press any key to close the note faster. + * @param aText - error text to be displayed + */ + IMPORT_C void DisplayErrorNoteL( const TDesC& aText ); + + /** + * Displays permanent note. If the permanent note is already displayed, then only the + * dialog text is updated. User cannot cancel or close permanent notes. Permanent note + * is displayed until ClosePermanentNote() is called. Delayed notes are displayed after + * pre-defined delay time, and they may be closed before they appear on the screen. + * @param aText - text to be displayed + * @param aIsDelayed - ETrue if delayed dialog should be used + */ + IMPORT_C void DisplayPermanentNoteL( const TDesC& aText ); + + /** + * Closes the permanent note. + */ + IMPORT_C void ClosePermanentNote(); + + /** + * Displays progress note using aFinalValue. Use UpdateProgressNoteValueL() to + * update the progress bar. If the progress note is already active, then only + * the note text and final value are updated. + * @param aText - text displayed in progress note + * @param aFinalValue - final value of the progress bar + */ + IMPORT_C void DisplayProgressNoteL( const TDesC& aText, TInt aFinalValue ); + + /** + * Updates the progress bar in progress note. Progress bar shows 0% when + * aNewValue is zero (or less than zero), and full 100% when aNewValue is + * equal (or more than) the final value set with SetProgressNoteFinalValueL(). + * @param aNewValue - new value for the progress bar + */ + IMPORT_C void UpdateProgressNoteValueL( TInt aNewValue ); + + /** + * Closes the progress note. TRequestStatus set in DisplayProgressNoteL() is + * completed with KErrNone. Note that it is completed with KErrCancel if user + * cancels the note, or with error code if some error happens. + */ + IMPORT_C void CloseProgressNoteL(); + + /** + * Displays wait note. If the wait note is already displayed, then only the note + * text is updated. Wait note is like progress note, except that it is not known + * how long the operation takes. User can cancel the operation as in progress note. + * @param aText - text to be displayed + * @param aStatus - request status that indicates if user cancels the note + */ + IMPORT_C void DisplayWaitNoteL( const TDesC& aText, TRequestStatus& aStatus ); + + /** + * Closes the wait note. + */ + IMPORT_C void CloseWaitNote(); + + /** + * Launches help with the help context aContext for application aUid. + * @param aContext - help context to be displayed + * @param aUid - application which help needs to be launched + */ + IMPORT_C void LaunchHelpL( const TDesC& aContext, const TUid& aUid ); + + /** + * Launches SW Install application (UID 0x101F8512) help using the + * help context aContext. + * @param aContext - help context to be displayed + */ + IMPORT_C void LaunchHelpL( const TDesC& aContext ); + + protected: // from CActive + void DoCancel(); + void RunL(); + + private: // from MHbDeviceDialogObserver + void DataReceived( CHbSymbianVariantMap& aData ); + void DeviceDialogClosed( TInt aCompletionCode ); + + private: // new functions + CSecQueryUi(); + void ConstructL(); + void ClearParamsL(); + void ClearParamsAndSetNoteTypeL( TInt aType ); + void AddParamL( const TDesC& aKey, TInt aValue ); + void AddParamL( const TDesC& aKey, const TDesC& aValue ); + void DisplayDeviceDialogL(); + TInt WaitUntilDeviceDialogClosed(); + + private: // data + CHbDeviceDialog* iDeviceDialog; + CHbSymbianVariantMap* iVariantMap; + CActiveSchedulerWait* iWait; + TBool iIsDisplayingDialog; + TInt iCompletionCode; + TInt iReturnValue; +public: + RMobilePhone::TMobilePassword iPassword; + }; + + +#endif // C_SECQUERYUI_H + diff -r b75757c81051 -r 318c4eab2439 securitydialogs/SecUi/Src/SecQueryUi.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/SecUi/Src/SecQueryUi.cpp Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,450 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implementation of RSecQueryUiCli class. +* +*/ + +#include "SecQueryUi.h" // CSecQueryUi +// #include // SIF UI device dialog parameters +#include // CHbDeviceDialog +#include // CHbSymbianVariantMap +#include // CApaMaskedBitmap + + +// Variant map keys for notification device dialog +_LIT( KNotifDeviceDialogLiteral, "com.nokia.hb.devicenotificationdialog/1.0" ); +_LIT( KNotifDeviceDialogKeyTimeOut, "timeout" ); +_LIT( KNotifDeviceDialogKeyIconName, "iconName" ); +_LIT( KNotifDeviceDialogKeyText, "text" ); +_LIT( KNotifDeviceDialogKeyTitle, "title" ); +_LIT( KNotifDeviceDialogKeyTouchActivation, "touchActivation" ); +_LIT( KNotifDeviceDialogKeyActivated, "result" ); +_LIT( KNotifDeviceDialogKeyActivatedValue, "activated" ); +_LIT( KNotifDeviceDialogKeyTitleTextWrapping, "titleTextWrapping" ); + +const TInt KMaxNumberOfPINAttempts(3); +const TInt KLastRemainingInputAttempt(1); + +const TUid KSWInstHelpUid = { 0x101F8512 }; // TODO + + +// ======== MEMBER FUNCTIONS ======== + +// --------------------------------------------------------------------------- +// CSecQueryUi::NewLC() +// --------------------------------------------------------------------------- +// +EXPORT_C CSecQueryUi* CSecQueryUi::NewLC() + { + CSecQueryUi* self = new( ELeave ) CSecQueryUi(); + CleanupStack::PushL( self ); + self->ConstructL(); + return self; + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::NewL() +// --------------------------------------------------------------------------- +// +EXPORT_C CSecQueryUi* CSecQueryUi::NewL() + { + CSecQueryUi* self = CSecQueryUi::NewLC(); + CleanupStack::Pop( self ); + return self; + } + + +// --------------------------------------------------------------------------- +// CSecQueryUi::~CSecQueryUi() +// --------------------------------------------------------------------------- +// +CSecQueryUi::~CSecQueryUi() + { + Cancel(); + delete iWait; + delete iDeviceDialog; + delete iVariantMap; + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::InstallConfirmationQueryL() +// --------------------------------------------------------------------------- +// +EXPORT_C TBool CSecQueryUi::InstallConfirmationQueryL( TInt aType, RMobilePhone::TMobilePassword& password ) +/* + const TDesC& aAppName, + const TDesC& aIconFile, const TDesC& aAppVersion, TInt aAppSize, + const TDesC& aAppDetails ) */ + { + RDebug::Printf( "%s %s (%u) aType=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, aType ); + RDebug::Printf( "%s %s (%u) password=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + TInt ESecQueryUiInstallConfirmationQueryType=0x101; + ClearParamsAndSetNoteTypeL( ESecQueryUiInstallConfirmationQueryType ); + + AddParamL( _L("KSecQueryUiApplicationName"), _L("SecUi") ); + + _LIT(KTitle, "title"); + _LIT(KTitleValue1, "Enter PIN"); + _LIT(KTitleValue2, "Enter PIN with care"); + _LIT(KTitleValue3, "Enter PIN last"); + if(aType==KMaxNumberOfPINAttempts) + AddParamL( KTitle, KTitleValue1 ); + else if(aType> KLastRemainingInputAttempt) + AddParamL( KTitle, KTitleValue2 ); + else + AddParamL( KTitle, KTitleValue3 ); + + _LIT( KCodeTop, "codeTop" ); _LIT( KCodeTopValue, "codeTop" ); + AddParamL( KCodeTop, KCodeTopValue ); + + RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + DisplayDeviceDialogL(); + User::LeaveIfError( WaitUntilDeviceDialogClosed() ); + password.Copy(iPassword); + return( iReturnValue == KErrNone ); + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::SecQueryDialog() +// --------------------------------------------------------------------------- +// +EXPORT_C TInt CSecQueryUi::SecQueryDialog(const TDesC& aCaption, TDes& aDataText, TInt aMinLength,TInt aMaxLength,TInt aMode) + { + RDebug::Printf( "%s %s (%u) aCaption=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + RDebug::Print( aCaption ); + RDebug::Printf( "%s %s (%u) aMode=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, aMode ); + + ClearParamsAndSetNoteTypeL( aMode ); + AddParamL( _L("KSecQueryUiApplicationName"), aCaption ); + + _LIT(KTitle, "title"); + // _LIT(KTitleValue1, "Enter PIN"); + AddParamL( KTitle, aCaption ); + + _LIT( KCodeTop, "codeTop" ); _LIT( KCodeTopValue, "codeTop" ); + AddParamL( KCodeTop, KCodeTopValue ); + + RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + DisplayDeviceDialogL(); + User::LeaveIfError( WaitUntilDeviceDialogClosed() ); + aDataText.Copy(iPassword); + return( iReturnValue == KErrNone ); + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::DisplayInformationNoteL() +// --------------------------------------------------------------------------- +// +EXPORT_C void CSecQueryUi::DisplayInformationNoteL( const TDesC& aText ) + { + /* + ClearParamsAndSetNoteTypeL( SecQueryUiInformationNote ); + AddParamL( KNotifDeviceDialogKeyText, aText ); + AddParamL( KNotifDeviceDialogKeyTimeOut, 0 ); + iDeviceDialog->Show( KNotifDeviceDialogLiteral, *iVariantMap, this ); + User::LeaveIfError( WaitUntilDeviceDialogClosed() ); + */ + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::DisplayWarningNoteL() +// --------------------------------------------------------------------------- +// +EXPORT_C void CSecQueryUi::DisplayWarningNoteL( const TDesC& aText ) + { + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::DisplayErrorNoteL() +// --------------------------------------------------------------------------- +// +EXPORT_C void CSecQueryUi::DisplayErrorNoteL( const TDesC& aText ) + { + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::DisplayPermanentNoteL() +// --------------------------------------------------------------------------- +// +EXPORT_C void CSecQueryUi::DisplayPermanentNoteL( const TDesC& aText ) + { + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::ClosePermanentNote() +// --------------------------------------------------------------------------- +// +EXPORT_C void CSecQueryUi::ClosePermanentNote() + { + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::DisplayProgressNoteL() +// --------------------------------------------------------------------------- +// +EXPORT_C void CSecQueryUi::DisplayProgressNoteL( const TDesC& aText, TInt aFinalValue ) + { +/* + ClearParamsAndSetNoteTypeL( ESecQueryUiProgressNoteType ); + AddParamL( KSecQueryUiProgressNoteText, aText ); + AddParamL( KSecQueryUiProgressNoteFinalValue, aFinalValue ); + DisplayDeviceDialogL(); +*/ } + +// --------------------------------------------------------------------------- +// CSecQueryUi::UpdateProgressNoteValueL() +// --------------------------------------------------------------------------- +// +EXPORT_C void CSecQueryUi::UpdateProgressNoteValueL( TInt aNewValue ) + { +/* + ClearParamsAndSetNoteTypeL( ESecQueryUiProgressNoteType ); + AddParamL( KSecQueryUiProgressNoteValue, aNewValue ); + DisplayDeviceDialogL(); +*/ } + +// --------------------------------------------------------------------------- +// CSecQueryUi::CloseProgressNoteL() +// --------------------------------------------------------------------------- +// +EXPORT_C void CSecQueryUi::CloseProgressNoteL() + { + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::DisplayWaitNoteL() +// --------------------------------------------------------------------------- +// +EXPORT_C void CSecQueryUi::DisplayWaitNoteL( const TDesC& aText, + TRequestStatus& aStatus ) + { + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::CloseWaitNote() +// --------------------------------------------------------------------------- +// +EXPORT_C void CSecQueryUi::CloseWaitNote() + { + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::LaunchHelpL() +// --------------------------------------------------------------------------- +// +EXPORT_C void CSecQueryUi::LaunchHelpL( const TDesC& aContext, const TUid& aUid ) + { + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::LaunchHelpL() +// --------------------------------------------------------------------------- +// +EXPORT_C void CSecQueryUi::LaunchHelpL( const TDesC& aContext ) + { + LaunchHelpL( aContext, KSWInstHelpUid ); + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::DoCancel() +// --------------------------------------------------------------------------- +// +void CSecQueryUi::DoCancel() + { + RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + if( iWait && iWait->IsStarted() && iWait->CanStopNow() ) + { + iCompletionCode = KErrCancel; + iWait->AsyncStop(); + } + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::RunL() +// --------------------------------------------------------------------------- +// +void CSecQueryUi::RunL() + { + RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + if( iWait ) + { + iWait->AsyncStop(); + } + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::DataReceived() +// --------------------------------------------------------------------------- +// +void CSecQueryUi::DataReceived( CHbSymbianVariantMap& aData ) + { + RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + const CHbSymbianVariant* acceptedVariant = aData.Get( _L("accepted") ); // KSecQueryUiQueryAccepted + if( acceptedVariant ) + { + TBool* acceptedValue = acceptedVariant->Value(); + if( acceptedValue && *acceptedValue ) + { + iReturnValue = KErrNone; + } + else + { + iReturnValue = KErrCancel; + } + } + const CHbSymbianVariant* acceptedVariantTop = aData.Get( _L("codeTop") ); // KSecQueryUiQueryAccepted + if( acceptedVariantTop ) + { + TPtrC acceptedValueTop = *acceptedVariantTop->Value(); + RDebug::Printf( "%s %s (%u) acceptedValueTop=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + RDebug::Print( acceptedValueTop ); + iPassword.Copy(acceptedValueTop); + } + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::DeviceDialogClosed() +// --------------------------------------------------------------------------- +// +void CSecQueryUi::DeviceDialogClosed( TInt aCompletionCode ) + { + RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + iCompletionCode = aCompletionCode; + iIsDisplayingDialog = EFalse; + + TRequestStatus* status( &iStatus ); + User::RequestComplete( status, KErrNone ); + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::CSecQueryUi() +// --------------------------------------------------------------------------- +// +CSecQueryUi::CSecQueryUi() : CActive( CActive::EPriorityStandard ) + { + RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + CActiveScheduler::Add( this ); + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::ConstructL() +// --------------------------------------------------------------------------- +// +void CSecQueryUi::ConstructL() + { + RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + iWait = new( ELeave ) CActiveSchedulerWait; + // iDeviceDialog is allocated later, first call of DisplayDeviceDialogL() + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::ClearParamsL() +// --------------------------------------------------------------------------- +// +void CSecQueryUi::ClearParamsL() + { + if( iVariantMap ) + { + delete iVariantMap; + iVariantMap = NULL; + } + iVariantMap = CHbSymbianVariantMap::NewL(); + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::ClearParamsAndSetNoteTypeL() +// --------------------------------------------------------------------------- +// +void CSecQueryUi::ClearParamsAndSetNoteTypeL( TInt aType ) + { + RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + ClearParamsL(); + AddParamL( _L("type"), aType ); + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::AddParamL() +// --------------------------------------------------------------------------- +// +void CSecQueryUi::AddParamL( const TDesC& aKey, TInt aValue ) + { + RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + CHbSymbianVariant* variant = NULL; + variant = CHbSymbianVariant::NewL( &aValue, CHbSymbianVariant::EInt ); + iVariantMap->Add( aKey, variant ); + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::AddParamL() +// --------------------------------------------------------------------------- +// +void CSecQueryUi::AddParamL( const TDesC& aKey, const TDesC& aValue ) + { + RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + CHbSymbianVariant* variant = NULL; + variant = CHbSymbianVariant::NewL( &aValue, CHbSymbianVariant::EDes ); + iVariantMap->Add( aKey, variant ); + } + +TInt strlen( const char* aStr ) + { + TInt len = 0; + while( *aStr++ != 0 ) + ++len; + return len; + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::DisplayDeviceDialogL() +// --------------------------------------------------------------------------- +// +void CSecQueryUi::DisplayDeviceDialogL() + { + RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + if( iDeviceDialog && iIsDisplayingDialog ) + { + iDeviceDialog->Update( *iVariantMap ); + } + else + { + if( !iDeviceDialog ) + { + iDeviceDialog = CHbDeviceDialog::NewL(); + } + _LIT( KSecQueryUiDeviceDialog, "com.nokia.secuinotificationdialog/1.0" ); + RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + iDeviceDialog->Show( KSecQueryUiDeviceDialog, *iVariantMap, this ); + RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + iIsDisplayingDialog = ETrue; + } + } + +// --------------------------------------------------------------------------- +// CSecQueryUi::WaitUntilDeviceDialogClosed() +// --------------------------------------------------------------------------- +// +TInt CSecQueryUi::WaitUntilDeviceDialogClosed() + { + RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + iCompletionCode = KErrInUse; + iReturnValue = KErrUnknown; + if( !IsActive() && iWait && !iWait->IsStarted() ) + { + iStatus = KRequestPending; + SetActive(); + iWait->Start(); + } + return iCompletionCode; + } + diff -r b75757c81051 -r 318c4eab2439 securitydialogs/SecUi/Src/SecUiSecurityHandler.cpp --- a/securitydialogs/SecUi/Src/SecUiSecurityHandler.cpp Fri Mar 19 09:41:08 2010 +0200 +++ b/securitydialogs/SecUi/Src/SecUiSecurityHandler.cpp Fri Apr 16 15:53:24 2010 +0300 @@ -52,6 +52,9 @@ #endif // RD_REMOTELOCK #include #include + +#include "SecQueryUi.h" + // LOCAL CONSTANTS AND MACROS const TInt KMaxNumberOfPUKAttempts(10); const TInt KMaxNumberOfPINAttempts(3); @@ -60,6 +63,7 @@ const TInt KTriesToConnectServer( 2 ); const TInt KTimeBeforeRetryingRequest( 50000 ); + // ================= MEMBER FUNCTIONS ======================= // // ---------------------------------------------------------- @@ -70,6 +74,8 @@ EXPORT_C CSecurityHandler::CSecurityHandler(RMobilePhone& aPhone): iPhone(aPhone), iQueryCanceled(ETrue), iSecurityDlg(NULL), iNoteDlg(NULL) { + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + TInt result = iCustomPhone.Open(aPhone); TRAP_IGNORE( FeatureManager::InitializeLibL() ); //Shouldn't this panic if FM does not initialise?? } @@ -82,6 +88,8 @@ // EXPORT_C CSecurityHandler::~CSecurityHandler() { + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + #if defined(_DEBUG) RDebug::Print(_L("CSecurityHandler::~CSecurityHandler()")); #endif @@ -103,6 +111,8 @@ EXPORT_C void CSecurityHandler::HandleEventL( RMobilePhone::TMobilePhoneSecurityEvent aEvent ) { + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + TInt result = KErrNone; HandleEventL( aEvent, result ); } @@ -117,6 +127,8 @@ RMobilePhone::TMobilePhoneSecurityEvent aEvent, TBool aStartup, TInt& aResult ) { + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + iStartup = aStartup; HandleEventL( aEvent, aResult ); } @@ -130,6 +142,8 @@ EXPORT_C void CSecurityHandler::HandleEventL( RMobilePhone::TMobilePhoneSecurityEvent aEvent, TInt& aResult ) { + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + /***************************************************** * Series 60 Customer / ETel * Series 60 ETel API @@ -140,6 +154,7 @@ #endif TBool wcdmaSupported(FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma )); TBool upinSupported(FeatureManager::FeatureSupported( KFeatureIdUpin )); + RDebug::Printf( "%s %s (%u) aEvent=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, aEvent ); switch(aEvent) { @@ -230,90 +245,51 @@ } /* end check for default code */ - // Destructor sets thisDestroyed to ETrue - TBool thisDestroyed( EFalse ); - iDestroyedPtr = &thisDestroyed; iQueryCanceled = EFalse; - RMobilePhone::TMobilePassword password; RMobilePhone::TMobilePassword required_fourth; TInt ret = KErrNone; TInt err = KErrNone; TInt status = KErrNone; - if(FeatureManager::FeatureSupported(KFeatureIdSapTerminalControlFw ) && - FeatureManager::FeatureSupported(KFeatureIdSapDeviceLockEnhancements)) - { - // Connect to the SCP server, and request the code query - RSCPClient scpClient; - User::LeaveIfError( scpClient.Connect() ); - CleanupClosePushL( scpClient ); - status = scpClient.SecCodeQuery( password, - RSCPClient::SCP_OK_CANCEL, - EFalse, - 0 ); - - if ( status != KErrCancel ) - { - // Set this "true" to indicate that the input wasn't cancelled - ret = ETrue; - } - else + + RMobilePhone::TMobilePassword iSecUi_password; + TBool queryAccepted = EFalse; + + + while (!queryAccepted) { - ret = EFalse; - } - - CleanupStack::PopAndDestroy(); //scpClient - } - else - { - iSecurityDlg = new (ELeave) CCodeQueryDialog (password,SEC_C_SECURITY_CODE_MIN_LENGTH,SEC_C_SECURITY_CODE_MAX_LENGTH,ESecUiNone); - #ifdef __COVER_DISPLAY - iSecurityDlg->PublishDialogL(SecondaryDisplay::ECmdShowSecurityQuery, SecondaryDisplay::KCatStartup); - CAknMediatorFacade* covercl = AknMediatorFacade(iSecurityDlg); // uses MOP, so control provided - if (covercl) // returns null if __COVER_DISPLAY is not defined - { - // … - add data that cover ui is interested in - covercl->BufStream().WriteInt32L(SecondaryDisplay::EShowSecCode);// adds int to additional data to be posted to cover ui - covercl->BufStream().CommitL(); // no more data to send so commit buf - } - #endif //__COVER_DISPLAY - CSecUiLockObserver* deviceLockStatusObserver = CSecUiLockObserver::NewL(iSecurityDlg); - CleanupStack::PushL(deviceLockStatusObserver); - err =KErrNone; - TRAP(err,ret = iSecurityDlg->ExecuteLD(R_SECURITY_QUERY)); - CleanupStack::PopAndDestroy(deviceLockStatusObserver); - } - - // check if CSecurityHandler has been "killed" - if ( thisDestroyed ) - { - return EFalse; - } + RMobilePhone::TMobilePhoneSecurityCode secCodeType; + secCodeType = RMobilePhone::ESecurityCodePhonePassword; - iDestroyedPtr = NULL; - iSecurityDlg = NULL; - - if (err != KErrNone) - { - User::Leave(err); - } - - if (ret) - { - while (!iQueryCanceled) - { - if (!FeatureManager::FeatureSupported(KFeatureIdSapDeviceLockEnhancements)) - { - RMobilePhone::TMobilePhoneSecurityCode secCodeType; - secCodeType = RMobilePhone::ESecurityCodePhonePassword; - CWait* wait = CWait::NewL(); - iPhone.VerifySecurityCode(wait->iStatus,secCodeType, password, required_fourth); - status = wait->WaitForRequestL(); - delete wait; + /* request PIN using QT */ + CSecQueryUi *iSecQueryUi; + RDebug::Printf( "%s %s (%u) CSecQueryUi=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + iSecQueryUi = CSecQueryUi::NewL(); + RDebug::Printf( "%s %s (%u) Copy=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + iSecUi_password.Copy(_L("666")); + RDebug::Printf( "%s %s (%u) InstallConfirmationQueryL=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + queryAccepted = iSecQueryUi->SecQueryDialog( _L("AskSecCodeL"), iSecUi_password, 4, 8, secCodeType /*aMode*/ ); + RDebug::Printf( "%s %s (%u) iSecUi_password=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + RDebug::Print( iSecUi_password ); + RDebug::Printf( "%s %s (%u) delete=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + delete iSecQueryUi; + RDebug::Printf( "%s %s (%u) done=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + if(queryAccepted) res=0xFFFFFFFE; // this is the value returned from iSecurityDlg + /* end request PIN using QT */ - } - + CWait* wait = CWait::NewL(); + iPhone.VerifySecurityCode(wait->iStatus,secCodeType, iSecUi_password, required_fourth); + status = wait->WaitForRequestL(); + delete wait; + + ret = ETrue; + if (!queryAccepted) + { + ret = EFalse; + return ret; + } + queryAccepted = EFalse; // because it's not yet validated switch(status) { case KErrNone: @@ -326,150 +302,35 @@ CleanupClosePushL( scpClient ); TSCPSecCode newCode; - newCode.Copy( password ); + newCode.Copy( iSecUi_password ); scpClient.StoreCode( newCode ); - CleanupStack::PopAndDestroy(); //scpClient + CleanupStack::PopAndDestroy(); //scpClient + queryAccepted = ETrue; } - iQueryCanceled = ETrue; + iQueryCanceled = ETrue; // TODO return ETrue; } case KErrGsmSSPasswordAttemptsViolation: case KErrLocked: { - iDestroyedPtr = &thisDestroyed; // security code blocked! - iNoteDlg = new (ELeave) CAknNoteDialog(REINTERPRET_CAST(CEikDialog**,&iNoteDlg)); - iNoteDlg->SetTimeout(CAknNoteDialog::ELongTimeout); - iNoteDlg->SetTone(CAknNoteDialog::EErrorTone); - err =KErrNone; - TRAP(err,iNoteDlg->ExecuteLD(R_SEC_BLOCKED)); - - // check if CSecurityHandler has been "killed" - if ( thisDestroyed ) - { - return EFalse; - } - - iDestroyedPtr = NULL; - iNoteDlg = NULL; - - if (err != KErrNone) - { - User::Leave(err); - } + CSecuritySettings::ShowResultNoteL(R_SEC_BLOCKED, CAknNoteDialog::EErrorTone); // TODO break; } case KErrGsm0707IncorrectPassword: case KErrAccessDenied: { - iDestroyedPtr = &thisDestroyed; // code was entered erroneusly - iNoteDlg = new (ELeave) CAknNoteDialog(REINTERPRET_CAST(CEikDialog**,&iNoteDlg)); - iNoteDlg->SetTimeout(CAknNoteDialog::ELongTimeout); - iNoteDlg->SetTone(CAknNoteDialog::EErrorTone); - err =KErrNone; - TRAP(err,iNoteDlg->ExecuteLD(R_CODE_ERROR)); - - // check if CSecurityHandler has been "killed" - if ( thisDestroyed ) - { - return EFalse; - } - - iDestroyedPtr = NULL; - iNoteDlg = NULL; - - if (err != KErrNone) - { - User::Leave(err); - } - break; + CSecuritySettings::ShowResultNoteL(R_CODE_ERROR, CAknNoteDialog::EErrorTone); // TODO } default: { - iDestroyedPtr = &thisDestroyed; - err =KErrNone; - TRAP(err,ShowGenericErrorNoteL(status)); - - // check if CSecurityHandler has been "killed" - if ( thisDestroyed ) - { - return EFalse; - } - - iDestroyedPtr = NULL; - iNoteDlg = NULL; - - if (err != KErrNone) - { - User::Leave(err); - } - break; + CSecuritySettings::ShowResultNoteL(status, CAknNoteDialog::EErrorTone); // TODO } } - - if (iQueryCanceled) - { - ret = EFalse; - break; - } - - password = _L(""); - iDestroyedPtr = &thisDestroyed; - if(FeatureManager::FeatureSupported(KFeatureIdSapTerminalControlFw ) && - FeatureManager::FeatureSupported(KFeatureIdSapDeviceLockEnhancements)) - { - // Connect to the SCP server, and request the code query - RSCPClient scpClient; - User::LeaveIfError( scpClient.Connect() ); - CleanupClosePushL( scpClient ); - status = scpClient.SecCodeQuery( password, - RSCPClient::SCP_OK_CANCEL, - EFalse, - 0 ); - - if ( status != KErrCancel ) - { - // Set this "true" to indicate that the input wasn't cancelled - ret = ETrue; - } - else - { - ret = EFalse; - } - - CleanupStack::PopAndDestroy(); //scpClient - } - else - { - iSecurityDlg = new (ELeave) CCodeQueryDialog (password,SEC_C_SECURITY_CODE_MIN_LENGTH,SEC_C_SECURITY_CODE_MAX_LENGTH,ESecUiNone); - CSecUiLockObserver* deviceLockStatusObserver = CSecUiLockObserver::NewL(iSecurityDlg); - CleanupStack::PushL(deviceLockStatusObserver); - err =KErrNone; - TRAP(err,ret = iSecurityDlg->ExecuteLD(R_SECURITY_QUERY)); - CleanupStack::PopAndDestroy(deviceLockStatusObserver); - } - - // check if CSecurityHandler has been "killed" - if ( thisDestroyed ) - { - return EFalse; - } - - iDestroyedPtr = NULL; - iSecurityDlg = NULL; - - if (err != KErrNone) - { - User::Leave(err); - } - - if (!ret) - break; } // while - } // if iQueryCanceled = ETrue; return ret; @@ -548,7 +409,6 @@ #endif #ifdef RD_REMOTELOCK - // If remote lock is enabled, don't disable the domestic OS device lock // since that would render the RemoteLock useless. // Instead just re-set the DOS lock to enabled which as a side effect @@ -621,6 +481,7 @@ RDebug::Print(_L("(SECUI)CSecurityHandler::AskSecCodeInAutoLockL() Start Notifier")); #endif codeQueryNotifier.StartNotifierAndGetResponse(wait->iStatus, KSecurityNotifierUid,params, response); + // this will eventually call PassPhraseRequiredL res = wait->WaitForRequestL(); CleanupStack::PopAndDestroy(); // wait #if defined(_DEBUG) @@ -738,10 +599,15 @@ #endif TBool StartUp = iStartup; - RMobilePhone::TMobilePassword password; + RMobilePhone::TMobilePassword iSecUi_password; RMobilePhone::TMobilePassword required_fourth; - TInt status; - TInt autolockState; + TBool queryAccepted = EFalse; + + TInt status=0; + TInt autolockState=0; + TInt lCancelSupported=0; + TInt lEmergencySupported=0; + TInt err( KErrGeneral ); err = RProperty::Get(KPSUidCoreApplicationUIs, KCoreAppUIsAutolockStatus, autolockState); #if defined(_DEBUG) @@ -753,7 +619,7 @@ TInt tarmFlag=0; if(FeatureManager::FeatureSupported(KFeatureIdSapTerminalControlFw )) { - TInt tRet = RProperty::Get( KSCPSIDAutolock, SCP_TARM_ADMIN_FLAG_UID, tarmFlag ); + TInt tRet = RProperty::Get( KSCPSIDAutolock, SCP_TARM_ADMIN_FLAG_UID, tarmFlag ); if ( tRet != KErrNone ) { @@ -777,162 +643,70 @@ if (StartUp) isConditionSatisfied = ETrue; } - if (isConditionSatisfied) - { #if defined(_DEBUG) RDebug::Print(_L("(SECUI)CSecurityHandler::PassPhraseRequiredL() Dialog 1")); #endif // Security code at bootup: No "cancel" softkey; Emergency calls enabled. - if(FeatureManager::FeatureSupported(KFeatureIdSapTerminalControlFw ) && - FeatureManager::FeatureSupported(KFeatureIdSapDeviceLockEnhancements)) - { - // Connect to the SCP server, and request the code query - RSCPClient scpClient; - User::LeaveIfError( scpClient.Connect() ); - CleanupClosePushL( scpClient ); - - status = scpClient.SecCodeQuery( password, - RSCPClient::SCP_OK_ETEL, - ETrue, - KSCPEtelRequest ); - // Note that SecCodeQuery doesn't indicate the return value from the dialog - - CleanupStack::PopAndDestroy(); //scpClient - } - else - { - CCodeQueryDialog* securityDlg = new (ELeave) CCodeQueryDialog (password,SEC_C_SECURITY_CODE_MIN_LENGTH,SEC_C_SECURITY_CODE_MAX_LENGTH,ESecUiCodeEtelReqest); - if(AknLayoutUtils::PenEnabled()) - securityDlg->SetEmergencyCallSupportForCBA( ETrue ); - else - securityDlg->SetEmergencyCallSupport(ETrue); - #ifdef __COVER_DISPLAY - securityDlg->PublishDialogL(SecondaryDisplay::ECmdShowSecurityQuery, SecondaryDisplay::KCatStartup); - CAknMediatorFacade* covercl = AknMediatorFacade(securityDlg); // uses MOP, so control provided - if (covercl) // returns null if __COVER_DISPLAY is not defined - { - // … - add data that cover ui is interested in - covercl->BufStream().WriteInt32L(SecondaryDisplay::EShowSecCode); // adds int to additional data to be posted to cover ui - covercl->BufStream().CommitL(); // no more data to send so commit buf - } - #endif //__COVER_DISPLAY - status = securityDlg->ExecuteLD(R_SECURITY_REQUEST_QUERY); - } - } - else if ( (autolockState > EAutolockOff)) - { - #if defined(_DEBUG) - RDebug::Print(_L("(SECUI)CSecurityHandler::PassPhraseRequiredL() Dialog 2")); - #endif - // Autolock is On. Security event came from user pressing "unlock". - // Emergency call support must be enabled and there must be a "cancel" softkey. - if(FeatureManager::FeatureSupported(KFeatureIdSapTerminalControlFw ) && - FeatureManager::FeatureSupported(KFeatureIdSapDeviceLockEnhancements)) - { - // Connect to the SCP server, and request the code query - RSCPClient scpClient; - User::LeaveIfError( scpClient.Connect() ); - CleanupClosePushL( scpClient ); - - status = scpClient.SecCodeQuery( password, - RSCPClient::SCP_OK_CANCEL, - ETrue, - KSCPEtelRequest ); - // Note that SecCodeQuery doesn't indicate the return value from the dialog - - CleanupStack::PopAndDestroy(); //scpClient - } - else - { - CCodeQueryDialog* securityDlg = new (ELeave) CCodeQueryDialog (password,SEC_C_SECURITY_CODE_MIN_LENGTH,SEC_C_SECURITY_CODE_MAX_LENGTH,ESecUiNone); - if(AknLayoutUtils::PenEnabled()) - securityDlg->SetEmergencyCallSupportForCBA( ETrue ); - else - securityDlg->SetEmergencyCallSupport(ETrue); - #ifdef __COVER_DISPLAY - securityDlg->PublishDialogL(SecondaryDisplay::ECmdShowSecurityQuery, SecondaryDisplay::KCatStartup); - CAknMediatorFacade* covercl = AknMediatorFacade(securityDlg); // uses MOP, so control provided - if (covercl) // returns null if __COVER_DISPLAY is not defined - { - // … - add data that cover ui is interested in - covercl->BufStream().WriteInt32L(SecondaryDisplay::EShowSecCode); // adds int to additional data to be posted to cover ui - covercl->BufStream().CommitL(); // no more data to send so commit buf - } - #endif //__COVER_DISPLAY - status = securityDlg->ExecuteLD(R_SECURITY_QUERY); - } - } - else - { - #if defined(_DEBUG) - RDebug::Print(_L("(SECUI)CSecurityHandler::PassPhraseRequiredL() Dialog 3")); - #endif - // Code query due to a setting change; "Cancel" softkey active; - // no emergency call support. - if(FeatureManager::FeatureSupported(KFeatureIdSapTerminalControlFw ) && - FeatureManager::FeatureSupported(KFeatureIdSapDeviceLockEnhancements)) - { - // Connect to the SCP server, and request the code query - RSCPClient scpClient; - User::LeaveIfError( scpClient.Connect() ); - CleanupClosePushL( scpClient ); - - status = scpClient.SecCodeQuery( password, - RSCPClient::SCP_OK_CANCEL, - EFalse, - KSCPEtelRequest ); - // Note that SecCodeQuery doesn't indicate the return value from the dialog - - CleanupStack::PopAndDestroy(); //scpClient - } - else - { - iSecurityDlg = new (ELeave) CCodeQueryDialog (password,SEC_C_SECURITY_CODE_MIN_LENGTH,SEC_C_SECURITY_CODE_MAX_LENGTH,ESecUiNone); - #ifdef __COVER_DISPLAY - iSecurityDlg->PublishDialogL(SecondaryDisplay::ECmdShowSecurityQuery, SecondaryDisplay::KCatStartup); - CAknMediatorFacade* covercl = AknMediatorFacade(iSecurityDlg); // uses MOP, so control provided - if (covercl) // returns null if __COVER_DISPLAY is not defined - { - covercl->BufStream().WriteInt32L(SecondaryDisplay::EShowSecCode); // adds int to additional data to be posted to cover ui - covercl->BufStream().CommitL(); // no more data to send so commit buf - } - #endif //__COVER_DISPLAY - // read a flag to see whether the query is SecUi originated. - TInt secUiOriginatedQuery(ESecurityUIsETelAPIOriginated); - RProperty::Get(KPSUidSecurityUIs, KSecurityUIsSecUIOriginatedQuery, secUiOriginatedQuery); - CSecUiLockObserver* deviceLockStatusObserver = CSecUiLockObserver::NewL(iSecurityDlg); - CleanupStack::PushL(deviceLockStatusObserver); - CSecUiLockObserver* queryStatusObserver = CSecUiLockObserver::NewL(iSecurityDlg, ESecUiRequestStateObserver); - CleanupStack::PushL(queryStatusObserver); - CSecUiLockObserver* callStatusObserver = NULL; - if(secUiOriginatedQuery == ESecurityUIsSystemLockOriginated) - { - callStatusObserver = CSecUiLockObserver::NewL(iSecurityDlg, ESecUiCallStateObserver); - CleanupStack::PushL(callStatusObserver); - } - status = iSecurityDlg->ExecuteLD(R_SECURITY_QUERY); - - if(callStatusObserver == NULL) - CleanupStack::PopAndDestroy(2); //deviceLockStatusObserver, queryStatusObserver - else - CleanupStack::PopAndDestroy(3); //deviceLockStatusObserver, queryStatusObserver, callStatusObserver - iSecurityDlg = NULL; - } - } -TBool isCondition = EFalse; + RMobilePhone::TMobilePhoneSecurityCode secCodeTypeToAsk = RMobilePhone::ESecurityCodePhonePassword; // for starters + + if (isConditionSatisfied) + { + // starter or special TARM. NoCancel+Emergency + lCancelSupported = ESecUiCancelNotSupported; + lEmergencySupported = ESecUiEmergencyNotSupported; + } + else if (autolockState > EAutolockOff) + { + // from unlock. Cancel+Emergency + lCancelSupported = ESecUiCancelSupported; + lEmergencySupported = ESecUiEmergencySupported; + } + else + { + // from settings. Cancel+NoEmergency + lCancelSupported = ESecUiCancelSupported; + lEmergencySupported = ESecUiEmergencyNotSupported; + } + + /* request PIN using QT */ + status = KErrNone; + CSecQueryUi *iSecQueryUi; + RDebug::Printf( "%s %s (%u) CSecQueryUi=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + iSecQueryUi = CSecQueryUi::NewL(); + RDebug::Printf( "%s %s (%u) Copy=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + iSecUi_password.Copy(_L("666")); + RDebug::Printf( "%s %s (%u) SecQueryDialog aType=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, lCancelSupported | lEmergencySupported | secCodeTypeToAsk ); + queryAccepted = iSecQueryUi->SecQueryDialog( _L("PassPhraseRequiredL"), iSecUi_password, 4, 8, lCancelSupported | lEmergencySupported | secCodeTypeToAsk ); + RDebug::Printf( "%s %s (%u) iSecUi_password=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + RDebug::Print( iSecUi_password ); + RDebug::Printf( "%s %s (%u) delete=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + delete iSecQueryUi; + RDebug::Printf( "%s %s (%u) done=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + if(queryAccepted) status=0xFFFFFFFE; // this is the value returned from iSecurityDlg + /* end request PIN using QT */ + + // TODO if Emergency was possible, then consider status == ESecUiEmergencyCall + /* I don't think I need this + TInt secUiOriginatedQuery(ESecurityUIsETelAPIOriginated); + RProperty::Get(KPSUidSecurityUIs, KSecurityUIsSecUIOriginatedQuery, secUiOriginatedQuery); + CSecUiLockObserver* deviceLockStatusObserver = CSecUiLockObserver::NewL(iSecurityDlg); + */ + +TBool wasCancelledOrEmergency = EFalse; if(!FeatureManager::FeatureSupported(KFeatureIdSapDeviceLockEnhancements)) { if (!status || (status == ESecUiEmergencyCall) || (status == EAknSoftkeyEmergencyCall) || (status == ESecUiDeviceLocked)) - isCondition = ETrue; + wasCancelledOrEmergency = ETrue; } else { if ( ( status == KErrCancel ) || (status == ESecUiEmergencyCall) || (status == EAknSoftkeyEmergencyCall) || (status == ESecUiDeviceLocked)) - isCondition = ETrue; + wasCancelledOrEmergency = ETrue; } - if (isCondition) +RDebug::Printf( "%s %s (%u) wasCancelledOrEmergency=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, wasCancelledOrEmergency ); + if (wasCancelledOrEmergency) { #if defined(_DEBUG) RDebug::Print(_L("(SECUI)CSecurityHandler::PassPhraseRequiredL() DIALOG ERROR")); @@ -949,25 +723,18 @@ RMobilePhone::TMobilePhoneSecurityCode secCodeType = RMobilePhone::ESecurityCodePhonePassword; CWait* wait = NULL; -if(!FeatureManager::FeatureSupported(KFeatureIdSapDeviceLockEnhancements)) -{ - #if defined(_DEBUG) - RDebug::Print(_L("(SECUI)CSecurityHandler::PassPhraseRequiredL() VerifySecurityCode")); - #endif + + RDebug::Printf( "%s %s (%u) VerifySecurityCode=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); wait = CWait::NewL(); - iPhone.VerifySecurityCode(wait->iStatus,secCodeType, password, required_fourth); + iPhone.VerifySecurityCode(wait->iStatus,secCodeType, iSecUi_password, required_fourth); status = wait->WaitForRequestL(); - #if defined(_DEBUG) RDebug::Print(_L("(SECUI)CSecurityHandler::PassPhraseRequiredL() VerifySecurityCode STATUS: %d"), status); - #endif delete wait; - } - else - { - wait = NULL; - } TInt returnValue = status; + RDebug::Printf( "%s %s (%u) status=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, status ); + RDebug::Printf( "%s %s (%u) tarmFlag=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, tarmFlag ); + RDebug::Printf( "%s %s (%u) StartUp=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, StartUp ); switch(status) { case KErrNone: @@ -999,11 +766,11 @@ } if(!FeatureManager::FeatureSupported(KFeatureIdSapDeviceLockEnhancements)) { - RSCPClient scpClient; + RSCPClient scpClient; User::LeaveIfError( scpClient.Connect() ); CleanupClosePushL( scpClient ); TSCPSecCode newCode; - newCode.Copy( password ); + newCode.Copy( iSecUi_password ); scpClient.StoreCode( newCode ); CleanupStack::PopAndDestroy(); //scpClient } @@ -1053,7 +820,7 @@ // Disable DOS device lock setting wait = CWait::NewL(); - iCustomPhone.DisablePhoneLock(wait->iStatus,password); + iCustomPhone.DisablePhoneLock(wait->iStatus,iSecUi_password); wait->WaitForRequestL(); delete wait; } @@ -1075,7 +842,7 @@ RDebug::Print(_L("(SECUI)CSecurityHandler::PassPhraseRequiredL()KErrNone: Startup; DisablePhoneLock.")); #endif wait = CWait::NewL(); - iCustomPhone.DisablePhoneLock(wait->iStatus,password); + iCustomPhone.DisablePhoneLock(wait->iStatus,iSecUi_password); wait->WaitForRequestL(); #if defined(_DEBUG) RDebug::Print(_L("(SECUI)CSecurityHandler::PassPhraseRequiredL()KErrNone: Startup; DisablePhoneLock completed.")); @@ -1084,8 +851,9 @@ #endif // RD_REMOTELOCK } } - else + else // error getting repository { + RDebug::Printf( "%s %s (%u) error getting repository=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); #ifdef RD_REMOTELOCK // If remote lock is enabled, don't disable the domestic OS device lock // since that would render the RemoteLock useless. @@ -1103,7 +871,7 @@ #endif // _DEBUG wait = CWait::NewL(); - iCustomPhone.DisablePhoneLock(wait->iStatus,password); + iCustomPhone.DisablePhoneLock(wait->iStatus,iSecUi_password); wait->WaitForRequestL(); delete wait; } @@ -1126,7 +894,7 @@ #endif // could not get the current autolock time... disable autolock in Domestic OS side. wait = CWait::NewL(); - iCustomPhone.DisablePhoneLock(wait->iStatus,password); + iCustomPhone.DisablePhoneLock(wait->iStatus,iSecUi_password); wait->WaitForRequestL(); #if defined(_DEBUG) RDebug::Print(_L("(SECUI)CSecurityHandler::PassPhraseRequiredL()KErrNone: Startup; NO AUTOLOCK PERIOD; DisablePhoneLock completed.")); @@ -1149,6 +917,7 @@ break; case KErrGsm0707IncorrectPassword: case KErrAccessDenied: + // TODO should this try again? It seems that it's not asked again. #if defined(_DEBUG) RDebug::Print(_L("(SECUI)CSecurityHandler::PassPhraseRequiredL() KErrGsm0707IncorrectPassword")); #endif @@ -1159,6 +928,7 @@ RDebug::Print(_L("(SECUI)CSecurityHandler::PassPhraseRequiredL() DEFAULT")); #endif CSecuritySettings::ShowErrorNoteL(status); + // TODO should this try again? It seems that it's not asked again. break; } @@ -1176,8 +946,12 @@ * Series 60 Customer / ETel * Series 60 ETel API *****************************************************/ - - RMobilePhone::TMobilePassword password; +RDebug::Printf( "%s %s (%u) 11=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + +RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + RMobilePhone::TMobilePassword iSecUi_password; + TInt lCancelSupported = ESecUiCancelNotSupported; + TBool queryAccepted = EFalse; RMobilePhone::TMobilePassword required_fourth; RMobilePhone::TMobilePhoneSecurityCode secCodeType = RMobilePhone::ESecurityCodePin1; RMobilePhone::TMobilePhoneSecurityCodeInfoV5 codeInfo; @@ -1188,6 +962,7 @@ TInt res = KErrGeneral; CWait* wait = CWait::NewL(); CleanupStack::PushL(wait); +RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); StartUp = iStartup; @@ -1196,9 +971,10 @@ RDebug::Print(_L("(SECUI)CSecurityHandler::Pin1RequiredL()")); #endif +RDebug::Printf( "%s %s (%u) StartUp=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, StartUp ); if(!StartUp) { - // read a flag to see whether the query is SecUi originated. + // read a flag to see whether the query is SecUi originated. For example, from CSecuritySettings::ChangePinRequestParamsL err = RProperty::Get(KPSUidSecurityUIs, KSecurityUIsSecUIOriginatedQuery, secUiOriginatedQuery); if ( err != KErrNone ) @@ -1220,24 +996,28 @@ RDebug::Print(_L("CSecurityHandler::Pin1RequiredL() Execute dlg")); #endif +RDebug::Printf( "%s %s (%u) StartUp=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, StartUp ); +RDebug::Printf( "%s %s (%u) secUiOriginatedQuery=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, secUiOriginatedQuery ); +RDebug::Printf( "%s %s (%u) ESecurityUIsSecUIOriginated=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, ESecurityUIsSecUIOriginated ); +RDebug::Printf( "%s %s (%u) err=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, err ); if(StartUp || (secUiOriginatedQuery != ESecurityUIsSecUIOriginated) || (err != KErrNone)) { - iSecurityDlg = new (ELeave) CCodeQueryDialog (password,SEC_C_PIN_CODE_MIN_LENGTH,SEC_C_PIN_CODE_MAX_LENGTH,ESecUiCodeEtelReqest); - if(AknLayoutUtils::PenEnabled()) - iSecurityDlg->SetEmergencyCallSupportForCBA( ETrue ); - else - iSecurityDlg->SetEmergencyCallSupport(ETrue); - #ifdef __COVER_DISPLAY - iSecurityDlg->PublishDialogL(SecondaryDisplay::ECmdShowSecurityQuery, SecondaryDisplay::KCatStartup); - CAknMediatorFacade* covercl = AknMediatorFacade(iSecurityDlg); // uses MOP, so control provided - if (covercl) // returns null if __COVER_DISPLAY is not defined - { - // … - add data that cover ui is interested in - covercl->BufStream().WriteInt32L(SecondaryDisplay::EShowPIN1); // adds int to additional data to be posted to cover ui - covercl->BufStream().CommitL(); // no more data to send so commit buf - } - #endif //__COVER_DISPLAY - + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + lCancelSupported = ESecUiCancelSupported; + } + else + { + /* TODO do I need this ? */ + /* + CSecUiLockObserver* deviceLockStatusObserver = CSecUiLockObserver::NewL(iSecurityDlg); + CleanupStack::PushL(deviceLockStatusObserver); + CSecUiLockObserver* queryStatusObserver = CSecUiLockObserver::NewL(iSecurityDlg, ESecUiRequestStateObserver); + CleanupStack::PushL(queryStatusObserver); + ... + CleanupStack::PopAndDestroy(2); //deviceLockStatusObserver, queryStatusObserver + */ + // it will be RMobilePhone::ESecurityCodePin1 , equivalent to ESecUiNone + } wait->SetRequestType(EMobilePhoneGetSecurityCodeInfo); iPhone.GetSecurityCodeInfo(wait->iStatus, secCodeType, codeInfoPkg); res = wait->WaitForRequestL(); @@ -1246,92 +1026,59 @@ RDebug::Print(_L("CSecurityHandler::Pin1RequiredL() Remaining Attempts query status: %d"), res); RDebug::Print(_L("CSecurityHandler::Pin1RequiredL() Remaining Attempts: %d"), attempts); #endif + RDebug::Printf( "%s %s (%u) res=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, res ); + #ifdef __WINS__ + RDebug::Printf( "%s %s (%u) emulator can't read PIN attempts=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, res ); + res=KErrNone; + codeInfo.iRemainingEntryAttempts=3; + #endif + User::LeaveIfError(res); - - if(codeInfo.iRemainingEntryAttempts == KMaxNumberOfPINAttempts) - res = iSecurityDlg->ExecuteLD(R_PIN_REQUEST_QUERY); - else if(codeInfo.iRemainingEntryAttempts > KLastRemainingInputAttempt) - { - HBufC* queryPrompt = StringLoader::LoadLC(R_SECUI_REMAINING_PIN_ATTEMPTS, codeInfo.iRemainingEntryAttempts); - res = iSecurityDlg->ExecuteLD(R_PIN_REQUEST_QUERY, *queryPrompt); - CleanupStack::PopAndDestroy(queryPrompt); - } - else - { - HBufC* queryPrompt = StringLoader::LoadLC(R_SECUI_FINAL_PIN_ATTEMPT); - res = iSecurityDlg->ExecuteLD(R_PIN_REQUEST_QUERY, *queryPrompt); - CleanupStack::PopAndDestroy(queryPrompt); - } - - iSecurityDlg = NULL; - #if defined(_DEBUG) - RDebug::Print(_L("CSecurityHandler::Pin1RequiredL() Execute dlg RESULT: %d"), res); - #endif + /* request PIN using QT */ + CSecQueryUi *iSecQueryUi; + RDebug::Printf( "%s %s (%u) CSecQueryUi=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + iSecQueryUi = CSecQueryUi::NewL(); + RDebug::Printf( "%s %s (%u) Copy=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + iSecUi_password.Copy(_L("666")); + RDebug::Printf( "%s %s (%u) SecQueryDialog=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + // TODO use codeInfo.iRemainingEntryAttempts for setting the Caption + // TODO ESecUiCodeEtelReqest/ESecUiNone might be useful + // TODO also support Emergency + queryAccepted = iSecQueryUi->SecQueryDialog( _L("Pin1RequiredL"), iSecUi_password, 4, 8, lCancelSupported | secCodeType /*aMode*/ ); + RDebug::Printf( "%s %s (%u) iSecUi_password=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + RDebug::Print( iSecUi_password ); + RDebug::Printf( "%s %s (%u) delete=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + delete iSecQueryUi; + RDebug::Printf( "%s %s (%u) done=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + if(queryAccepted) res=0xFFFFFFFE; // this is the value returned from iSecurityDlg + // TODO handle emergency + /* end request PIN using QT */ + + RDebug::Printf( "%s %s (%u) res=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, res ); if ((!res) || (res == ESecUiEmergencyCall) || (res == EAknSoftkeyEmergencyCall)) { #if defined(_DEBUG) RDebug::Print(_L("CSecurityHandler::Pin1RequiredL() R_PIN_REQUEST_QUERY CANCEL!")); #endif - CleanupStack::PopAndDestroy(wait); + CleanupStack::PopAndDestroy(wait); // TODO this is needed ??? return KErrCancel; } - } - else - { - iSecurityDlg = new (ELeave) CCodeQueryDialog (password,SEC_C_PIN_CODE_MIN_LENGTH,SEC_C_PIN_CODE_MAX_LENGTH,ESecUiNone); - #ifdef __COVER_DISPLAY - iSecurityDlg->PublishDialogL(SecondaryDisplay::ECmdShowSecurityQuery, SecondaryDisplay::KCatStartup); - CAknMediatorFacade* covercl = AknMediatorFacade(iSecurityDlg); // uses MOP, so control provided - if (covercl) // returns null if __COVER_DISPLAY is not defined - { - // … - add data that cover ui is interested in - covercl->BufStream().WriteInt32L(SecondaryDisplay::EShowPIN1); // adds int to additional data to be posted to cover ui - covercl->BufStream().CommitL(); // no more data to send so commit buf - } - #endif //__COVER_DISPLAY - - wait->SetRequestType(EMobilePhoneGetSecurityCodeInfo); - iPhone.GetSecurityCodeInfo(wait->iStatus, secCodeType, codeInfoPkg); - res = wait->WaitForRequestL(); - User::LeaveIfError(res); - - CSecUiLockObserver* deviceLockStatusObserver = CSecUiLockObserver::NewL(iSecurityDlg); - CleanupStack::PushL(deviceLockStatusObserver); - CSecUiLockObserver* queryStatusObserver = CSecUiLockObserver::NewL(iSecurityDlg, ESecUiRequestStateObserver); - CleanupStack::PushL(queryStatusObserver); - - if(codeInfo.iRemainingEntryAttempts == KMaxNumberOfPINAttempts) - res = iSecurityDlg->ExecuteLD(R_PIN_QUERY); - else if(codeInfo.iRemainingEntryAttempts > KLastRemainingInputAttempt) - { - HBufC* queryPrompt = StringLoader::LoadLC(R_SECUI_REMAINING_PIN_ATTEMPTS, codeInfo.iRemainingEntryAttempts ); - res = iSecurityDlg->ExecuteLD(R_PIN_QUERY, *queryPrompt); - CleanupStack::PopAndDestroy(queryPrompt); - } - else - { - HBufC* queryPrompt = StringLoader::LoadLC(R_SECUI_FINAL_PIN_ATTEMPT); - res = iSecurityDlg->ExecuteLD(R_PIN_QUERY, *queryPrompt); - CleanupStack::PopAndDestroy(queryPrompt); - } - - CleanupStack::PopAndDestroy(2); //deviceLockStatusObserver, queryStatusObserver - iSecurityDlg = NULL; - if( !res || (res == ESecUiDeviceLocked)) - { - #if defined(_DEBUG) - RDebug::Print(_L("CSecurityHandler::Pin1RequiredL() R_PIN_QUERY cancel!")); - #endif - // cancel code request + if( lCancelSupported && (!res || (res == ESecUiDeviceLocked))) + { + // cancel code request iPhone.AbortSecurityCode(RMobilePhone::ESecurityCodePin1); - CleanupStack::PopAndDestroy(wait); + CleanupStack::PopAndDestroy(wait); // TODO this is needed ??? return KErrCancel; - } - } + } + #if defined(_DEBUG) RDebug::Print(_L("CSecurityNotifier::Pin1RequiredL()VerifySecurityCode")); #endif - iPhone.VerifySecurityCode(wait->iStatus,secCodeType, password, required_fourth); + + RDebug::Printf( "%s %s (%u) iSecUi_password=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + RDebug::Print( iSecUi_password ); + iPhone.VerifySecurityCode(wait->iStatus,secCodeType, iSecUi_password, required_fourth); + res = wait->WaitForRequestL(); CleanupStack::PopAndDestroy(wait); #if defined(_DEBUG) @@ -1359,12 +1106,13 @@ case KErrGsmSSPasswordAttemptsViolation: case KErrLocked: // code blocked; show error note and terminate. - // code blocked + // TODO what if not during Startup? Probably it's Ok since the SIM would had also failed at StartUp if(StartUp) CSecuritySettings::ShowResultNoteL(R_CODE_ERROR, CAknNoteDialog::EErrorTone); break; case KErrGsm0707SimWrong: // sim lock active + // TODO no error? This is strange break; default: CSecuritySettings::ShowErrorNoteL(res); @@ -1584,6 +1332,25 @@ * Series 60 Customer / ETel * Series 60 ETel API *****************************************************/ + /* request PIN using QT */ + TBool queryAccepted = EFalse; + RMobilePhone::TMobilePassword iSecUi_password; + CSecQueryUi *iSecQueryUi; + RDebug::Printf( "%s %s (%u) CSecQueryUi=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + iSecQueryUi = CSecQueryUi::NewL(); + RDebug::Printf( "%s %s (%u) Copy=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + iSecUi_password.Copy(_L("666")); + RDebug::Printf( "%s %s (%u) SecQueryDialog=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + queryAccepted = iSecQueryUi->SecQueryDialog( _L("Pin2RequiredL"), iSecUi_password, 4, 8, RMobilePhone::ESecurityCodePin2 /*aMode*/ ); + RDebug::Printf( "%s %s (%u) iSecUi_password=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + RDebug::Print( iSecUi_password ); + RDebug::Printf( "%s %s (%u) delete=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + delete iSecQueryUi; + RDebug::Printf( "%s %s (%u) done=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + // if(queryAccepted) res=0xFFFFFFFE; // this is the value returned from iSecurityDlg + /* end request PIN using QT */ + + #if defined(_DEBUG) RDebug::Print(_L("(SECUI)CSecurityHandler::Pin2RequiredL() BEGIN")); #endif diff -r b75757c81051 -r 318c4eab2439 securitydialogs/SecUi/Src/SecUiSecuritySettings.cpp --- a/securitydialogs/SecUi/Src/SecUiSecuritySettings.cpp Fri Mar 19 09:41:08 2010 +0200 +++ b/securitydialogs/SecUi/Src/SecUiSecuritySettings.cpp Fri Apr 16 15:53:24 2010 +0300 @@ -45,6 +45,10 @@ #include "SecUiRemoteLockSettingPage.h" #endif // RD_REMOTELOCK #include + +#include "SecQueryUi.h" +#include + /***************************************************** * Series 60 Customer / TSY * Needs customer TSY implementation @@ -194,170 +198,24 @@ // EXPORT_C void CSecuritySettings::ChangePinL() { - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ - - TInt simState; - TInt err( KErrGeneral ); - err = RProperty::Get(KPSUidStartup, KPSSimStatus, simState); - User::LeaveIfError( err ); - TBool simRemoved(simState == ESimNotPresent); - - if ( simRemoved ) - { - ShowResultNoteL(R_INSERT_SIM, CAknNoteDialog::EErrorTone); - return; - } - - #if defined(_DEBUG) - RDebug::Print(_L("(SECUI)CSecuritySettings::ChangePinL()")); - #endif - RMobilePhone::TMobilePhoneSecurityCode secCodeType; - secCodeType = RMobilePhone::ESecurityCodePin1; - - RMobilePhone::TMobilePassword oldPassword; - RMobilePhone::TMobilePassword newPassword; - RMobilePhone::TMobilePassword verifcationPassword; - RMobilePhone::TMobilePhonePasswordChangeV1 passwords; - RMobilePhone::TMobilePhoneSecurityCodeInfoV5 codeInfo; - RMobilePhone::TMobilePhoneSecurityCodeInfoV5Pckg codeInfoPkg(codeInfo); - - CCodeQueryDialog* verdlg = new (ELeave) CCodeQueryDialog (verifcationPassword,SEC_C_PIN_CODE_MIN_LENGTH,SEC_C_PIN_CODE_MAX_LENGTH,ESecUiNone); - CleanupStack::PushL(verdlg); - - CCodeQueryDialog* newdlg = new (ELeave) CCodeQueryDialog(newPassword,SEC_C_PIN_CODE_MIN_LENGTH,SEC_C_PIN_CODE_MAX_LENGTH,ESecUiNone); - CleanupStack::PushL(newdlg); - - CCodeQueryDialog* dlg = new (ELeave) CCodeQueryDialog (oldPassword,SEC_C_PIN_CODE_MIN_LENGTH,SEC_C_PIN_CODE_MAX_LENGTH,ESecUiNone); - CleanupStack::PushL(dlg); - - RMobilePhone::TMobilePhoneLock lockType; - RMobilePhone::TMobilePhoneLockInfoV1 lockInfo; - - lockType = RMobilePhone::ELockICC; - - RMobilePhone::TMobilePhoneLockInfoV1Pckg lockInfoPkg(lockInfo); - iWait->SetRequestType(EMobilePhoneGetLockInfo); - iPhone.GetLockInfo(iWait->iStatus, lockType, lockInfoPkg); - TInt res = iWait->WaitForRequestL(); - User::LeaveIfError(res); + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + RMobilePhone::TMobilePassword iOldPassword; + RMobilePhone::TMobilePassword iNewPassword; + TInt iFlags=0; + RDebug::Printf( "%s %s (%u) iOldPassword=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + iOldPassword.Copy(_L("")); + RDebug::Printf( "%s %s (%u) iNewPassword=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + iNewPassword.Copy(_L("")); - if (lockInfo.iSetting == RMobilePhone::ELockSetDisabled) - { - CleanupStack::PopAndDestroy(3,verdlg); - ShowResultNoteL(R_PIN_NOT_ALLOWED, CAknNoteDialog::EErrorTone); - return; - } - - CleanupStack::Pop(); // dlg - iWait->SetRequestType(EMobilePhoneGetSecurityCodeInfo); - iPhone.GetSecurityCodeInfo(iWait->iStatus, secCodeType, codeInfoPkg); - res = iWait->WaitForRequestL(); - User::LeaveIfError(res); - // ask pin - if(codeInfo.iRemainingEntryAttempts == KMaxNumberOfPINAttempts) - res = dlg->ExecuteLD(R_PIN_QUERY); - else if(codeInfo.iRemainingEntryAttempts > KLastRemainingInputAttempt) - { - HBufC* queryPrompt = StringLoader::LoadLC(R_SECUI_REMAINING_PIN_ATTEMPTS, codeInfo.iRemainingEntryAttempts); - res = dlg->ExecuteLD(R_PIN_QUERY, *queryPrompt); - CleanupStack::PopAndDestroy(queryPrompt); - } - else - { - HBufC* queryPrompt = StringLoader::LoadLC(R_SECUI_FINAL_PIN_ATTEMPT); - res = dlg->ExecuteLD(R_PIN_QUERY, *queryPrompt); - CleanupStack::PopAndDestroy(queryPrompt); - } - - if( !res ) - { - CleanupStack::PopAndDestroy(2,verdlg); - return; - } - CleanupStack::Pop(); // newdlg - // new pin code query - if (!(newdlg->ExecuteLD(R_NEW_PIN_CODE_QUERY))) - { - CleanupStack::PopAndDestroy(verdlg); - return; - } - - CleanupStack::Pop(); // verdlg - // verification code query - if (!(verdlg->ExecuteLD(R_VERIFY_NEW_PIN_CODE_QUERY))) - return; - - while (newPassword.CompareF(verifcationPassword) != 0) - { - // codes do not match -> note -> ask new pin and verification codes again - ShowResultNoteL(R_CODES_DONT_MATCH, CAknNoteDialog::EErrorTone); - - newPassword = _L(""); - verifcationPassword = _L(""); - - // new pin code query - CCodeQueryDialog* newdlg = new (ELeave) CCodeQueryDialog (newPassword,SEC_C_PIN_CODE_MIN_LENGTH,SEC_C_PIN_CODE_MAX_LENGTH,ESecUiNone); - if (!(newdlg->ExecuteLD(R_NEW_PIN_CODE_QUERY))) - return; - - // verification code query - CCodeQueryDialog* verdlg = new (ELeave) CCodeQueryDialog (verifcationPassword,SEC_C_PIN_CODE_MIN_LENGTH,SEC_C_PIN_CODE_MAX_LENGTH,ESecUiNone); - if (!(verdlg->ExecuteLD(R_VERIFY_NEW_PIN_CODE_QUERY))) - return; - } - - // send code - passwords.iOldPassword = oldPassword; - passwords.iNewPassword = newPassword; - iWait->SetRequestType(EMobilePhoneChangeSecurityCode); - iPhone.ChangeSecurityCode(iWait->iStatus, secCodeType, passwords); - res = iWait->WaitForRequestL(); - #if defined(_DEBUG) - RDebug::Print( _L("(SECUI)CSecuritySettings::ChangePinL(): RETURN CODE: %d"), res); - #endif - switch(res) - { - case KErrNone: - { - // code changed - ShowResultNoteL(R_PIN_CODE_CHANGED_NOTE, CAknNoteDialog::EConfirmationTone); - break; - } - case KErrGsm0707IncorrectPassword: - case KErrAccessDenied: - { - // code was entered erroneously - ShowResultNoteL(R_CODE_ERROR, CAknNoteDialog::EErrorTone); - ChangePinL(); - break; - } - case KErrGsmSSPasswordAttemptsViolation: - case KErrLocked: - { - // Pin1 blocked! - return; - } - case KErrGsm0707OperationNotAllowed: - { - // not allowed with this sim - ShowResultNoteL(R_OPERATION_NOT_ALLOWED, CAknNoteDialog::EErrorTone); - return; - } - case KErrAbort: - { - break; - } - default: - { - ShowErrorNoteL(res); - ChangePinL(); - break; - } - } - + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + TBuf<0x80> iCaption; + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + iCaption.Copy(_L("ChangePinL")); + RDebug::Printf( "%s %s (%u) iCaption=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + RDebug::Print(iCaption); + TInt iShowError=1; + ChangePinParamsL(iOldPassword, iNewPassword, iFlags, iCaption, iShowError); + RDebug::Printf( "%s %s (%u) iCaption=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); } // @@ -742,158 +600,25 @@ // ---------------------------------------------------------- // EXPORT_C void CSecuritySettings::ChangeSecCodeL() - { - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ - #if defined(_DEBUG) - RDebug::Print(_L("(SECUI)CSecuritySettings::ChangeSecCodeL()")); - #endif - TInt res; - RMobilePhone::TMobilePassword newPassword; -if(FeatureManager::FeatureSupported(KFeatureIdSapTerminalControlFw ) && - (FeatureManager::FeatureSupported(KFeatureIdSapDeviceLockEnhancements ))) -{ - - // Connect to the SCP server, and request the code change - RSCPClient scpClient; - User::LeaveIfError( scpClient.Connect() ); - CleanupClosePushL( scpClient ); - res = scpClient.ChangeCodeRequest(); - CleanupStack::PopAndDestroy(); // scpClient - -} -else -{ - - RMobilePhone::TMobilePhoneSecurityCode secCodeType; - secCodeType = RMobilePhone::ESecurityCodePhonePassword; - RMobilePhone::TMobilePassword oldPassword; - RMobilePhone::TMobilePassword verifcationPassword; - RMobilePhone::TMobilePassword required_fourth; - RMobilePhone::TMobilePhonePasswordChangeV1 passwords; - - CCodeQueryDialog* verdlg = new (ELeave) CCodeQueryDialog (verifcationPassword,SEC_C_SECURITY_CODE_MIN_LENGTH,SEC_C_SECURITY_CODE_CHANGE_MAX_LENGTH,ESecUiNone); - CleanupStack::PushL(verdlg); - - CCodeQueryDialog* newdlg = new (ELeave) CCodeQueryDialog(newPassword,SEC_C_SECURITY_CODE_MIN_LENGTH,SEC_C_SECURITY_CODE_CHANGE_MAX_LENGTH,ESecUiNone); - CleanupStack::PushL(newdlg); - - CCodeQueryDialog* dlg = new (ELeave) CCodeQueryDialog (oldPassword,SEC_C_SECURITY_CODE_MIN_LENGTH,SEC_C_SECURITY_CODE_MAX_LENGTH,ESecUiNone); - CleanupStack::PushL(dlg); - - // ask security code - CleanupStack::Pop(); // dlg - if (!(dlg->ExecuteLD(R_SECURITY_QUERY))) - { - CleanupStack::PopAndDestroy(2,verdlg); - return; - } - // new security code query - CleanupStack::Pop(); // newdlg - if(!(newdlg->ExecuteLD(R_NEW_SECURITY_CODE_QUERY))) - { - CleanupStack::PopAndDestroy(verdlg); - return; - } - - // verification code query - CleanupStack::Pop(); // verdlg - if(!(verdlg->ExecuteLD(R_VERIFY_NEW_SECURITY_CODE_QUERY))) - { - return; - } - - while (newPassword.CompareF(verifcationPassword) != 0) - { - // codes do not match -> note -> ask new pin and verification codes again - ShowResultNoteL(R_CODES_DONT_MATCH, CAknNoteDialog::EErrorTone); - - newPassword = _L(""); - verifcationPassword = _L(""); + { + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + RMobilePhone::TMobilePassword iOldPassword; + RMobilePhone::TMobilePassword iNewPassword; + TInt iFlags=0; + RDebug::Printf( "%s %s (%u) iOldPassword=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + iOldPassword.Copy(_L("")); + RDebug::Printf( "%s %s (%u) iNewPassword=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + iNewPassword.Copy(_L("")); - // new pin code query - CCodeQueryDialog* dlg = new (ELeave) CCodeQueryDialog (newPassword,SEC_C_SECURITY_CODE_MIN_LENGTH,SEC_C_SECURITY_CODE_CHANGE_MAX_LENGTH,ESecUiNone); - if(!(dlg->ExecuteLD(R_NEW_SECURITY_CODE_QUERY))) - return; - - // verification code query - CCodeQueryDialog* dlg2 = new (ELeave) CCodeQueryDialog (verifcationPassword,SEC_C_SECURITY_CODE_MIN_LENGTH,SEC_C_SECURITY_CODE_CHANGE_MAX_LENGTH,ESecUiNone); - if(!(dlg2->ExecuteLD(R_VERIFY_NEW_SECURITY_CODE_QUERY))) - return; - } - iWait->SetRequestType(EMobilePhoneVerifySecurityCode); - // check code - iPhone.VerifySecurityCode(iWait->iStatus,secCodeType, oldPassword, required_fourth); - res = iWait->WaitForRequestL(); - #if defined(_DEBUG) - RDebug::Print( _L("(SECUI)CSecuritySettings::ChangeSecCode(): CODE VERIFY RESP: %d"), res); - #endif - // change code - if (res == KErrNone) - { - passwords.iOldPassword = oldPassword; - passwords.iNewPassword = newPassword; - iWait->SetRequestType(EMobilePhoneChangeSecurityCode); - iPhone.ChangeSecurityCode(iWait->iStatus,secCodeType,passwords); - res = iWait->WaitForRequestL(); - } - -} - - #if defined(_DEBUG) - RDebug::Print( _L("(SECUI)CSecuritySettings::ChangeSecCode(): RETURN CODE: %d"), res); - #endif - switch(res) - { - case KErrNone: - { - // code changed - ShowResultNoteL(R_SECURITY_CODE_CHANGED_NOTE, CAknNoteDialog::EConfirmationTone); - if(FeatureManager::FeatureSupported(KFeatureIdSapTerminalControlFw ) && - !(FeatureManager::FeatureSupported(KFeatureIdSapDeviceLockEnhancements ))) - { - // Send the changed code to the SCP server. Not used with device lock enhancements. - - RSCPClient scpClient; - TSCPSecCode newCode; - newCode.Copy( newPassword ); - if ( scpClient.Connect() == KErrNone ) - { - scpClient.StoreCode( newCode ); - scpClient.Close(); - } - } - - break; - } - case KErrGsmSSPasswordAttemptsViolation: - case KErrLocked: - { - ShowResultNoteL(R_SEC_BLOCKED, CAknNoteDialog::EErrorTone); - ChangeSecCodeL(); - break; - } - case KErrGsm0707IncorrectPassword: - case KErrAccessDenied: - { - // code was entered erroneously - ShowResultNoteL(R_CODE_ERROR, CAknNoteDialog::EErrorTone); - ChangeSecCodeL(); - break; - } - case KErrAbort: - { - break; - } - default: - { - ShowErrorNoteL(res); - ChangeSecCodeL(); - break; - } - } + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + TBuf<0x80> iCaption; + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + iCaption.Copy(_L("ChangeSecCodeL")); + RDebug::Printf( "%s %s (%u) iCaption=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + RDebug::Print(iCaption); + TInt iShowError=1; + ChangeSecCodeParamsL(iOldPassword, iNewPassword, iFlags, iCaption, iShowError); + RDebug::Printf( "%s %s (%u) iCaption=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); } // // ---------------------------------------------------------- @@ -1584,18 +1309,6 @@ TInt oldItem = currentItem; - CAknRadioButtonSettingPage* dlg = new (ELeave)CAknRadioButtonSettingPage(R_SECURITY_SETTING_PAGE, currentItem, items); - CleanupStack::PushL(dlg); - - - CleanupStack::Pop(); // dlg - if ( !(dlg->ExecuteLD(CAknSettingPage::EUpdateWhenChanged)) || oldItem==currentItem ) - { - CleanupStack::PopAndDestroy(); // items - return EFalse; - } - - if (currentItem == 1) { @@ -1605,8 +1318,7 @@ { lockChangeSetting = RMobilePhone::ELockSetEnabled; } - - CleanupStack::PopAndDestroy(); // items + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); iWait->SetRequestType(EMobilePhoneSetLockSetting); RProperty::Set(KPSUidSecurityUIs, KSecurityUIsQueryRequestCancel, ESecurityUIsQueryRequestOk); @@ -1654,140 +1366,22 @@ // EXPORT_C TBool CSecuritySettings::ChangePinRequestL() { - /***************************************************** - * Series 60 Customer / ETel - * Series 60 ETel API - *****************************************************/ - #if defined(_DEBUG) - RDebug::Print(_L("(SECUI)CSecuritySettings::ChangePinRequestL()")); - #endif - TInt simState; - TInt err( KErrGeneral ); - err = RProperty::Get(KPSUidStartup, KPSSimStatus, simState); - User::LeaveIfError( err ); - TBool simRemoved(simState == ESimNotPresent); - - if ( simRemoved ) - { - ShowResultNoteL(R_INSERT_SIM, CAknNoteDialog::EErrorTone); - return EFalse;; - } - - RMobilePhone::TMobilePhoneLockInfoV1 lockInfo; - RMobilePhone::TMobilePhoneLockInfoV1Pckg lockInfoPkg(lockInfo); - RMobilePhone::TMobilePhoneLock lockType = RMobilePhone::ELockICC; - - RMobilePhone::TMobilePhoneLockSetting lockChangeSetting; - - CCoeEnv* coeEnv = CCoeEnv::Static(); - CDesCArrayFlat* items = coeEnv->ReadDesC16ArrayResourceL(R_PIN_LBX); - CleanupStack::PushL(items); - - //get lock info - iWait->SetRequestType(EMobilePhoneGetLockInfo); - iPhone.GetLockInfo(iWait->iStatus, lockType, lockInfoPkg); - TInt status = iWait->WaitForRequestL(); - User::LeaveIfError(status); - TInt currentItem = 0; - - #if defined(_DEBUG) - RDebug::Print(_L("(SECUI)CSecuritySettings::ChangePinRequestL() GetLockInfo")); - #endif - - if (lockInfo.iSetting == RMobilePhone::ELockSetDisabled) - { - #if defined(_DEBUG) - RDebug::Print(_L("(SECUI)CSecuritySettings::ChangePinRequestL() lockInfo: ELockSetDisabled")); - #endif - currentItem = 1; // off - } - - TInt oldItem = currentItem; - - CAknRadioButtonSettingPage* dlg = new (ELeave)CAknRadioButtonSettingPage(R_PIN_SETTING_PAGE, currentItem, items); - CleanupStack::PushL(dlg); - - - CleanupStack::Pop(); // dlg - if ( !(dlg->ExecuteLD(CAknSettingPage::EUpdateWhenChanged)) || oldItem==currentItem ) - { - CleanupStack::PopAndDestroy(); // items - return EFalse; - } - + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + RMobilePhone::TMobilePassword iOldPassword; + TInt iFlags=0; + RDebug::Printf( "%s %s (%u) iOldPassword=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + iOldPassword.Copy(_L("")); - if (currentItem == 1) - { - #if defined(_DEBUG) - RDebug::Print(_L("(SECUI)CSecuritySettings::ChangePinRequestL() currentItem: ELockSetDisabled")); - #endif - lockChangeSetting = RMobilePhone::ELockSetDisabled; - } - else - { - #if defined(_DEBUG) - RDebug::Print(_L("(SECUI)CSecuritySettings::ChangePinRequestL() currentItem: ELockSetEnabled")); - #endif - lockChangeSetting = RMobilePhone::ELockSetEnabled; - } - - CleanupStack::PopAndDestroy(); // items - - // Raise a flag to indicate that the PIN - // request coming from ETEL has originated from SecUi and not from Engine. - TInt tRet = RProperty::Set(KPSUidSecurityUIs, KSecurityUIsSecUIOriginatedQuery, ESecurityUIsSecUIOriginated); - if ( tRet != KErrNone ) - { - #if defined(_DEBUG) - RDebug::Print(_L("(SECUI)CSecuritySettings::ChangePinRequestL():\ - FAILED to set the SECUI query Flag: %d"), tRet); - #endif - } - // Change the lock setting - iWait->SetRequestType(EMobilePhoneSetLockSetting); - RProperty::Set(KPSUidSecurityUIs, KSecurityUIsQueryRequestCancel, ESecurityUIsQueryRequestOk); - iPhone.SetLockSetting(iWait->iStatus,lockType,lockChangeSetting); - status = iWait->WaitForRequestL(); - #if defined(_DEBUG) - RDebug::Print( _L("(SECUI)CSecuritySettings::ChangePinRequestL(): RETURN CODE: %d"), status); - #endif + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + TBuf<0x80> iCaption; + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + iCaption.Copy(_L("ChangePinRequestL")); + RDebug::Printf( "%s %s (%u) iCaption=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + RDebug::Print(iCaption); + TInt iShowError=1; + ChangePinRequestParamsL(1/* TODO it's imposible to know if we want to set or clear*/, iOldPassword, iFlags, iCaption, iShowError); + RDebug::Printf( "%s %s (%u) iCaption=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); - // Lower the flag - RProperty::Set(KPSUidSecurityUIs, KSecurityUIsSecUIOriginatedQuery, ESecurityUIsETelAPIOriginated); - - switch(status) - { - case KErrNone: - { - break; - } - case KErrGsm0707OperationNotAllowed: - { - // not allowed with this sim - ShowResultNoteL(R_OPERATION_NOT_ALLOWED, CAknNoteDialog::EErrorTone); - return EFalse; - } - case KErrGsm0707IncorrectPassword: - case KErrAccessDenied: - { - // code was entered erroneously - return ChangePinRequestL(); - } - case KErrGsmSSPasswordAttemptsViolation: - case KErrLocked: - { - return ETrue; - } - case KErrAbort: - { - return EFalse; - } - default: - { - return ChangePinRequestL(); - } - } - return ETrue; } @@ -1865,14 +1459,14 @@ if (currentItem == 1) { #if defined(_DEBUG) - RDebug::Print(_L("(SECUI)CSecuritySettings::ChangePinRequestL() currentItem: ELockSetDisabled")); + RDebug::Print(_L("(SECUI)CSecuritySettings::ChangeUPinRequestL() currentItem: ELockSetDisabled")); #endif lockChangeSetting = RMobilePhone::ELockSetDisabled; } else { #if defined(_DEBUG) - RDebug::Print(_L("(SECUI)CSecuritySettings::ChangePinRequestL() currentItem: ELockSetEnabled")); + RDebug::Print(_L("(SECUI)CSecuritySettings::ChangeUPinRequestL() currentItem: ELockSetEnabled")); #endif lockChangeSetting = RMobilePhone::ELockSetEnabled; } @@ -2428,18 +2022,9 @@ #if defined(_DEBUG) RDebug::Print(_L("(SECUI)CSecuritySettings::ShowErrorNoteL()")); #endif - // Let's create TextResolver instance for error resolving... - CTextResolver* textresolver = CTextResolver::NewLC(); - // Resolve the error - TPtrC errorstring; - errorstring.Set( textresolver->ResolveErrorString( aError ) ); - CAknNoteDialog* noteDlg = new (ELeave) CAknNoteDialog(REINTERPRET_CAST(CEikDialog**,¬eDlg)); - noteDlg->PrepareLC(R_CODE_ERROR); - noteDlg->SetTextL((TDesC&)errorstring); - noteDlg->SetTimeout(CAknNoteDialog::ELongTimeout); - noteDlg->SetTone(CAknNoteDialog::EErrorTone); - noteDlg->RunLD(); - CleanupStack::PopAndDestroy(); // resolver + RDebug::Printf( "%s %s (%u) aError=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, aError ); + + ShowResultNoteL(aError, CAknNoteDialog::EErrorTone); } // @@ -2454,10 +2039,83 @@ RDebug::Print(_L("(SECUI)CSecuritySettings::ShowResultNoteL()")); RDebug::Print(_L("(SECUI)CSecuritySettings::ShowResultNoteL() Resource ID: %d"), aResourceID); #endif + RDebug::Printf( "%s %s (%u) aResourceID=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, aResourceID ); + + /* CAknNoteDialog* noteDlg = new (ELeave) CAknNoteDialog(REINTERPRET_CAST(CEikDialog**,¬eDlg)); noteDlg->SetTimeout(CAknNoteDialog::ELongTimeout); noteDlg->SetTone(aTone); noteDlg->ExecuteLD(aResourceID); + */ + CHbDeviceMessageBoxSymbian* messageBox = CHbDeviceMessageBoxSymbian::NewL(CHbDeviceMessageBoxSymbian::EWarning); + CleanupStack::PushL(messageBox); + _LIT(KText, "ShowResultNoteL: "); + TBuf<0x200> title; + title.Zero(); + title.Append(KText); + title.AppendNum(aResourceID); + _LIT(KSeparator, " "); + title.Append(KSeparator); + switch(aResourceID) + { + case 0: + title.Append(_L("OK")); + break; + case KErrGsm0707IncorrectPassword: + title.Append(_L("KErrGsm0707IncorrectPassword")); + break; + case KErrAccessDenied: + title.Append(_L("KErrAccessDenied")); + break; + case KErrGsmSSPasswordAttemptsViolation: + title.Append(_L("KErrGsmSSPasswordAttemptsViolation")); + break; + case KErrLocked: + title.Append(_L("KErrLocked")); + break; + case KErrGsm0707OperationNotAllowed: + title.Append(_L("KErrGsm0707OperationNotAllowed")); + break; + case KErrAbort: + title.Append(_L("KErrAbort")); + break; + case KErrNotSupported: + title.Append(_L("KErrNotSupported")); + break; + case R_SEC_BLOCKED: + title.Append(_L("R_SEC_BLOCKED")); + break; + case R_CODE_ERROR: + title.Append(_L("R_CODE_ERROR")); + break; + case KErrGsmInvalidParameter: + title.Append(_L("KErrGsmInvalidParameter")); + break; + case R_CONFIRMATION_NOTE: + title.Append(_L("R_CONFIRMATION_NOTE")); + break; + case R_CODES_DONT_MATCH: + title.Append(_L("R_CODES_DONT_MATCH")); + break; + case R_PIN_CODE_CHANGED_NOTE: + title.Append(_L("R_PIN_CODE_CHANGED_NOTE")); + break; + case R_SECURITY_CODE_CHANGED_NOTE: + title.Append(_L("R_SECURITY_CODE_CHANGED_NOTE")); + break; + default: + title.Append(_L("Specific Error")); + break; + } + messageBox->SetTextL(title); + RDebug::Printf( "%s %s (%u) aResourceID=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, aResourceID ); + + _LIT(KIconName, "qtg_small_smiley_wondering"); + messageBox->SetIconNameL(KIconName); + + messageBox->ExecL(); + CleanupStack::PopAndDestroy(); // messageBox + } // @@ -2600,4 +2258,561 @@ return EFalse; } +EXPORT_C TInt CSecuritySettings::ChangePinParamsL(RMobilePhone::TMobilePassword aOldPassword, RMobilePhone::TMobilePassword aNewPassword, TInt aFlags, TDes& aCaption, TInt aShowError) + { + TInt ret = KErrNone; + RDebug::Printf( "%s %s (%u) aFlags=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, aFlags ); + RDebug::Printf( "%s %s (%u) aOldPassword=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + RDebug::Print(aOldPassword); + RDebug::Printf( "%s %s (%u) aOldPassword=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + RDebug::Print(aNewPassword); + RDebug::Printf( "%s %s (%u) aCaption=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + RDebug::Print(aCaption); + RDebug::Printf( "%s %s (%u) aShowError=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, aShowError ); + + + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + + TInt simState; + TInt err( KErrGeneral ); + err = RProperty::Get(KPSUidStartup, KPSSimStatus, simState); + User::LeaveIfError( err ); + TBool simRemoved(simState == ESimNotPresent); + + if ( simRemoved ) + { + ShowResultNoteL(R_INSERT_SIM, CAknNoteDialog::EErrorTone); + return; + } + #if defined(_DEBUG) + RDebug::Print(_L("(SECUI)CSecuritySettings::ChangePinParamsL()")); + #endif + RMobilePhone::TMobilePhoneSecurityCode secCodeType; + secCodeType = RMobilePhone::ESecurityCodePin1; + + RMobilePhone::TMobilePassword oldPassword; + RMobilePhone::TMobilePassword newPassword; + RMobilePhone::TMobilePassword verifcationPassword; + RMobilePhone::TMobilePhonePasswordChangeV1 passwords; + RMobilePhone::TMobilePhoneSecurityCodeInfoV5 codeInfo; + RMobilePhone::TMobilePhoneSecurityCodeInfoV5Pckg codeInfoPkg(codeInfo); + TBool queryAccepted = EFalse; + + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + + RMobilePhone::TMobilePhoneLock lockType; + RMobilePhone::TMobilePhoneLockInfoV1 lockInfo; + + lockType = RMobilePhone::ELockICC; + + RMobilePhone::TMobilePhoneLockInfoV1Pckg lockInfoPkg(lockInfo); + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + iWait->SetRequestType(EMobilePhoneGetLockInfo); + #ifndef __WINS__ + iPhone.GetLockInfo(iWait->iStatus, lockType, lockInfoPkg); + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + TInt res = iWait->WaitForRequestL(); + #else + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + TInt res = KErrNone; + #endif + User::LeaveIfError(res); + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + + if (lockInfo.iSetting == RMobilePhone::ELockSetDisabled) + { + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + // CleanupStack::PopAndDestroy(1,dlg); // TODO sure about dlg ? + ShowResultNoteL(R_PIN_NOT_ALLOWED, CAknNoteDialog::EErrorTone); + return; + } + + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + iWait->SetRequestType(EMobilePhoneGetSecurityCodeInfo); + #ifndef __WINS__ + iPhone.GetSecurityCodeInfo(iWait->iStatus, secCodeType, codeInfoPkg); + res = iWait->WaitForRequestL(); + #else + res = KErrNone; + #endif + User::LeaveIfError(res); + RDebug::Printf( "%s %s (%u) codeInfo.iRemainingEntryAttempts=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, codeInfo.iRemainingEntryAttempts ); + codeInfo.iRemainingEntryAttempts=KMaxNumberOfPINAttempts; + + RDebug::Printf( "%s %s (%u) checking aOldPassword=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + if(aOldPassword.Length()==0) + { + RDebug::Printf( "%s %s (%u) asking aOldPassword=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + /* request PIN using QT */ + queryAccepted = EFalse; + CSecQueryUi *iSecQueryUi; + iSecQueryUi = CSecQueryUi::NewL(); + queryAccepted = iSecQueryUi->SecQueryDialog( _L("PIN1-Old"), oldPassword, 4, 8, ESecUiCancelSupported | ESecUiEmergencyNotSupported | secCodeType ); + RDebug::Printf( "%s %s (%u) oldPassword=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + RDebug::Print( oldPassword ); + RDebug::Printf( "%s %s (%u) queryAccepted=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + delete iSecQueryUi; + if(!queryAccepted) + return; + res=1; // indicate that everything is ok + /* end request PIN using QT */ + newPassword = _L(""); + verifcationPassword = _L(""); + } + else + { + oldPassword.Copy(aOldPassword); + newPassword.Copy(aNewPassword); + verifcationPassword.Copy(aNewPassword); + } + + RDebug::Printf( "%s %s (%u) res=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, res ); + + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + while (newPassword.Length()==0 || newPassword.CompareF(verifcationPassword) != 0) + { + // codes do not match -> note -> ask new pin and verification codes again + if(newPassword.Length()>0) + ShowResultNoteL(R_CODES_DONT_MATCH, CAknNoteDialog::EErrorTone); + + newPassword = _L(""); + verifcationPassword = _L(""); + + // new pin code query + if(aOldPassword.Length()==0) // only if inout parameters are empty + { + /* request PIN using QT */ + { + queryAccepted = EFalse; + CSecQueryUi *iSecQueryUi; + iSecQueryUi = CSecQueryUi::NewL(); + queryAccepted = iSecQueryUi->SecQueryDialog( _L("PIN1-New"), newPassword, 4, 8, ESecUiCancelSupported | ESecUiEmergencyNotSupported | secCodeType ); + RDebug::Printf( "%s %s (%u) newPassword=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + RDebug::Print( newPassword ); + RDebug::Printf( "%s %s (%u) queryAccepted=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + delete iSecQueryUi; + if(!queryAccepted) + return; + } + /* end request PIN using QT */ + + RDebug::Printf( "%s %s (%u) 1=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + /* request PIN using QT */ + { + queryAccepted = EFalse; + CSecQueryUi *iSecQueryUi; + iSecQueryUi = CSecQueryUi::NewL(); + queryAccepted = iSecQueryUi->SecQueryDialog( _L("PIN1-Ver"), verifcationPassword, 4, 8, ESecUiCancelSupported | ESecUiEmergencyNotSupported | secCodeType ); + RDebug::Printf( "%s %s (%u) verifcationPassword=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + RDebug::Print( verifcationPassword ); + RDebug::Printf( "%s %s (%u) queryAccepted=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + delete iSecQueryUi; + if(!queryAccepted) + return; + } + /* end request PIN using QT */ + } + } + + // send code + passwords.iOldPassword = oldPassword; + passwords.iNewPassword = newPassword; + RDebug::Printf( "%s %s (%u) SetRequestType=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + RDebug::Print( passwords.iOldPassword ); + RDebug::Print( passwords.iNewPassword ); + iWait->SetRequestType(EMobilePhoneChangeSecurityCode); + #ifndef __WINS__ + iPhone.ChangeSecurityCode(iWait->iStatus, secCodeType, passwords); + res = iWait->WaitForRequestL(); + #else + res = KErrNone; + #endif + RDebug::Printf( "%s %s (%u) res=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, res ); + #if defined(_DEBUG) + RDebug::Print( _L("(SECUI)CSecuritySettings::ChangePinParamsL(): RETURN CODE: %d"), res); + #endif + switch(res) + { + case KErrNone: + { + // code changed + ShowResultNoteL(R_PIN_CODE_CHANGED_NOTE, CAknNoteDialog::EConfirmationTone); + break; + } + case KErrGsm0707IncorrectPassword: + case KErrAccessDenied: + { + // code was entered erroneously + ShowResultNoteL(R_CODE_ERROR, CAknNoteDialog::EErrorTone); + ChangePinParamsL(_L(""), _L(""), aFlags, aCaption, aShowError); + break; + } + case KErrGsmSSPasswordAttemptsViolation: + case KErrLocked: + { + // Pin1 blocked! + return; + } + case KErrGsm0707OperationNotAllowed: + { + // not allowed with this sim + ShowResultNoteL(R_OPERATION_NOT_ALLOWED, CAknNoteDialog::EErrorTone); + return; + } + case KErrAbort: + { + break; + } + default: + { + ShowErrorNoteL(res); + ChangePinParamsL(_L(""), _L(""), aFlags, aCaption, aShowError); + break; + } + } + return res; + } +EXPORT_C TInt CSecuritySettings::ChangeUPinParamsL(RMobilePhone::TMobilePassword aOldPassword, RMobilePhone::TMobilePassword aNewPassword, TInt aFlags, TDes& aCaption, TInt aShowError) + { + TInt ret = KErrNone; + #if defined(_DEBUG) + RDebug::Printf( "%s %s (%u) aFlags=%x aShowError=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, aFlags, aShowError ); + #endif + } +EXPORT_C TInt CSecuritySettings::ChangePin2ParamsL(RMobilePhone::TMobilePassword aOldPassword, RMobilePhone::TMobilePassword aNewPassword, TInt aFlags, TDes& aCaption, TInt aShowError) + { + TInt ret = KErrNone; + #if defined(_DEBUG) + RDebug::Printf( "%s %s (%u) aFlags=%x aShowError=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, aFlags, aShowError ); + #endif + } +EXPORT_C TInt CSecuritySettings::ChangeSecCodeParamsL(RMobilePhone::TMobilePassword aOldPassword, RMobilePhone::TMobilePassword aNewPassword, TInt aFlags, TDes& aCaption, TInt aShowError) + { + TInt ret = KErrNone; + #if defined(_DEBUG) + RDebug::Printf( "%s %s (%u) aFlags=%x aShowError=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, aFlags, aShowError ); + #endif + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + #if defined(_DEBUG) + RDebug::Print(_L("(SECUI)CSecuritySettings::ChangeSecCodeParamsL()")); + #endif + TInt res=0; + TBool queryAccepted = EFalse; + RMobilePhone::TMobilePassword newPassword; + + RMobilePhone::TMobilePhoneSecurityCode secCodeType; + secCodeType = RMobilePhone::ESecurityCodePhonePassword; + RMobilePhone::TMobilePassword oldPassword; + RMobilePhone::TMobilePassword verifcationPassword; + RMobilePhone::TMobilePassword required_fourth; + RMobilePhone::TMobilePhonePasswordChangeV1 passwords; + + if(aOldPassword.Length()==0) + { /* request PIN using QT */ + queryAccepted = EFalse; + CSecQueryUi *iSecQueryUi; + iSecQueryUi = CSecQueryUi::NewL(); + // TODO allow and handle Cancel + queryAccepted = iSecQueryUi->SecQueryDialog( _L("Lock-Old"), oldPassword, 4, 8, ESecUiCancelSupported | ESecUiEmergencyNotSupported | secCodeType ); + RDebug::Printf( "%s %s (%u) oldPassword=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + RDebug::Print( oldPassword ); + RDebug::Printf( "%s %s (%u) queryAccepted=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + delete iSecQueryUi; + if(!queryAccepted) + return KErrAbort; + res=1; // indicate that everything is ok + /* end request PIN using QT */ + newPassword = _L(""); + verifcationPassword = _L(""); + } + else + { + oldPassword.Copy(aOldPassword); + newPassword.Copy(aNewPassword); + verifcationPassword.Copy(aNewPassword); + } + + RDebug::Printf( "%s %s (%u) EMobilePhoneVerifySecurityCode=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, EMobilePhoneVerifySecurityCode ); + iWait->SetRequestType(EMobilePhoneVerifySecurityCode); + // check code + iPhone.VerifySecurityCode(iWait->iStatus,secCodeType, oldPassword, required_fourth); + res = iWait->WaitForRequestL(); + RDebug::Printf( "%s %s (%u) VerifySecurityCode res=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, res ); + + if(res!=KErrNone) + { + ShowResultNoteL(res, CAknNoteDialog::EErrorTone); + return res; + } + + while (newPassword.Length()==0 || newPassword.CompareF(verifcationPassword) != 0) + { + // codes do not match -> note -> ask new pin and verification codes again + if(newPassword.Length()>0) + ShowResultNoteL(R_CODES_DONT_MATCH, CAknNoteDialog::EErrorTone); + + { + queryAccepted = EFalse; + CSecQueryUi *iSecQueryUi; + iSecQueryUi = CSecQueryUi::NewL(); + queryAccepted = iSecQueryUi->SecQueryDialog( _L("Lock-New"), newPassword, 4, 8, ESecUiCancelSupported | ESecUiEmergencyNotSupported | secCodeType ); + RDebug::Printf( "%s %s (%u) newPassword=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + RDebug::Print( newPassword ); + RDebug::Printf( "%s %s (%u) queryAccepted=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + delete iSecQueryUi; + if(!queryAccepted) + return KErrAbort; + } + + { + queryAccepted = EFalse; + CSecQueryUi *iSecQueryUi; + iSecQueryUi = CSecQueryUi::NewL(); + queryAccepted = iSecQueryUi->SecQueryDialog( _L("Lock-Verif"), verifcationPassword, 4, 8, ESecUiCancelSupported | ESecUiEmergencyNotSupported | secCodeType ); + RDebug::Printf( "%s %s (%u) verifcationPassword=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + RDebug::Print( verifcationPassword ); + RDebug::Printf( "%s %s (%u) queryAccepted=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + delete iSecQueryUi; + if(!queryAccepted) + return KErrAbort; + // TODO allow and handle Cancel + } + + } // while + + // change code + RDebug::Printf( "%s %s (%u) res=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, res ); + if (res == KErrNone) + { + passwords.iOldPassword = oldPassword; + passwords.iNewPassword = newPassword; + iWait->SetRequestType(EMobilePhoneChangeSecurityCode); + RDebug::Printf( "%s %s (%u) ChangeSecurityCode=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + iPhone.ChangeSecurityCode(iWait->iStatus,secCodeType,passwords); + res = iWait->WaitForRequestL(); + RDebug::Printf( "%s %s (%u) res=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, res ); + + if(res==KErrNone && 1==0 ) // TODO not possible to enable because it asks code again + { + RMobilePhone::TMobilePhoneLock lockType = RMobilePhone::ELockPhoneDevice; + RMobilePhone::TMobilePhoneLockSetting lockChangeSetting = RMobilePhone::ELockSetEnabled; + if(oldPassword.Length()==6) + { + lockChangeSetting = RMobilePhone::ELockSetDisabled; + RDebug::Printf( "%s %s (%u) RMobilePhone::ELockSetDisabled=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, RMobilePhone::ELockSetDisabled ); + } + iWait->SetRequestType(EMobilePhoneSetLockSetting); + RDebug::Printf( "%s %s (%u) SetLockSetting=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + iPhone.SetLockSetting(iWait->iStatus, lockType, lockChangeSetting ); + res = iWait->WaitForRequestL(); + RDebug::Printf( "%s %s (%u) res=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, res ); + } + } + + RDebug::Printf( "%s %s (%u) res=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, res ); + #if defined(_DEBUG) + RDebug::Print( _L("(SECUI)CSecuritySettings::ChangeSecCodeParamsL(): RETURN CODE: %d"), res); + #endif + switch(res) + { + case KErrNone: + { + // code changed + ShowResultNoteL(R_SECURITY_CODE_CHANGED_NOTE, CAknNoteDialog::EConfirmationTone); + if(FeatureManager::FeatureSupported(KFeatureIdSapTerminalControlFw ) && + !(FeatureManager::FeatureSupported(KFeatureIdSapDeviceLockEnhancements ))) + { + // Send the changed code to the SCP server. Not used with device lock enhancements. + RDebug::Printf( "%s %s (%u) scpClient.Connect=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + RSCPClient scpClient; + TSCPSecCode newCode; + newCode.Copy( newPassword ); + if ( scpClient.Connect() == KErrNone ) + { + RDebug::Printf( "%s %s (%u) scpClient.StoreCode=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + scpClient.StoreCode( newCode ); + scpClient.Close(); + } + } + break; + } + case KErrGsmSSPasswordAttemptsViolation: + case KErrLocked: + { + ShowResultNoteL(R_SEC_BLOCKED, CAknNoteDialog::EErrorTone); + ChangeSecCodeParamsL(aOldPassword, aNewPassword, aFlags, aCaption, aShowError); + break; + } + case KErrGsm0707IncorrectPassword: + case KErrAccessDenied: + { + // code was entered erroneously + ShowResultNoteL(R_CODE_ERROR, CAknNoteDialog::EErrorTone); + ChangeSecCodeParamsL(aOldPassword, aNewPassword, aFlags, aCaption, aShowError); + break; + } + case KErrAbort: + { + break; + } + default: + { + ShowErrorNoteL(res); + ChangeSecCodeParamsL(aOldPassword, aNewPassword, aFlags, aCaption, aShowError); + break; + } + } // switch + } +EXPORT_C TInt CSecuritySettings::ChangeAutoLockPeriodParamsL(TInt aPeriod, RMobilePhone::TMobilePassword aOldPassword, TInt aFlags, TDes& aCaption, TInt aShowError) + { + TInt ret = KErrNone; + #if defined(_DEBUG) + RDebug::Printf( "%s %s (%u) aFlags=%x aShowError=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, aFlags, aShowError ); + #endif + } +EXPORT_C TInt CSecuritySettings::ChangePinRequestParamsL(TInt aEnable, RMobilePhone::TMobilePassword aOldPassword, TInt aFlags, TDes& aCaption, TInt aShowError) + { + TInt ret = KErrNone; + #if defined(_DEBUG) + RDebug::Printf( "%s %s (%u) aFlags=%x aShowError=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, aFlags, aShowError ); + #endif + /***************************************************** + * Series 60 Customer / ETel + * Series 60 ETel API + *****************************************************/ + #if defined(_DEBUG) + RDebug::Print(_L("(SECUI)CSecuritySettings::ChangePinRequestL()")); + #endif + TInt simState=0; + TInt lEnable=aEnable; + TInt err( KErrGeneral ); + err = RProperty::Get(KPSUidStartup, KPSSimStatus, simState); + User::LeaveIfError( err ); + TBool simRemoved(simState == ESimNotPresent); + + if ( simRemoved ) + { + ShowResultNoteL(R_INSERT_SIM, CAknNoteDialog::EErrorTone); + return EFalse;; + } + + RMobilePhone::TMobilePhoneLockInfoV1 lockInfo; + RMobilePhone::TMobilePhoneLockInfoV1Pckg lockInfoPkg(lockInfo); + RMobilePhone::TMobilePhoneLock lockType = RMobilePhone::ELockICC; + + RMobilePhone::TMobilePhoneLockSetting lockChangeSetting; + + + //get lock info + iWait->SetRequestType(EMobilePhoneGetLockInfo); + iPhone.GetLockInfo(iWait->iStatus, lockType, lockInfoPkg); + TInt status = iWait->WaitForRequestL(); + User::LeaveIfError(status); + TInt currentItem = 0; + + #if defined(_DEBUG) + RDebug::Print(_L("(SECUI)CSecuritySettings::ChangePinRequestL() GetLockInfo")); + #endif + + if(aOldPassword.Length()==0) // only if input parameters are empty + { + // switch the value. + if (lockInfo.iSetting == RMobilePhone::ELockSetDisabled) + lEnable=1; // on + else + lEnable=0; // off + } + + if (lEnable == 0) + { + #if defined(_DEBUG) + RDebug::Print(_L("(SECUI)CSecuritySettings::ChangePinRequestL() currentItem: ELockSetDisabled")); + #endif + lockChangeSetting = RMobilePhone::ELockSetDisabled; + } + else + { + #if defined(_DEBUG) + RDebug::Print(_L("(SECUI)CSecuritySettings::ChangePinRequestL() currentItem: ELockSetEnabled")); + #endif + lockChangeSetting = RMobilePhone::ELockSetEnabled; + } + + // Raise a flag to indicate that the PIN + // request coming from ETEL has originated from SecUi and not from Engine. + TInt tRet = RProperty::Set(KPSUidSecurityUIs, KSecurityUIsSecUIOriginatedQuery, ESecurityUIsSecUIOriginated); + if ( tRet != KErrNone ) + { + #if defined(_DEBUG) + RDebug::Print(_L("(SECUI)CSecuritySettings::ChangePinRequestL():\ + FAILED to set the SECUI query Flag: %d"), tRet); + #endif + } + + /* TODO do I really need this? wouldn't it just generate RMobilePhone::EPin1Required and then continue ? */ + /* + RMobilePhone::TMobilePhoneSecurityCode secCodeType = RMobilePhone::ESecurityCodePin1; + RMobilePhone::TMobilePassword oldPassword; + TBool queryAccepted = EFalse; + CSecQueryUi *iSecQueryUi; + iSecQueryUi = CSecQueryUi::NewL(); + queryAccepted = iSecQueryUi->SecQueryDialog( _L("PIN1-Curr"), oldPassword, 4, 8, secCodeType ); + RDebug::Printf( "%s %s (%u) oldPassword=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + RDebug::Print( oldPassword ); + RDebug::Printf( "%s %s (%u) queryAccepted=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 1 ); + delete iSecQueryUi; + */ + + // Change the lock setting + iWait->SetRequestType(EMobilePhoneSetLockSetting); + RProperty::Set(KPSUidSecurityUIs, KSecurityUIsQueryRequestCancel, ESecurityUIsQueryRequestOk); + iPhone.SetLockSetting(iWait->iStatus,lockType,lockChangeSetting); // this will trigger Pin1RequiredL + status = iWait->WaitForRequestL(); + #if defined(_DEBUG) + RDebug::Print( _L("(SECUI)CSecuritySettings::ChangePinRequestL(): RETURN CODE: %d"), status); + #endif + + // Lower the flag + RProperty::Set(KPSUidSecurityUIs, KSecurityUIsSecUIOriginatedQuery, ESecurityUIsETelAPIOriginated); + + switch(status) + { + case KErrNone: + { + break; + } + case KErrGsm0707OperationNotAllowed: + { + // not allowed with this sim + ShowResultNoteL(R_OPERATION_NOT_ALLOWED, CAknNoteDialog::EErrorTone); + return EFalse; + } + case KErrGsm0707IncorrectPassword: + case KErrAccessDenied: + { + // code was entered erroneously + return ChangePinRequestParamsL(aEnable, aOldPassword, aFlags, aCaption, aShowError); + } + case KErrGsmSSPasswordAttemptsViolation: + case KErrLocked: + { + return ETrue; + } + case KErrAbort: + { + return EFalse; + } + default: + { + return ChangePinRequestParamsL(aEnable, aOldPassword, aFlags, aCaption, aShowError); + } + } + } + // End of file diff -r b75757c81051 -r 318c4eab2439 securitydialogs/SecUi/group/SecUi.mmp --- a/securitydialogs/SecUi/group/SecUi.mmp Fri Mar 19 09:41:08 2010 +0200 +++ b/securitydialogs/SecUi/group/SecUi.mmp Fri Apr 16 15:53:24 2010 +0300 @@ -20,6 +20,8 @@ #include #include +SYSTEMINCLUDE /epoc32/include/mw/hb/hbcore + TARGET secui.dll TARGETTYPE dll UID 0x1000006C 0x100058ED @@ -56,6 +58,7 @@ SOURCE SecUiCodeQueryControl.cpp SOURCE SecUiManualSecuritySettings.cpp SOURCE SecUiWait.cpp + SOURCE SecQueryUi.cpp library EUSER.LIB BAFL.LIB CONE.LIB @@ -88,6 +91,8 @@ SOURCE ../Src/SecUiManualSecuritySettings.cpp SOURCE ../Src/SecUiSystemLock.cpp SOURCE ../Src/SecUiWait.cpp + SOURCE ../Src/SecQueryUi.cpp + SOURCE ../Src/SecUiLockObserver.cpp #ifdef RD_REMOTELOCK SOURCE ../Src/SecUiRemoteLockSettingPage.cpp @@ -123,6 +128,9 @@ LIBRARY featmgr.lib LIBRARY aknnotify.lib +LIBRARY HbCore.lib +LIBRARY HbWidgets.lib + SMPSAFE // end of file diff -r b75757c81051 -r 318c4eab2439 securitydialogs/SecUi/group/bld.inf --- a/securitydialogs/SecUi/group/bld.inf Fri Mar 19 09:41:08 2010 +0200 +++ b/securitydialogs/SecUi/group/bld.inf Fri Apr 16 15:53:24 2010 +0300 @@ -39,5 +39,7 @@ ../group/SecUi.mmp //SIM security plugin for General Settings +/* +Not any more. The settings are replaced by Qt-style plugins ../GSSimSecPlugin/GSSimSecPlugin.mmp - +*/ diff -r b75757c81051 -r 318c4eab2439 securitydialogs/lockapp/group/ABLD.BAT --- a/securitydialogs/lockapp/group/ABLD.BAT Fri Mar 19 09:41:08 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -@ECHO OFF - -REM Bldmake-generated batch file - ABLD.BAT -REM ** DO NOT EDIT ** - -perl -S ABLD.PL "\sf\mw\securitysrv\securitydialogs\lockapp\group\\" %1 %2 %3 %4 %5 %6 %7 %8 %9 -if errorlevel==1 goto CheckPerl -goto End - -:CheckPerl -perl -v >NUL -if errorlevel==1 echo Is Perl, version 5.003_07 or later, installed? -goto End - -:End diff -r b75757c81051 -r 318c4eab2439 securitydialogs/lockapp/src/lockappkeyguardcontrol.cpp --- a/securitydialogs/lockapp/src/lockappkeyguardcontrol.cpp Fri Mar 19 09:41:08 2010 +0200 +++ b/securitydialogs/lockapp/src/lockappkeyguardcontrol.cpp Fri Apr 16 15:53:24 2010 +0300 @@ -35,7 +35,7 @@ #include "AutolockPrivateCRKeys.h" #include -#include +// #include #include #include //#include TODO remove @@ -298,12 +298,20 @@ idle = (value == EPSAiForeground); INFO_2("CLockAppKeyguardControl::AutoActivationAllowedL - idle: %d %d", value, idle); value = 0; + /* This is not used any more because screensavers are removed now RProperty::Get( KPSUidScreenSaver, KScreenSaverOn, value ); screenSaverOn = (value > 0); + */ + screenSaverOn = ETrue; + INFO_2("CLockAppKeyguardControl::AutoActivationAllowedL - screenSaverOn: %d %d", value, screenSaverOn); value = 0; + /* This is not used any more because screensavers are removed now RProperty::Get( KPSUidScreenSaver, KScreenSaverActivatedFromIdle, value ); screenSaverStertedFromIdle = (value == KSsStartedFromIdle); + */ + screenSaverStertedFromIdle = ETrue; + INFO_2("CLockAppKeyguardControl::AutoActivationAllowedL - screenSaverStertedFromIdle: %d %d", value, screenSaverStertedFromIdle); // If a call is ongoing or idle doesnt have foreground and diff -r b75757c81051 -r 318c4eab2439 securitydialogs/lockapp/src/lockappstatecontrol.cpp --- a/securitydialogs/lockapp/src/lockappstatecontrol.cpp Fri Mar 19 09:41:08 2010 +0200 +++ b/securitydialogs/lockapp/src/lockappstatecontrol.cpp Fri Apr 16 15:53:24 2010 +0300 @@ -33,7 +33,7 @@ #include #include -#include +// #include #include #include @@ -194,7 +194,9 @@ AddObserverL( lockPublisher ); // ownership is transfered // PubSub observers + /* This is not used any more because screensavers are removed now iPSScreenSaverObserver = CLockAppPubSubObserver::NewL( this, KPSUidScreenSaver, KScreenSaverOn ); + */ iPSTelephonyObserver = CLockAppPubSubObserver::NewL( this, KPSUidCtsyCallInformation, KCTsyCallState ); iPSGripObserver = CLockAppPubSubObserver::NewL( this, KPSUidHWRM, KHWRMGripStatus ); @@ -497,6 +499,7 @@ void CLockAppStateControl::HandlePubSubNotify(TUid aPubSubUid, TUint aKeyId, TInt aValue ) { INFO_3( "CLockAppStateControl::HandlePubSubNotify %x %x = %d", aPubSubUid.iUid, aKeyId, aValue ); + /* This is not used any more because screensavers are removed now INFO_3( "CLockAppStateControl::HandlePubSubNotify KPSUidScreenSaver=%x KPSUidCtsyCallInformation=%x KPSUidAiInformation=%x", KPSUidScreenSaver, KPSUidCtsyCallInformation, KPSUidAiInformation ); INFO_3( "CLockAppStateControl::HandlePubSubNotify KPSUidHWRM=%x KHWRMGripStatus=%x KPSUidAiInformation=%x", KPSUidHWRM, KHWRMGripStatus, KPSUidAiInformation ); if ( aPubSubUid == KPSUidScreenSaver ) @@ -570,6 +573,7 @@ break; } } + */ } // --------------------------------------------------------------------------- diff -r b75757c81051 -r 318c4eab2439 securitydialogs/lockclient/eabi/lockclientu.def --- a/securitydialogs/lockclient/eabi/lockclientu.def Fri Mar 19 09:41:08 2010 +0200 +++ b/securitydialogs/lockclient/eabi/lockclientu.def Fri Apr 16 15:53:24 2010 +0300 @@ -21,8 +21,4 @@ _ZN20CDevicelockAccessApiD0Ev @ 20 NONAME _ZN20CDevicelockAccessApiD1Ev @ 21 NONAME _ZN20CDevicelockAccessApiD2Ev @ 22 NONAME - _ZTI18CKeyguardAccessApi @ 23 NONAME ; ## - _ZTI20CDevicelockAccessApi @ 24 NONAME ; ## - _ZTV18CKeyguardAccessApi @ 25 NONAME ; ## - _ZTV20CDevicelockAccessApi @ 26 NONAME ; ## diff -r b75757c81051 -r 318c4eab2439 securitydialogs/lockclient/group/ABLD.BAT --- a/securitydialogs/lockclient/group/ABLD.BAT Fri Mar 19 09:41:08 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -@ECHO OFF - -REM Bldmake-generated batch file - ABLD.BAT -REM ** DO NOT EDIT ** - -perl -S ABLD.PL "\sf\mw\securitysrv\securitydialogs\lockclient\group\\" %1 %2 %3 %4 %5 %6 %7 %8 %9 -if errorlevel==1 goto CheckPerl -goto End - -:CheckPerl -perl -v >NUL -if errorlevel==1 echo Is Perl, version 5.003_07 or later, installed? -goto End - -:End diff -r b75757c81051 -r 318c4eab2439 securitydialogs/lockclient/group/bld.inf --- a/securitydialogs/lockclient/group/bld.inf Fri Mar 19 09:41:08 2010 +0200 +++ b/securitydialogs/lockclient/group/bld.inf Fri Apr 16 15:53:24 2010 +0300 @@ -24,4 +24,7 @@ PRJ_MMPFILES +/* +Not any more. This should be done in the QT way, using lockclient.pro lockclient.mmp +*/ \ No newline at end of file diff -r b75757c81051 -r 318c4eab2439 securitydialogs/lockclient/group/lockclient.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/lockclient/group/lockclient.pro Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,47 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + + +TEMPLATE = lib +TARGET = lockclient + +TARGET.UID3 = 0x2000B124 + +TARGET.CAPABILITY = CAP_GENERAL_DLL + + +DEPENDPATH += . +DEPENDPATH += ../src +DEPENDPATH += ../inc + +INCLUDEPATH += . + +CONFIG += hb + +# Input +SOURCES += devicelockaccessapi.cpp \ + keyguardaccessapi.cpp \ + lockaccessextension.cpp + +HEADERS = lockaccessextension.h + +LIBS += -lxqservice +LIBS += -lxqserviceutil + +symbian*: { + TARGET.EPOCALLOWDLLDATA = 1 + MMP_RULES -= "OPTION_REPLACE ARMCC --export_all_vtbl -D__QT_NOEFFECTMACRO_DONOTUSE" + } diff -r b75757c81051 -r 318c4eab2439 securitydialogs/lockclient/lockclient.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/lockclient/lockclient.pro Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,21 @@ +# +# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +TEMPLATE = subdirs + +SYMBIAN_PLATFORMS = WINSCW ARMV5 + +SUBDIRS += group/lockclient.pro diff -r b75757c81051 -r 318c4eab2439 securitydialogs/lockclient/src/keyguardaccessapi.cpp --- a/securitydialogs/lockclient/src/keyguardaccessapi.cpp Fri Mar 19 09:41:08 2010 +0200 +++ b/securitydialogs/lockclient/src/keyguardaccessapi.cpp Fri Apr 16 15:53:24 2010 +0300 @@ -24,11 +24,16 @@ #include // P&S API #include +#include + // --------------------------------------------------------------------------- // Standard Symbian OS construction sequence // --------------------------------------------------------------------------- EXPORT_C CKeyguardAccessApi* CKeyguardAccessApi::NewL( ) { + qDebug() << "============= CKeyguardAccessApi::NewL"; + RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + CKeyguardAccessApi* self = new (ELeave) CKeyguardAccessApi( ); CleanupStack::PushL( self ); self->ConstructL( ); @@ -41,6 +46,8 @@ // --------------------------------------------------------------------------- CKeyguardAccessApi::CKeyguardAccessApi() { + qDebug() << "============= CKeyguardAccessApi::CKeyguardAccessApi"; + RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); } // --------------------------------------------------------------------------- @@ -61,6 +68,8 @@ // --------------------------------------------------------------------------- void CKeyguardAccessApi::ConstructL( ) { + qDebug() << "============= CKeyguardAccessApi::ConstructL"; + RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); iLockAccessExtension = new (ELeave) RLockAccessExtension; } @@ -69,6 +78,8 @@ // --------------------------------------------------------------------------- EXPORT_C TBool CKeyguardAccessApi::IsKeylockEnabled() { + + qDebug() << "============= CKeyguardAccessApi::IsKeylockEnabled"; TInt value; TInt err = RProperty::Get(KPSUidAvkonDomain, KAknKeyguardStatus, value); if ( err == KErrNone ) @@ -94,6 +105,9 @@ // --------------------------------------------------------------------------- EXPORT_C TBool CKeyguardAccessApi::IsKeyguardEnabled() { + qDebug() << "============= CKeyguardAccessApi::IsKeyguardEnabled"; + RDebug::Printf( "%s %s (%u) value=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0 ); + TInt value; TInt err = RProperty::Get(KPSUidAvkonDomain, KAknKeyguardStatus, value); if ( err == KErrNone ) @@ -134,12 +148,16 @@ // --------------------------------------------------------------------------- EXPORT_C TInt CKeyguardAccessApi::DisableKeyguard( TBool aWithNote ) { + qDebug() << "============= CKeyguardAccessApi::DisableKeyguard"; if ( iLockAccessExtension ) { + qDebug() << "============= CKeyguardAccessApi::DisableKeyguard 1"; return iLockAccessExtension->SendMessage( ELockAppDisableKeyguard, aWithNote ); } else { + qDebug() << "============= CKeyguardAccessApi::DisableKeyguard 0"; + return KErrNotFound; } } @@ -164,6 +182,7 @@ // --------------------------------------------------------------------------- EXPORT_C TInt CKeyguardAccessApi::ShowKeysLockedNote() { + qDebug() << "============= CKeyguardAccessApi::ShowKeysLockedNote"; if ( iLockAccessExtension ) { return iLockAccessExtension->SendMessage( ELockAppShowKeysLockedNote ); diff -r b75757c81051 -r 318c4eab2439 securitydialogs/lockclient/src/lockaccessextension.cpp --- a/securitydialogs/lockclient/src/lockaccessextension.cpp Fri Mar 19 09:41:08 2010 +0200 +++ b/securitydialogs/lockclient/src/lockaccessextension.cpp Fri Apr 16 15:53:24 2010 +0300 @@ -22,6 +22,10 @@ #include // TApaTask, TApaTaskList #include // CCoeEnv +#include +#include +#include +#include // Constants const TInt KTimesToConnectServer( 2); @@ -41,6 +45,8 @@ TInt RLockAccessExtension::TryConnect( RWsSession& aWsSession ) { TInt ret(KErrNone); + /* + this is the old methd. Now we use QtHighway TApaTaskList list(aWsSession); // check that lockapp is running TApaTask task = list.FindApp( KLockAppUid ); @@ -62,6 +68,9 @@ RDebug::Printf( "%s %s (%u) ???? LockApp task not found=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, KLockAppUid ); ret = KErrNotReady; } + */ + qDebug() << "============= RLockAccessExtension::TryConnect"; + qDebug() << ret; return ret; } @@ -71,6 +80,8 @@ TInt RLockAccessExtension::EnsureConnected( ) { TInt ret(KErrNone); + /* + this is the old methd. Now we use QtHighway // we need CCoeEnv because of window group list CCoeEnv* coeEnv = CCoeEnv::Static( ); if ( coeEnv ) @@ -90,6 +101,9 @@ // No CCoeEnv ret = KErrNotSupported; } + */ + qDebug() << "============= RLockAccessExtension::EnsureConnected"; + qDebug() << ret; return ret; } @@ -101,7 +115,8 @@ TInt ret = EnsureConnected( ); if ( ret == KErrNone ) { - ret = SendReceive( aMessage ); + // ret = SendReceive( aMessage ); + ret = SendMessage( aMessage, -1, -1 ); } return ret; } @@ -116,7 +131,8 @@ { // assign parameters to IPC argument TIpcArgs args(aParam1); - ret = SendReceive( aMessage, args ); + // ret = SendReceive( aMessage, args ); + ret = SendMessage( aMessage, aParam1, -1 ); } return ret; } @@ -131,7 +147,29 @@ { // assign parameters to IPC argument TIpcArgs args( aParam1, aParam2); - ret = SendReceive( aMessage, args ); + // this is the old methd. Now we use QtHighway + // ret = SendReceive( aMessage, args ); + qDebug() << "============= RLockAccessExtension::SendMessage 123.1"; + qDebug() << aMessage; + qDebug() << aParam1; + qDebug() << aParam2; + XQServiceRequest* mServiceRequest; + qDebug() << "============= RLockAccessExtension::SendMessage 2"; + mServiceRequest = new XQServiceRequest("com.nokia.services.AutolockSrv.AutolockSrv","dial(QString,bool)");// use , false to make async + qDebug() << "============= RLockAccessExtension::SendMessage 2.1"; + qDebug() << mServiceRequest; + QString label = ""; + label += QString("%1").arg(aMessage); + *mServiceRequest << QString(label); + qDebug() << "============= RLockAccessExtension::SendMessage 2.2"; + bool isSync = false; + *mServiceRequest << isSync; + qDebug() << "============= RLockAccessExtension::SendMessage 3"; + int returnvalue; + bool ret = mServiceRequest->send(returnvalue); + qDebug() << "============= RLockAccessExtension::SendMessage 4"; + qDebug() << ret; + } return ret; } diff -r b75757c81051 -r 318c4eab2439 securitydialogs/secuinotifications/secuinotificationdialogplugin/inc/secuinotificationcontentwidget.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/secuinotifications/secuinotificationdialogplugin/inc/secuinotificationcontentwidget.h Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,53 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: SecUi notification content widget. +* +*/ + +#ifndef SECUINOTIFICATIONCONTENTWIDGET_H +#define SECUINOTIFICATIONCONTENTWIDGET_H + +#include // HbWidget +#include // HbWidget + +class HbLabel; + + +class SecUiNotificationContentWidget : public HbWidget +{ + Q_OBJECT + +public: + SecUiNotificationContentWidget(QGraphicsItem *parent=0, Qt::WindowFlags flags=0); + virtual ~SecUiNotificationContentWidget(); + + void constructFromParameters(const QVariantMap ¶meters); + +signals: + void memorySelectionChanged(const QString &text); + void codeTopChanged(const QString &text); + void but1Changed(); + void but2Changed(); + void but3Changed(); + +private: + Q_DISABLE_COPY(SecUiNotificationContentWidget) + +private: // data +public: + HbLineEdit *codeTop; + int queryType; +}; + +#endif // SECUINOTIFICATIONCONTENTWIDGET_H diff -r b75757c81051 -r 318c4eab2439 securitydialogs/secuinotifications/secuinotificationdialogplugin/inc/secuinotificationdialog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/secuinotifications/secuinotificationdialogplugin/inc/secuinotificationdialog.h Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,78 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: SecUi notification plugin dialog. +* +*/ + +#ifndef SECUINOTIFICATIONDIALOG_H +#define SECUINOTIFICATIONDIALOG_H + +#include // HbDialog +#include // HbDeviceDialogInterface +#include // HbWidget +#include // HbWidget + + +/** + * SW Install notification widget class. + */ +class SecUiNotificationDialog : public HbDialog, public HbDeviceDialogInterface +{ + Q_OBJECT + +public: // constructor and destructor + SecUiNotificationDialog(const QVariantMap ¶meters); + virtual ~SecUiNotificationDialog(); + +public: // from HbDeviceDialogInterface + bool setDeviceDialogParameters(const QVariantMap ¶meters); + int deviceDialogError() const; + void closeDeviceDialog(bool byClient); + HbDialog *deviceDialogWidget() const; + +signals: + void deviceDialogClosed(); + void deviceDialogData(const QVariantMap &data); + +protected: // from HbPopup (via HbDialog) + void hideEvent(QHideEvent *event); + void showEvent(QShowEvent *event); + +private: // new functions + bool constructDialog(const QVariantMap ¶meters); + void sendResult(bool accepted); + +private slots: + void handleAccepted(); + void handleCancelled(); + void handleMemorySelectionChanged(const QString &text); + void handleCodeTopChanged(const QString &text); + void saveFocusWidget(QWidget*,QWidget*); + void handlebut1Changed(); + void handlebut2Changed(); + void handlebut3Changed(); + +private: + Q_DISABLE_COPY(SecUiNotificationDialog) + + int mLastError; + bool mShowEventReceived; + QVariantMap mResultMap; + HbLineEdit *codeTop; + HbAction *okAction; + HbAction *cancelAction; + int queryType; +}; + +#endif // SECUINOTIFICATIONDIALOG_H diff -r b75757c81051 -r 318c4eab2439 securitydialogs/secuinotifications/secuinotificationdialogplugin/inc/secuinotificationdialogplugin.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/secuinotifications/secuinotificationdialogplugin/inc/secuinotificationdialogplugin.h Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,53 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: SecUi notification plugin class. +* +*/ + +#ifndef SECUINOTIFICATIONDIALOGPLUGIN_H +#define SECUINOTIFICATIONDIALOGPLUGIN_H + +#include // HbDeviceDialogPlugin + + +/** + * Software install notification plugin. + * Implements the HbDeviceDialogPlugin to show SW install confirmatoin dialogs. + */ +class SecUiNotificationDialogPlugin : public HbDeviceDialogPlugin +{ + Q_OBJECT + +public: + SecUiNotificationDialogPlugin(); + ~SecUiNotificationDialogPlugin(); + +public: // from HbDeviceDialogPlugin + bool accessAllowed(const QString &deviceDialogType, const QVariantMap ¶meters, + const QVariantMap &securityInfo) const; + HbDeviceDialogInterface *createDeviceDialog(const QString &deviceDialogType, + const QVariantMap ¶meters); + bool deviceDialogInfo(const QString &deviceDialogType, const QVariantMap ¶meters, + DeviceDialogInfo *info) const; + QStringList deviceDialogTypes() const; + PluginFlags pluginFlags() const; + int error() const; + +private: + Q_DISABLE_COPY(SecUiNotificationDialogPlugin) + + int mError; +}; + +#endif // SECUINOTIFICATIONDIALOGPLUGIN_H diff -r b75757c81051 -r 318c4eab2439 securitydialogs/secuinotifications/secuinotificationdialogplugin/inc/secuinotificationdialogpluginkeys.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/secuinotifications/secuinotificationdialogplugin/inc/secuinotificationdialogpluginkeys.h Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,46 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* +* Description: SecUi notification keys. +* +*/ + +#ifndef SECUINOTIFICATIONPLUGINKEYS_H +#define SECUINOTIFICATIONPLUGINKEYS_H + +#include + +// Device dialog type +#define SECUINOTIFICATIONDIALOG "com.nokia.secuinotificationdialog/1.0" + +// Keys for the parameters passed to notification framework plugin +const QString KDialogTitle = "title"; +const QString KApplicationName = "application"; +const QString KQueryType = "type"; +const QString KApplicationIcon = "icon"; +const QString KSupplier = "supplier"; +const QString KMemorySelection = "memory"; +const QString KCertificates = "certificates"; +const QString KDrmDetails = "drmDetails"; +const QString KCodeTop = "codeTop"; + +// Keys for the return values passed back to calling application +const QString KResultAccepted = "accepted"; // bool +const QString KSelectedMemoryIndex = "memory"; // int +const QString KCodeTopIndex = "codeTop"; // int + +// Error values +const int KNoError = 0; + +#endif // SECUINOTIFICATIONPLUGINKEYS_H diff -r b75757c81051 -r 318c4eab2439 securitydialogs/secuinotifications/secuinotificationdialogplugin/resources/cert.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/secuinotifications/secuinotificationdialogplugin/resources/cert.svg Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff -r b75757c81051 -r 318c4eab2439 securitydialogs/secuinotifications/secuinotificationdialogplugin/resources/drm.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/secuinotifications/secuinotificationdialogplugin/resources/drm.svg Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff -r b75757c81051 -r 318c4eab2439 securitydialogs/secuinotifications/secuinotificationdialogplugin/resources/qgn_indi_midp_trusted.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/secuinotifications/secuinotificationdialogplugin/resources/qgn_indi_midp_trusted.svg Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff -r b75757c81051 -r 318c4eab2439 securitydialogs/secuinotifications/secuinotificationdialogplugin/resources/qgn_menu_am_midlet.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/secuinotifications/secuinotificationdialogplugin/resources/qgn_menu_am_midlet.svg Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r b75757c81051 -r 318c4eab2439 securitydialogs/secuinotifications/secuinotificationdialogplugin/resources/qgn_menu_am_sis.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/secuinotifications/secuinotificationdialogplugin/resources/qgn_menu_am_sis.svg Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r b75757c81051 -r 318c4eab2439 securitydialogs/secuinotifications/secuinotificationdialogplugin/resources/qgn_menu_am_widget.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/secuinotifications/secuinotificationdialogplugin/resources/qgn_menu_am_widget.svg Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r b75757c81051 -r 318c4eab2439 securitydialogs/secuinotifications/secuinotificationdialogplugin/resources/qgn_prop_drm_rights_valid.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/secuinotifications/secuinotificationdialogplugin/resources/qgn_prop_drm_rights_valid.svg Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff -r b75757c81051 -r 318c4eab2439 securitydialogs/secuinotifications/secuinotificationdialogplugin/rom/secuinotificationdialogplugin.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/secuinotifications/secuinotificationdialogplugin/rom/secuinotificationdialogplugin.iby Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,25 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: ROM image files for SecUi notification dialog plugin. +* +*/ + +#ifndef __SECUINOTIFICATIONDIALOGPLUGIN_IBY__ +#define __SECUINOTIFICATIONDIALOGPLUGIN_IBY__ + +REM DLL +file=ABI_DIR\UREL\secuinotificationdialogplugin.dll SHARED_LIB_DIR\secuinotificationdialogplugin.dll UNPAGED +data=\epoc32\data\z\pluginstub\secuinotificationdialogplugin.qtplugin \resource\plugins\devicedialogs\secuinotificationdialogplugin.qtplugin + +#endif // __SECUINOTIFICATIONDIALOGPLUGIN_IBY__ diff -r b75757c81051 -r 318c4eab2439 securitydialogs/secuinotifications/secuinotificationdialogplugin/secuinotificationdialogplugin.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/secuinotifications/secuinotificationdialogplugin/secuinotificationdialogplugin.pro Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,61 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: SecUi notification dialog plugin project. +# + +TEMPLATE = lib +TARGET = secuinotificationdialogplugin +CONFIG += plugin + +CONFIG += hb + +# directories +INCLUDEPATH += . +DEPENDPATH += . +INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE +INCLUDEPATH += ../../../../inc + +HEADERS += inc/secuinotificationdialogplugin.h \ + inc/secuinotificationdialog.h \ + inc/secuinotificationcontentwidget.h + +SOURCES += src/secuinotificationdialogplugin.cpp \ + src/secuinotificationdialog.cpp \ + src/secuinotificationcontentwidget.cpp + +RESOURCES += secuinotificationdialogplugin.qrc + +symbian: { + TARGET.EPOCALLOWDLLDATA = 1 + TARGET.CAPABILITY = CAP_GENERAL_DLL + TARGET.UID3 = 0x2102432C # TODO: allocate UID + + pluginstub.sources = secuinotificationdialogplugin.dll + pluginstub.path = /resource/plugins/devicedialogs + DEPLOYMENT += pluginstub +} +BLD_INF_RULES.prj_exports += \ + "$${LITERAL_HASH}include " \ + "qmakepluginstubs/secuinotificationdialogplugin.qtplugin /epoc32/data/z/pluginstub/secuinotificationdialogplugin.qtplugin"\ + "rom/secuinotificationdialogplugin.iby CORE_APP_LAYER_IBY_EXPORT_PATH(secuinotificationdialogplugin.iby)" + +LIBS += -lxqservice + +tests { + test.depends = sub-src + test.commands += cd tsrc && $(MAKE) test + autotest.depends = sub-src + autotest.commands += cd tsrc && $(MAKE) autotest + QMAKE_EXTRA_TARGETS += test autotest +} diff -r b75757c81051 -r 318c4eab2439 securitydialogs/secuinotifications/secuinotificationdialogplugin/secuinotificationdialogplugin.qrc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/secuinotifications/secuinotificationdialogplugin/secuinotificationdialogplugin.qrc Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,6 @@ + + + resources/cert.svg + resources/drm.svg + + diff -r b75757c81051 -r 318c4eab2439 securitydialogs/secuinotifications/secuinotificationdialogplugin/src/secuinotificationcontentwidget.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/secuinotifications/secuinotificationdialogplugin/src/secuinotificationcontentwidget.cpp Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,121 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* +* Description: SecUi notification content widget. +* +*/ + +#include "secuinotificationcontentwidget.h" +#include "secuinotificationdialogpluginkeys.h" +#include +#include +#include +#include +#include +#include +#include + + +// ---------------------------------------------------------------------------- +// SecUiNotificationContentWidget::SecUiNotificationContentWidget() +// ---------------------------------------------------------------------------- +// +SecUiNotificationContentWidget::SecUiNotificationContentWidget( + QGraphicsItem *parent, Qt::WindowFlags flags) : HbWidget(parent, flags) +{ + qDebug() << "SecUiNotificationContentWidget::SecUiNotificationContentWidget"; +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationContentWidget::~SecUiNotificationContentWidget() +// ---------------------------------------------------------------------------- +// +SecUiNotificationContentWidget::~SecUiNotificationContentWidget() +{ +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationContentWidget::constructFromParameters() +// ---------------------------------------------------------------------------- +// +void SecUiNotificationContentWidget::constructFromParameters(const QVariantMap ¶meters) +{ + qDebug() << "SecUiNotificationContentWidget::constructFromParameters"; + qDebug() << parameters; + QGraphicsLinearLayout *mainLayout = new QGraphicsLinearLayout(Qt::Vertical); + + // TODO: add another layout for icon + text_block, and yet other for text_block + + // KApplicationIcon + if (1==0 && parameters.contains(KApplicationIcon)) { + qDebug() << "SecUiNotificationContentWidget::KApplicationIcon"; + QString iconName = parameters.value(KApplicationIcon).toString(); + HbLabel *iconLabel = new HbLabel; + iconLabel->setIcon(HbIcon(iconName)); + mainLayout->addItem(iconLabel); + } + + // KApplicationName + KApplicationVersion + if (1==0 && parameters.contains(KApplicationName)) { + qDebug() << "SecUiNotificationContentWidget::KApplicationName"; + QString appName = ""; + QString nameStr = parameters.value(KApplicationName).toString(); + appName = nameStr; + HbLabel *appLabel = new HbLabel(appName); + mainLayout->addItem(appLabel); + } + + // KApplicationSize + if (parameters.contains(KQueryType)) { + qDebug() << "SecUiNotificationContentWidget::KQueryType"; + queryType = parameters.value(KQueryType).toUInt(); + qDebug() << queryType; + } + + // KCodeTop + if (parameters.contains(KCodeTop)) { + qDebug() << "SecUiNotificationContentWidget::KCodeTop 1"; + codeTop = new HbLineEdit(""); // no default value + // HbLineEdit *codeTop2 = new HbLineEdit; + qDebug() << "SecUiNotificationContentWidget::KCodeTop 2"; + HbEditorInterface editorInterface(codeTop); + editorInterface.setUpAsPhoneNumberEditor(); + qDebug() << "SecUiNotificationContentWidget::KCodeTop 3"; + connect(codeTop, SIGNAL(textChanged(const QString &)), this, SIGNAL(codeTopChanged(const QString &))); + mainLayout->addItem(codeTop); + // mainLayout->addItem(codeTop2); + + QGraphicsLinearLayout *mainLayoutButtons = new QGraphicsLinearLayout(Qt::Horizontal); + HbPushButton *but1 = new HbPushButton("1234"); + HbPushButton *but2 = new HbPushButton("+1"); + HbPushButton *but3 = new HbPushButton("+5"); + connect(but1, SIGNAL(clicked()), this, SIGNAL(but1Changed())); + connect(but2, SIGNAL(clicked()), this, SIGNAL(but2Changed())); + connect(but3, SIGNAL(clicked()), this, SIGNAL(but3Changed())); + mainLayoutButtons->addItem(but1); + mainLayoutButtons->addItem(but2); + mainLayoutButtons->addItem(but3); + + mainLayout->addItem(mainLayoutButtons); + + codeTop->setFocus(); + + } + + // KCertificates + // KDrmDetails + + setLayout(mainLayout); + } + diff -r b75757c81051 -r 318c4eab2439 securitydialogs/secuinotifications/secuinotificationdialogplugin/src/secuinotificationdialog.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/secuinotifications/secuinotificationdialogplugin/src/secuinotificationdialog.cpp Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,289 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: SecUi notification plugin class. +* +*/ + +#include "secuinotificationdialog.h" +#include "secuinotificationdialogpluginkeys.h" +#include "secuinotificationcontentwidget.h" +// #include // HbPopupBase::NoTimeout +#include +#include +#include + +#define ESecUiCancelSupported 0x1000000 +#define ESecUiCancelNotSupported 0x0000000 + +#define ESecUiEmergencySupported 0x2000000 +#define ESecUiEmergencyNotSupported 0x0000000 + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialog::SecUiNotificationDialog() +// ---------------------------------------------------------------------------- +// +SecUiNotificationDialog::SecUiNotificationDialog( + const QVariantMap ¶meters) : HbDialog(), mLastError(KNoError) +{ + qDebug() << "SecUiNotificationDialog::SecUiNotificationDialog"; + constructDialog(parameters); +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialog::~SecUiNotificationDialog() +// ---------------------------------------------------------------------------- +// +SecUiNotificationDialog::~SecUiNotificationDialog() +{ +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialog::setDeviceDialogParameters() +// ---------------------------------------------------------------------------- +// +bool SecUiNotificationDialog::setDeviceDialogParameters(const QVariantMap ¶meters) +{ + qDebug() << "SecUiNotificationDialog::setDeviceDialogParameters"; + return constructDialog(parameters); +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialog::deviceDialogError() +// ---------------------------------------------------------------------------- +// +int SecUiNotificationDialog::deviceDialogError() const +{ + qDebug() << "SecUiNotificationDialog::deviceDialogError"; + qDebug() << mLastError; + return mLastError; +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialog::closeDeviceDialog +// ---------------------------------------------------------------------------- +// +void SecUiNotificationDialog::closeDeviceDialog(bool byClient) +{ + Q_UNUSED(byClient); + close(); + qDebug() << "SecUiNotificationDialog::closeDeviceDialog"; + + // If show event has been received, close is signalled from hide event. + // If not, hide event does not come and close is signalled from here. + if (!mShowEventReceived) { + emit deviceDialogClosed(); + } +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialog::deviceDialogWidget +// ---------------------------------------------------------------------------- +// +HbDialog *SecUiNotificationDialog::deviceDialogWidget() const +{ + return const_cast(this); +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialog::hideEvent +// ---------------------------------------------------------------------------- +// +void SecUiNotificationDialog::hideEvent(QHideEvent *event) +{ + qDebug() << "SecUiNotificationDialog::hideEvent"; + HbDialog::hideEvent(event); + emit deviceDialogClosed(); +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialog::showEvent +// ---------------------------------------------------------------------------- +// +void SecUiNotificationDialog::showEvent(QShowEvent *event) +{ + qDebug() << "SecUiNotificationDialog::showEvent"; + HbDialog::showEvent(event); + mShowEventReceived = true; +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialog::constructDialog() +// ---------------------------------------------------------------------------- +// +bool SecUiNotificationDialog::constructDialog(const QVariantMap ¶meters) + { + qDebug() << "SecUiNotificationDialog::constructDialog"; + setTimeout(HbPopup::NoTimeout); + setDismissPolicy(HbPopup::NoDismiss); + setModal(true); + + // Title + if (parameters.contains(KDialogTitle)) { + QString titleText = parameters.value(KDialogTitle).toString(); + HbLabel *title = new HbLabel(titleText); + setHeadingWidget(title); + } + + // Content + SecUiNotificationContentWidget *content = new SecUiNotificationContentWidget(); + content->constructFromParameters(parameters); + setContentWidget(content); + connect(content, SIGNAL(codeTopChanged(const QString &)), this, SLOT(handleCodeTopChanged(const QString &))); + connect(content, SIGNAL(but1Changed()), this, SLOT(handlebut1Changed())); + connect(content, SIGNAL(but2Changed()), this, SLOT(handlebut2Changed())); + connect(content, SIGNAL(but3Changed()), this, SLOT(handlebut3Changed())); + codeTop = content->codeTop; + queryType = content->queryType; + qDebug() << "SecUiNotificationDialog::queryType="; + qDebug() << queryType; + // Buttons + okAction = new HbAction(tr("Ok")); // qtTrId("txt_common_button_ok") + setPrimaryAction(okAction); + connect(okAction, SIGNAL(triggered()), this, SLOT(handleAccepted())); + cancelAction = new HbAction(tr("Cancel")); // qtTrId("txt_common_button_cancel") + connect(cancelAction, SIGNAL(triggered()), this, SLOT(handleCancelled())); + setSecondaryAction(cancelAction); + + qDebug() << "SecUiNotificationDialog check Cancel"; + if (queryType & ESecUiCancelSupported) + { + // nothing to do. Cancel is enabled by default + } + else + { + qDebug() << "disable Cancel"; + cancelAction->setEnabled(false); + } + + return true; +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialog::sendResult() +// ---------------------------------------------------------------------------- +// +void SecUiNotificationDialog::sendResult(bool accepted) +{ + qDebug() << "SecUiNotificationDialog::sendResult 1.2"; + QVariant acceptedValue(accepted); + qDebug() << "SecUiNotificationDialog::sendResult 2"; + mResultMap.insert(KResultAccepted, acceptedValue); + qDebug() << "SecUiNotificationDialog::sendResult 3"; + qDebug() << mResultMap; + emit deviceDialogData(mResultMap); + qDebug() << "SecUiNotificationDialog::sendResult end"; +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialog::handleAccepted() +// ---------------------------------------------------------------------------- +// +void SecUiNotificationDialog::handleAccepted() +{ + qDebug() << "SecUiNotificationDialog::handleAccepted"; + // okAction + QString codeTopText = codeTop->text(); + qDebug() << "codeTopText"; + qDebug() << codeTopText; + if(!codeTopText.compare("1234111")) + { + qDebug() << "codeTopText is 1234111. Not exit"; + return; + } + sendResult(true); +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialog::handleCancelled() +// ---------------------------------------------------------------------------- +// +void SecUiNotificationDialog::handleCancelled() +{ + qDebug() << "SecUiNotificationDialog::handleCancelled"; + sendResult(false); +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialog::handleMemorySelectionChanged() +// ---------------------------------------------------------------------------- +// +void SecUiNotificationDialog::handleMemorySelectionChanged(const QString &text) + { + qDebug() << "SecUiNotificationDialog::handleMemorySelectionChanged"; + qDebug() << text; + QVariant memorySelection(text); + mResultMap.insert(KSelectedMemoryIndex, memorySelection); + //TODO: do we need emit here, or would it be better to send all data at the end? + //emit deviceDialogData(mResultMap); + } + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialog::handleCodeTopChanged() +// ---------------------------------------------------------------------------- +// +void SecUiNotificationDialog::handleCodeTopChanged(const QString &text) + { + qDebug() << "SecUiNotificationDialog::handleCodeTopChanged"; + qDebug() << "SecUiNotificationDialog::handleCodeTopChanged" << text ; + QVariant codeTop(text); + mResultMap.insert(KCodeTopIndex, codeTop); + } +// ---------------------------------------------------------------------------- +// SecUiNotificationDialog::handlebut1Changed() +// ---------------------------------------------------------------------------- +// +void SecUiNotificationDialog::handlebut1Changed() + { + qDebug() << "SecUiNotificationDialog::handlebut1Changed"; + codeTop->setText("1234"); + } +// ---------------------------------------------------------------------------- +// SecUiNotificationDialog::handlebut2Changed() +// ---------------------------------------------------------------------------- +// +void SecUiNotificationDialog::handlebut2Changed() + { + qDebug() << "SecUiNotificationDialog::handlebut2Changed"; + QString codeTopText = codeTop->text(); + qDebug() << "codeTopText"; + qDebug() << codeTopText; + codeTopText = codeTopText + "1" ; + qDebug() << "codeTopText+1"; + qDebug() << codeTopText; + codeTop->setText(codeTopText); + } +// ---------------------------------------------------------------------------- +// SecUiNotificationDialog::handlebut3Changed() +// ---------------------------------------------------------------------------- +// +void SecUiNotificationDialog::handlebut3Changed() + { + qDebug() << "SecUiNotificationDialog::handlebut3Changed"; + QString codeTopText = codeTop->text(); + qDebug() << "codeTopText"; + qDebug() << codeTopText; + codeTopText = codeTopText + "5" ; + qDebug() << "codeTopText+5"; + qDebug() << codeTopText; + codeTop->setText(codeTopText); + } + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialog::saveFocusWidget(QWidget*,QWidget*) +// ---------------------------------------------------------------------------- +// +void SecUiNotificationDialog::saveFocusWidget(QWidget*,QWidget*) +{ + qDebug() << "SecUiNotificationDialog::saveFocusWidget"; +} diff -r b75757c81051 -r 318c4eab2439 securitydialogs/secuinotifications/secuinotificationdialogplugin/src/secuinotificationdialogplugin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/secuinotifications/secuinotificationdialogplugin/src/secuinotificationdialogplugin.cpp Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,137 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: SecUi notification plugin. +* +*/ + +#include "secuinotificationdialogplugin.h" +#include "secuinotificationdialog.h" +#include "secuinotificationdialogpluginkeys.h" + +// This plugin implements one device dialog type +static const struct { + const char *mTypeString; +} dialogInfos[] = { + {SECUINOTIFICATIONDIALOG} +}; + + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialogPlugin::SecUiNotificationDialogPlugin() +// ---------------------------------------------------------------------------- +// +SecUiNotificationDialogPlugin::SecUiNotificationDialogPlugin() : mError(KNoError) +{ +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialogPlugin::~SecUiNotificationDialogPlugin() +// ---------------------------------------------------------------------------- +// +SecUiNotificationDialogPlugin::~SecUiNotificationDialogPlugin() +{ +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialogPlugin::accessAllowed() +// ---------------------------------------------------------------------------- +// +bool SecUiNotificationDialogPlugin::accessAllowed(const QString &deviceDialogType, + const QVariantMap ¶meters, const QVariantMap &securityInfo) const +{ + Q_UNUSED(deviceDialogType) + Q_UNUSED(parameters) + Q_UNUSED(securityInfo) + + // All clients are allowed to use. + // TODO: should access be limited to certain clients? + return true; +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialogPlugin::createDeviceDialog() +// ---------------------------------------------------------------------------- +// +HbDeviceDialogInterface *SecUiNotificationDialogPlugin::createDeviceDialog( + const QString &deviceDialogType, const QVariantMap ¶meters) +{ + // Create device dialog widget + Q_UNUSED(deviceDialogType) + + SecUiNotificationDialog *deviceDialog = new SecUiNotificationDialog(parameters); + mError = deviceDialog->deviceDialogError(); + if (mError != KNoError) { + delete deviceDialog; + deviceDialog = 0; + } + + return deviceDialog; +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialogPlugin::deviceDialogInfo() +// ---------------------------------------------------------------------------- +// +bool SecUiNotificationDialogPlugin::deviceDialogInfo( const QString &deviceDialogType, + const QVariantMap ¶meters, DeviceDialogInfo *info) const +{ + // Return device dialog flags + Q_UNUSED(deviceDialogType); + Q_UNUSED(parameters); + + info->group = DeviceNotificationDialogGroup; + info->flags = NoDeviceDialogFlags; + info->priority = DefaultPriority; + + return true; +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialogPlugin::deviceDialogTypes() +// ---------------------------------------------------------------------------- +// +QStringList SecUiNotificationDialogPlugin::deviceDialogTypes() const +{ + // Return device dialog types this plugin implements + + QStringList types; + const int numTypes = sizeof(dialogInfos) / sizeof(dialogInfos[0]); + for(int i = 0; i < numTypes; ++i) { + types.append(dialogInfos[i].mTypeString); + } + + return types; +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialogPlugin::pluginFlags() +// ---------------------------------------------------------------------------- +// +HbDeviceDialogPlugin::PluginFlags SecUiNotificationDialogPlugin::pluginFlags() const +{ + // Return plugin flags + return NoPluginFlags; +} + +// ---------------------------------------------------------------------------- +// SecUiNotificationDialogPlugin::error() +// ---------------------------------------------------------------------------- +// +int SecUiNotificationDialogPlugin::error() const +{ + // Return last error + return mError; +} + +Q_EXPORT_PLUGIN2(secuinotificationdialogplugin,SecUiNotificationDialogPlugin) diff -r b75757c81051 -r 318c4eab2439 securitydialogs/secuinotifications/secuinotifications.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/secuinotifications/secuinotifications.pro Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,21 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: SecUi notification dialog plugin project. +# + +TEMPLATE = subdirs + +SYMBIAN_PLATFORMS = WINSCW ARMV5 + +SUBDIRS += secuinotificationdialogplugin/secuinotificationdialogplugin.pro diff -r b75757c81051 -r 318c4eab2439 securitydialogs/securitydialogs.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitydialogs/securitydialogs.pro Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,21 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: SecUi notification dialog plugin project. +# + +TEMPLATE = subdirs + +SUBDIRS += secuinotifications/secuinotifications.pro +SUBDIRS += lockclient/lockclient.pro + diff -r b75757c81051 -r 318c4eab2439 securitysrv.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/securitysrv.pro Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,20 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: SecUi notification dialog plugin project. +# + +TEMPLATE = subdirs + +SUBDIRS += securitydialogs/securitydialogs.pro + diff -r b75757c81051 -r 318c4eab2439 securitysrv_info/securitysrv_metadata/securitysrv_metadata.mrp --- a/securitysrv_info/securitysrv_metadata/securitysrv_metadata.mrp Fri Mar 19 09:41:08 2010 +0200 +++ b/securitysrv_info/securitysrv_metadata/securitysrv_metadata.mrp Fri Apr 16 15:53:24 2010 +0300 @@ -1,3 +1,19 @@ +# +# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + component securitysrv_metadata source \sf\mw\securitysrv\securitysrv_info\securitysrv_metadata source \sf\mw\securitysrv\package_definition.xml diff -r b75757c81051 -r 318c4eab2439 sysdef_1_4_0.dtd --- a/sysdef_1_4_0.dtd Fri Mar 19 09:41:08 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r b75757c81051 -r 318c4eab2439 sysdef_1_5_1.dtd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sysdef_1_5_1.dtd Fri Apr 16 15:53:24 2010 +0300 @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r b75757c81051 -r 318c4eab2439 wim/WimSoft/armv5/udeb/wimi.lib Binary file wim/WimSoft/armv5/udeb/wimi.lib has changed diff -r b75757c81051 -r 318c4eab2439 wim/WimSoft/armv5/urel/wimi.lib Binary file wim/WimSoft/armv5/urel/wimi.lib has changed diff -r b75757c81051 -r 318c4eab2439 wim/WimSoft/winscw/udeb/WIMI.LIB Binary file wim/WimSoft/winscw/udeb/WIMI.LIB has changed diff -r b75757c81051 -r 318c4eab2439 wim/WimSoft/winscw/urel/WIMI.LIB Binary file wim/WimSoft/winscw/urel/WIMI.LIB has changed