--- 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 T>
+class CleanupResetAndDestroy
+ {
+public:
+ inline static void PushL(T& aRef);
+private:
+ static void ResetAndDestroy(TAny *aPtr);
+ };
+
+template <class T>
+inline void CleanupResetAndDestroyPushL(T& aRef);
+
+template <class T>
+inline void CleanupResetAndDestroy<T>::PushL(T& aRef)
+ {
+ CleanupStack::PushL(TCleanupItem(&ResetAndDestroy,&aRef));
+ }
+
+template <class T>
+void CleanupResetAndDestroy<T>::ResetAndDestroy(TAny *aPtr)
+ {
+ static_cast<T*>(aPtr)->ResetAndDestroy();
+ }
+
+template <class T>
+inline void CleanupResetAndDestroyPushL(T& aRef)
+ {
+ CleanupResetAndDestroy<T>::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<CX509Certificate> x509CertArray;
+ RPointerArray<CX509Certificate> x509CertArray;
+ CleanupResetAndDestroyPushL( x509CertArray );
+ pushToStack++;
RPointerArray<TCapabilitySet> 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<CX509Certificate> tempCertArray;
- RPointerArray<TCapabilitySet> tempCapaArray;
-
+ RPointerArray<CX509Certificate> tempCertArray;
+ CleanupResetAndDestroyPushL( tempCertArray );
+ pushToStack++;
+ RPointerArray<TCapabilitySet> 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<HBufC> updaterExePaths;
+ CleanupResetAndDestroyPushL( updaterExePaths );
- RPointerArray<HBufC> updaterExePaths;
+ RPointerArray<CSisRegistryPackage> sisPackages;
+ CleanupResetAndDestroyPushL( sisPackages );
Swi::RSisRegistrySession sisRegSession;
@@ -693,8 +731,6 @@
User::LeaveIfError( sisRegSession.Connect() );
CleanupClosePushL( sisRegSession );
-
- RPointerArray<CSisRegistryPackage> 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<HBufC> installedFilesArray;
@@ -838,6 +872,12 @@
RPointerArray<HBufC> 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<TUint64> capaArray;
RPointerArray<HBufC> 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<HBufC8> binaryCertChainArray;
+ CleanupResetAndDestroyPushL( binaryCertChainArray );
+
// Get certificates in binary format.
aEntry.CertificateChainsL( binaryCertChainArray );
@@ -1401,7 +1461,8 @@
TBool retVal = EFalse;
RPointerArray<CX509Certificate> 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;
--- 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
--- 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 <pbe.h>
#include <pbedata.h>
//#include <PathInfo.h> // for system path literals
#include <pkcs5kdf.h>
#include <s32file.h>
#include <s32mem.h>
-#include <imcvcodc.h>
+#include <tconvbase64.h>
#include <DevEncEngineConstants.h>
#include <DevEncEngineBase.h>
@@ -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
--- 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 <flogger.h>
-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<KDebugBufferSize1024> 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<KDebugBufferSize256> 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<KDebugBufferSize1024> 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<KDebugBufferSize256> 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<KDebugBufferSize1024> 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<KDebugBufferSize256> 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<KDebugBufferSize512> logbuf;
- TPtrC8 temp_arg4((TUint8 *)arg4);
-
- if( temp_arg4.Length() > KDebugBufferSize512 - KDebugBufferSize120)
+ TBuf8<KDebugBufferSize512> 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<KDebugBufferSize512> 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<KDebugBufferSize120> buf;
+ TBuf<KDebugBufferSize256> buf;
TRAPD(error , aTime.FormatL( buf, KTimeFormat));
if(error != KErrNone)
return;
RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName,
- EFileLoggingModeAppend,
- buf );
+ EFileLoggingModeAppend,
+ buf );
}
#endif
--- 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
--- 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 <http/rhttpresponse.h>
#include <httperr.h>
#include <httpstringconstants.h>
-#include <imcvcodc.h> //for base64 en/decoding
+#include <tconvbase64.h> //for base64 en/decoding
#include "HTTPFilterGBA.h"
#include "GbaCommon.h"
#include <bautils.h>
@@ -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<KB64KeySize> keyBase64;
- b64coder.Initialise();
b64coder.Encode( iGbaOutputParams.iKNAF, keyBase64 );
RString username = iStringPool.OpenStringL( iGbaOutputParams.iBTID );
CleanupClosePushL<RString>( username );
--- 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
--- 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 <imcvcodc.h> //for base64 en/decoding
+#include <s32stor.h>
+#include <s32file.h>
+#include <tconvbase64.h> //for base64 en/decoding
+
#include <ecom.h>
#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);
--- 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_
--- 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"}
--- 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 @@
<?xml version="1.0"?>
-<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_4_0.dtd" [
+<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_5_1.dtd" [
<!ENTITY layer_real_source_path "sf/mw/securitysrv" >
]>
-<SystemDefinition name="securitysrv" schema="1.4.0">
+<SystemDefinition name="securitysrv" schema="1.5.1">
<systemModel>
<layer name="mw_layer">
<module name="securitysrv">
<unit name="securitysrv" unitID="sedo.securitysrv" bldFile="&layer_real_source_path;/group" mrp="" />
</module>
<module name="">
+ <unit unitID="sedoQT.securitysrv" bldFile="&layer_real_source_path;" mrp="" name="sedoQT_securitysrv" proFile="securitysrv.pro" qmakeArgs="-r" />
+ </module>
+ <module name="">
<unit unitID="sedo.securitysrv.pkiutilities.Certificates" bldFile="&layer_real_source_path;/pkiutilities/Certificates/group" mrp="" filter="sf_build" name="sedo_securitysrv_pkiutilities_Certificates" />
</module>
<module name="">
--- 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 <CTSecDlgs.rsg>
-#include <certmanui.rsg>
+//#include <certmanui.rsg>
#include <aknmessagequerydialog.h>
#include <aknPopupHeadingPane.h>
// ================= 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()
--- 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 <DocumentHandler.h>
#include <apmstd.h>
#include <DigSigningNote.h>
-#include <certmanui.rsg>
+//#include <certmanui.rsg>
#include <X509CertNameParser.h>
#include <x509cert.h>
#include <x500dn.h>
@@ -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<KMaxLengthTextDateString> 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<KMaxLengthTextDateString> 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 );
+*/
}
// ---------------------------------------------------------
--- 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 <avkon.rh>
#include <avkon.loc>
#include <bldvariant.hrh>
-#include <certmanui.loc>
+//#include <certmanui.loc>
#include <certsaver.loc>
#include <wmlbrowser_wim.loc>
--- 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 <avkon.mbg>
#include <avkon.loc>
#include <appinfo.rh>
-#include <certmanui.loc> //qtn_cm_not_valid_yet
+//#include <certmanui.loc> //qtn_cm_not_valid_yet
#include <certsaver.loc>
#include "certsaver.hrh"
Binary file pkiutilities/Certificates_OEM/data/S60_certificates/BeTrusted/BTCTRoot.der has changed
Binary file pkiutilities/Certificates_OEM/data/S60_certificates/BeTrusted/GTECTRoot.der has changed
Binary file pkiutilities/Certificates_OEM/data/S60_certificates/BeTrusted/btctmort.der has changed
Binary file pkiutilities/Certificates_OEM/data/S60_certificates/BeTrusted/gtecybertrustroot.cer has changed
Binary file pkiutilities/Certificates_OEM/data/S60_certificates/GoDaddy/gd-class2-root.der has changed
--- 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 )
--- 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
--- 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 <smsclnt.h> //CSmsClientMtm
#include <txtrich.h>
#include <bautils.h> //file system utilities
-#include <remotelock.rsg>
+#include <RemoteLock.rsg>
#ifdef RD_MULTIPLE_DRIVE
#include <driveinfo.h>
#else
--- 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
--- 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
--- 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
--- 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 <rmmcustomapi.h>
#include <aknnotedialog.h>
+#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 );
--- 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 <ctsydomainpskeys.h>
#include <activeidle2domainpskeys.h>
#include <coreapplicationuisdomainpskeys.h>
-#include <ScreensaverInternalPSKeys.h>
+// #include <ScreensaverInternalPSKeys.h>
#include <hwrmdomainpskeys.h>
#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;
--- 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 &)
--- 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 ; #<VT>#
_ZTV5CWait @ 75 NONAME ; #<VT>#
_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
--- /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 <e32base.h> // CActive
+#include <hb/hbcore/hbsymbiandevicedialog.h> // MHbDeviceDialogObserver
+#include <etelmm.h>
+
+#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
+
--- /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 <SecQueryUidefs.h> // SIF UI device dialog parameters
+#include <hb/hbcore/hbsymbiandevicedialog.h> // CHbDeviceDialog
+#include <hb/hbcore/hbsymbianvariant.h> // CHbSymbianVariantMap
+#include <apgicnfl.h> // 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<TBool>();
+ if( acceptedValue && *acceptedValue )
+ {
+ iReturnValue = KErrNone;
+ }
+ else
+ {
+ iReturnValue = KErrCancel;
+ }
+ }
+ const CHbSymbianVariant* acceptedVariantTop = aData.Get( _L("codeTop") ); // KSecQueryUiQueryAccepted
+ if( acceptedVariantTop )
+ {
+ TPtrC acceptedValueTop = *acceptedVariantTop->Value<TDesC>();
+ 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;
+ }
+
--- 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 <StringLoader.h>
#include <featmgr.h>
+
+#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
--- 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 <featmgr.h>
+
+#include "SecQueryUi.h"
+#include <hb/hbwidgets/hbdevicemessageboxsymbian.h>
+
/*****************************************************
* 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
--- 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 <platform_paths.hrh>
#include <data_caging_paths.hrh>
+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
--- 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
-
+*/
--- 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
--- 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 <settingsinternalcrkeys.h>
-#include <ScreensaverInternalPSKeys.h>
+// #include <ScreensaverInternalPSKeys.h>
#include <hwrmdomainpskeys.h>
#include <activeidle2domainpskeys.h>
//#include <CoreApplicationUIsPrivateCRKeys.h> 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
--- 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 <featmgr.h>
#include <settingsinternalcrkeys.h>
-#include <ScreensaverInternalPSKeys.h>
+// #include <ScreensaverInternalPSKeys.h>
#include <ctsydomainpskeys.h>
#include <activeidle2domainpskeys.h>
@@ -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;
}
}
+ */
}
// ---------------------------------------------------------------------------
--- 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 ; #<TI>#
- _ZTI20CDevicelockAccessApi @ 24 NONAME ; #<TI>#
- _ZTV18CKeyguardAccessApi @ 25 NONAME ; #<VT>#
- _ZTV20CDevicelockAccessApi @ 26 NONAME ; #<VT>#
--- 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
--- 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
--- /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"
+ }
--- /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
--- 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 <e32property.h> // P&S API
#include <e32debug.h>
+#include <QDebug>
+
// ---------------------------------------------------------------------------
// 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 );
--- 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 <apgtask.h> // TApaTask, TApaTaskList
#include <coemain.h> // CCoeEnv
+#include <xqservicerequest.h>
+#include <xqserviceutil.h>
+#include <xqrequestinfo.h>
+#include <QDebug>
// 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;
}
--- /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.h> // HbWidget
+#include <hblineedit.h> // 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
--- /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.h> // HbDialog
+#include <hbdevicedialoginterface.h> // HbDeviceDialogInterface
+#include <hbwidget.h> // HbWidget
+#include <hblineedit.h> // 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
--- /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.h> // 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
--- /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 <QString>
+
+// 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
--- /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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg width="16" height="16" viewBox="0 0 16 16">
+<path fill="#496DA2" d="M10.61,7.411H9.651v0.003l-2.188,8.539c0.62-0.047,1.979-0.227,3.015-0.583 c2.477-0.776,2.543-3.669,2.543-3.669c0.02-0.002,0.021-0.004,0-0.004l0.156-5.019L10.61,7.411z"/>
+<path fill="#A2C2DD" d="M10.492,12.252c0-0.011,0-4.838,0-4.838l-9.94-0.557l0.112,4.63c0.053,1.974,1.425,3.954,2.82,4.091 l3.802,0.377C8.292,15.861,10.354,14.993,10.492,12.252z"/>
+<path fill="#496DA2" d="M6.105,10.902c0.613-0.453,0.605-1.24,0.189-1.717C5.977,8.824,5.549,8.795,5.538,8.794 C5.527,8.793,5.239,8.719,4.781,9.022c-0.417,0.387-0.425,1.172,0.189,1.757L4.619,13.23l1.925,0.193L6.105,10.902z"/>
+<path fill="#235487" d="M5.148,10.779c0,0-0.237-0.098-0.444-0.66C4.526,8.994,5.291,8.857,5.279,8.855 c-0.011,0-0.298-0.075-0.756,0.229c-0.417,0.387-0.425,1.172,0.189,1.756l-0.352,2.452l0.521-0.095L5.148,10.779z"/>
+<polygon fill="#CEE1EF" points="13.177,6.66 3.135,6.063 0.552,6.857 10.789,7.411 "/>
+<path fill="#496DA2" d="M5.071,6.567c0-0.49-0.192-1.703,0.785-1.989c1.624-0.475,2.268,0.99,2.268,2.262 c0,0.491,2.336,0.379,2.309-0.17c-0.027-0.548-0.279-3.594-2.84-4.136C2.985,2.016,2.76,6.01,2.906,6.567 C3.033,7.049,5.071,6.878,5.071,6.567z"/>
+</svg>
\ No newline at end of file
--- /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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg width="16" height="16" viewBox="0 0 16 16">
+<polygon fill="#496DA2" points="8.54,8.603 9.474,8.046 9.328,12.963 8.437,13.543 "/>
+<path d="M8.468,4.789c-0.211,0.13-0.471,0.293-0.748,0.456C7.185,5.456,6.111,4.399,6.745,3.57 c0.293-0.195,0.504-0.309,0.764-0.471C7.07,3.488,7.233,4.854,8.468,4.789z" fill="#496DA2"/>
+<polygon fill="#496DA2" points="8.421,13.559 9.344,12.932 8.688,13.822 7.864,14.373 "/>
+<polygon fill="#496DA2" points="9.633,3.526 11.02,2.778 10.893,8.346 9.75,9.016 "/>
+<polygon fill="#CEE1EF" points="6.083,1.627 4.965,2.088 9.759,3.463 11.035,2.778 "/>
+<path d="M9.805,3.457L4.982,2.084l0.206,5.465l1.32,0.422l0.235,0.757l0.285,0.453l0.835,5.191l0.573-0.83 l0.157-4.906l1.173,0.375L9.805,3.457z M7.166,3.438C7.218,3.44,7.271,3.45,7.326,3.467c0.411,0.129,0.75,0.622,0.76,1.099 c0.01,0.429-0.231,0.695-0.563,0.68C7.472,5.243,7.419,5.234,7.365,5.219C6.963,5.09,6.615,4.597,6.604,4.111 C6.595,3.699,6.84,3.423,7.166,3.438z" fill="#A2C2DD"/>
+<polygon fill="#496DA2" points="6.771,9.591 7.037,9.173 7.75,9.391 7.861,14.361 7.45,14.229 6.847,13.038 6.819,11.782 7.244,11.326 6.793,10.572 "/>
+</svg>
\ No newline at end of file
--- /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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg width="16" height="16" viewBox="0 0 16 16">
+<path fill="#496DA2" d="M10.61,7.411H9.651v0.003l-2.188,8.539c0.62-0.047,1.979-0.227,3.015-0.583 c2.477-0.776,2.543-3.669,2.543-3.669c0.02-0.002,0.021-0.004,0-0.004l0.156-5.019L10.61,7.411z"/>
+<path fill="#A2C2DD" d="M10.492,12.252c0-0.011,0-4.838,0-4.838l-9.94-0.557l0.112,4.63c0.053,1.974,1.425,3.954,2.82,4.091 l3.802,0.377C8.292,15.861,10.354,14.993,10.492,12.252z"/>
+<path fill="#496DA2" d="M6.105,10.902c0.613-0.453,0.605-1.24,0.189-1.717C5.977,8.824,5.549,8.795,5.538,8.794 C5.527,8.793,5.239,8.719,4.781,9.022c-0.417,0.387-0.425,1.172,0.189,1.757L4.619,13.23l1.925,0.193L6.105,10.902z"/>
+<path fill="#235487" d="M5.148,10.779c0,0-0.237-0.098-0.444-0.66C4.526,8.994,5.291,8.857,5.279,8.855 c-0.011,0-0.298-0.075-0.756,0.229c-0.417,0.387-0.425,1.172,0.189,1.756l-0.352,2.452l0.521-0.095L5.148,10.779z"/>
+<polygon fill="#CEE1EF" points="13.177,6.66 3.135,6.063 0.552,6.857 10.789,7.411 "/>
+<path fill="#496DA2" d="M5.071,6.567c0-0.49-0.192-1.703,0.785-1.989c1.624-0.475,2.268,0.99,2.268,2.262 c0,0.491,2.336,0.379,2.309-0.17c-0.027-0.548-0.279-3.594-2.84-4.136C2.985,2.016,2.76,6.01,2.906,6.567 C3.033,7.049,5.071,6.878,5.071,6.567z"/>
+</svg>
\ No newline at end of file
--- /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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg width="100%" height="100%" viewBox="0 0 88 88">
+<linearGradient id="_12" gradientUnits="userSpaceOnUse" x1="44.68" y1="44.13" x2="62.99" y2="80.2">
+<stop stop-color="#A2C2DD" offset="0.1"/>
+<stop stop-color="#6C83BB" offset="0.71"/>
+<stop stop-color="#003D6D" offset="0.99"/>
+</linearGradient>
+<path fill="url(#_12)" d="M14.475,14.003c0,0,0.809,11.089,0.952,13.061c-5.274-2.117-12.123,2.153-12.088,8.081 c0.032,5.237,6.587,11.975,13.074,9.778l0.983,16.064l19.536,6.212l3.87-3.304c-1.391-1.28-4.237-6.712-0.913-10.679 c1.636,0.074,3.803,1.019,5.318,3.341c-0.755,0.446-2.435,1.438-2.435,1.438l1.769,18.358l15.22,5.217L70.69,74.02 c0,0,0.713-11.908,0.78-13.026c6.92-0.28,10.947-6.543,10.947-11.571c0-6.004-4.893-12.288-12.286-12.695 c0.042-1.229,0.537-15.648,0.537-15.648l-23.381-4.272l-4.885,3.214c3.509,4.846,3.525,10.268,1.019,13.249 c-3.51,2.305-11.719-5.695-4.459-17.366l-20.704-3.978L14.475,14.003z"/>
+<linearGradient id="_13" gradientUnits="userSpaceOnUse" x1="48.4" y1="45.14" x2="26.4" y2="15.64">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="0.35"/>
+<stop stop-color="#6C83BB" offset="0.7"/>
+<stop stop-color="#003D6D" offset="1"/>
+</linearGradient>
+<path fill="url(#_13)" d="M24.994,28.365l8.648-9.673l4.228-2.288c-6.905,12.095,2.267,20.532,6.18,17.29 c-0.206,0.233-1.306,5.171-1.306,5.171L24.994,28.365z"/>
+<linearGradient id="_14" gradientUnits="userSpaceOnUse" x1="49.78" y1="73.59" x2="33.78" y2="54.09">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="0.35"/>
+<stop stop-color="#6C83BB" offset="0.7"/>
+<stop stop-color="#003D6D" offset="1"/>
+</linearGradient>
+<path fill="url(#_14)" d="M39.571,52.482c-3.281,3.521-1.765,8.89,0.253,11.328l-3.05,2.604L20.548,42.523L39.571,52.482z "/>
+<linearGradient id="_15" gradientUnits="userSpaceOnUse" x1="66.5" y1="18.51" x2="66.79" y2="46.9">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="0.35"/>
+<stop stop-color="#6C83BB" offset="0.7"/>
+<stop stop-color="#003D6D" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_15)" points="63.325,42.008 63.278,24.622 69.948,21.658 69.371,38.502 "/>
+<linearGradient id="_16" gradientUnits="userSpaceOnUse" x1="25.65" y1="17.91" x2="27.75" y2="12.21">
+<stop stop-color="#FFFFFF" offset="0.05"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_16)" points="15.205,14.4 18.376,12.659 37.964,16.356 33.643,18.692 "/>
+<linearGradient id="_17" gradientUnits="userSpaceOnUse" x1="55.45" y1="24.23" x2="58.18" y2="16.83">
+<stop stop-color="#FFFFFF" offset="0.05"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_17)" points="43.376,20.218 47.438,17.545 69.948,21.658 63.807,24.622 "/>
+<linearGradient id="_18" gradientUnits="userSpaceOnUse" x1="9.41" y1="29.03" x2="15.24" y2="32.03">
+<stop stop-color="#FFFFFF" offset="0.05"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<path fill="url(#_18)" d="M5.168,31.243c3.055-4.432,8.436-4.929,11.075-3.032l0.301,3.842L5.168,31.243z"/>
+<linearGradient id="_19" gradientUnits="userSpaceOnUse" x1="66" y1="32.31" x2="81.16" y2="58.31">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="0.35"/>
+<stop stop-color="#6C83BB" offset="0.7"/>
+<stop stop-color="#003D6D" offset="1"/>
+</linearGradient>
+<path fill="url(#_19)" d="M63.479,40.737l5.963-3.383c7.639-1.027,18.434,11.723,8.048,20.789L63.479,40.737z"/>
+<linearGradient id="_20" gradientUnits="userSpaceOnUse" x1="53.27" y1="11.98" x2="36.67" y2="58.23">
+<stop stop-color="#FFFFFF" offset="0.05"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<path fill="url(#_20)" d="M63.543,40.685c7.758-3.933,16.752,4.756,16.232,11.543c-0.824,10.789-12.64,9.004-16.388,5.077 L45.833,69.03c4.174-3.883,1.91-14.799-4.674-16.367c-6.584-1.569-9.549,7.171-4.385,13.751l-18.709-5.948l-1.01-16.502 c-6.7,3.158-12.989-4.322-13.017-8.823c-0.04-6.581,7.252-8.843,12.437-3.323L15.205,14.4l18.438,4.292 c-4.241,6.53,0.437,15.692,5.636,16.821c5.2,1.128,9.505-7.159,4.098-15.296l20.431,4.404L63.543,40.685z"/>
+<polygon fill="#58A015" points="59.654,80.794 45.195,75.838 43.51,58.344 60.175,62.587 "/>
+<polygon fill="#17594C" points="59.654,80.794 70.012,73.638 71.094,55.58 59.654,62.587 "/>
+<linearGradient id="_21" gradientUnits="userSpaceOnUse" x1="43.41" y1="57.36" x2="71.04" y2="57.36">
+<stop stop-color="#DCE8E4" offset="0"/>
+<stop stop-color="#43910A" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_21)" points="43.408,58.344 59.654,62.587 71.042,55.58 54.517,52.14 "/>
+<linearGradient id="_22" gradientUnits="userSpaceOnUse" x1="41.47" y1="83.72" x2="60.49" y2="73.75">
+<stop stop-color="#DCE8E4" offset="0"/>
+<stop stop-color="#43910A" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_22)" points="58.806,67.904 59.629,80.923 45.193,75.631 "/>
+<rect fill="none" height="88" width="88"/>
+</svg>
\ No newline at end of file
--- /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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg width="100%" height="100%" viewBox="0 0 88 88">
+<linearGradient id="_12" gradientUnits="userSpaceOnUse" x1="44.68" y1="44.13" x2="62.99" y2="80.2">
+<stop stop-color="#A2C2DD" offset="0.1"/>
+<stop stop-color="#6C83BB" offset="0.71"/>
+<stop stop-color="#003D6D" offset="0.99"/>
+</linearGradient>
+<path fill="url(#_12)" d="M14.475,14.003c0,0,0.809,11.089,0.952,13.061c-5.274-2.117-12.123,2.153-12.088,8.081 c0.032,5.237,6.587,11.975,13.074,9.778l0.983,16.064l19.536,6.212l3.87-3.304c-1.391-1.28-4.237-6.712-0.913-10.679 c1.636,0.074,3.803,1.019,5.318,3.341c-0.755,0.446-2.435,1.438-2.435,1.438l1.769,18.358l15.22,5.217L70.69,74.02 c0,0,0.713-11.908,0.78-13.026c6.92-0.28,10.947-6.543,10.947-11.571c0-6.004-4.893-12.288-12.286-12.695 c0.042-1.229,0.537-15.648,0.537-15.648l-23.381-4.272l-4.885,3.214c3.509,4.846,3.525,10.268,1.019,13.249 c-3.51,2.305-11.719-5.695-4.459-17.366l-20.704-3.978L14.475,14.003z"/>
+<linearGradient id="_13" gradientUnits="userSpaceOnUse" x1="48.4" y1="45.14" x2="26.4" y2="15.64">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="0.35"/>
+<stop stop-color="#6C83BB" offset="0.7"/>
+<stop stop-color="#003D6D" offset="1"/>
+</linearGradient>
+<path fill="url(#_13)" d="M24.994,28.365l8.648-9.673l4.228-2.288c-6.905,12.095,2.267,20.532,6.18,17.29 c-0.206,0.233-1.306,5.171-1.306,5.171L24.994,28.365z"/>
+<linearGradient id="_14" gradientUnits="userSpaceOnUse" x1="49.78" y1="73.59" x2="33.78" y2="54.09">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="0.35"/>
+<stop stop-color="#6C83BB" offset="0.7"/>
+<stop stop-color="#003D6D" offset="1"/>
+</linearGradient>
+<path fill="url(#_14)" d="M39.571,52.482c-3.281,3.521-1.765,8.89,0.253,11.328l-3.05,2.604L20.548,42.523L39.571,52.482z "/>
+<linearGradient id="_15" gradientUnits="userSpaceOnUse" x1="66.5" y1="18.51" x2="66.79" y2="46.9">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="0.35"/>
+<stop stop-color="#6C83BB" offset="0.7"/>
+<stop stop-color="#003D6D" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_15)" points="63.325,42.008 63.278,24.622 69.948,21.658 69.371,38.502 "/>
+<linearGradient id="_16" gradientUnits="userSpaceOnUse" x1="25.65" y1="17.91" x2="27.75" y2="12.21">
+<stop stop-color="#FFFFFF" offset="0.05"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_16)" points="15.205,14.4 18.376,12.659 37.964,16.356 33.643,18.692 "/>
+<linearGradient id="_17" gradientUnits="userSpaceOnUse" x1="55.45" y1="24.23" x2="58.18" y2="16.83">
+<stop stop-color="#FFFFFF" offset="0.05"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_17)" points="43.376,20.218 47.438,17.545 69.948,21.658 63.807,24.622 "/>
+<linearGradient id="_18" gradientUnits="userSpaceOnUse" x1="9.41" y1="29.03" x2="15.24" y2="32.03">
+<stop stop-color="#FFFFFF" offset="0.05"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<path fill="url(#_18)" d="M5.168,31.243c3.055-4.432,8.436-4.929,11.075-3.032l0.301,3.842L5.168,31.243z"/>
+<linearGradient id="_19" gradientUnits="userSpaceOnUse" x1="66" y1="32.31" x2="81.16" y2="58.31">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="0.35"/>
+<stop stop-color="#6C83BB" offset="0.7"/>
+<stop stop-color="#003D6D" offset="1"/>
+</linearGradient>
+<path fill="url(#_19)" d="M63.479,40.737l5.963-3.383c7.639-1.027,18.434,11.723,8.048,20.789L63.479,40.737z"/>
+<linearGradient id="_20" gradientUnits="userSpaceOnUse" x1="53.27" y1="11.98" x2="36.67" y2="58.23">
+<stop stop-color="#FFFFFF" offset="0.05"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<path fill="url(#_20)" d="M63.543,40.685c7.758-3.933,16.752,4.756,16.232,11.543c-0.824,10.789-12.64,9.004-16.388,5.077 L45.833,69.03c4.174-3.883,1.91-14.799-4.674-16.367c-6.584-1.569-9.549,7.171-4.385,13.751l-18.709-5.948l-1.01-16.502 c-6.7,3.158-12.989-4.322-13.017-8.823c-0.04-6.581,7.252-8.843,12.437-3.323L15.205,14.4l18.438,4.292 c-4.241,6.53,0.437,15.692,5.636,16.821c5.2,1.128,9.505-7.159,4.098-15.296l20.431,4.404L63.543,40.685z"/>
+<polygon fill="#A15EB6" points="59.654,80.794 45.195,75.838 43.51,58.344 60.175,62.587 "/>
+<polygon fill="#5E1B67" points="59.654,80.794 70.012,73.638 71.094,55.58 59.654,62.587 "/>
+<linearGradient id="_21" gradientUnits="userSpaceOnUse" x1="43.41" y1="57.36" x2="71.04" y2="57.36">
+<stop stop-color="#DEDEED" offset="0"/>
+<stop stop-color="#9646AC" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_21)" points="43.408,58.344 59.654,62.587 71.042,55.58 54.517,52.14 "/>
+<linearGradient id="_22" gradientUnits="userSpaceOnUse" x1="32.16" y1="82.01" x2="58.74" y2="74.55">
+<stop stop-color="#DEDEED" offset="0"/>
+<stop stop-color="#9646AC" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_22)" points="58.806,67.904 59.629,80.923 45.193,75.631 "/>
+<rect fill="none" height="88" width="88"/>
+</svg>
\ No newline at end of file
--- /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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg width="100" height="100" viewBox="91.792 -149.167 100 100">
+<linearGradient id="_12" gradientUnits="userSpaceOnUse" x1="128.6" y1="-127.68" x2="193.93" y2="-15.69">
+<stop stop-color="#A2C2DD" offset="0.1"/>
+<stop stop-color="#6C83BB" offset="0.71"/>
+<stop stop-color="#003D6D" offset="0.99"/>
+</linearGradient>
+<path d="M135.493-120.781c-0.478-0.18-12.771-4.823-12.771-4.823l-26.878,13.277 c0,0,12.594,6.267,13.282,6.609c-0.438,0.637-9.085,13.257-9.085,13.257s10.833,3.342,11.251,3.471 c0.057,0.44,2.233,17.397,2.233,17.397l34.702,11.894l24.876-17.188c0,0,1.103-17.331,1.122-17.65 c0.257-0.192,15.861-11.912,15.861-11.912s-14.446-5.944-15.053-6.194c0.227-0.605,4.3-11.491,4.3-11.491l-36.559-7.074 C142.775-131.206,135.776-121.187,135.493-120.781z" fill="url(#_12)"/>
+<linearGradient id="_13" gradientUnits="userSpaceOnUse" x1="145.21" y1="-145.16" x2="190.71" y2="-57.16">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_13)" points="178.584,-123.833 143.017,-130.716 135.73,-120.284 174.184,-112.071 "/>
+<linearGradient id="_14" gradientUnits="userSpaceOnUse" x1="140.41" y1="-128.26" x2="143.41" y2="-95.26">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#E0EAF3" offset="0.11"/>
+<stop stop-color="#A2C2DD" offset="0.35"/>
+<stop stop-color="#8CA9CF" offset="0.48"/>
+<stop stop-color="#6C83BB" offset="0.7"/>
+<stop stop-color="#637DB5" offset="0.75"/>
+<stop stop-color="#4C6EA4" offset="0.82"/>
+<stop stop-color="#265689" offset="0.91"/>
+<stop stop-color="#003D6D" offset="0.99"/>
+</linearGradient>
+<polygon fill="url(#_14)" points="109.686,-105.792 147.872,-95.819 174.638,-112.288 135.797,-120.374 "/>
+<linearGradient id="_15" gradientUnits="userSpaceOnUse" x1="107.3" y1="-131.49" x2="135.97" y2="-96.82">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#E0EAF3" offset="0.11"/>
+<stop stop-color="#A2C2DD" offset="0.35"/>
+<stop stop-color="#8CA9CF" offset="0.48"/>
+<stop stop-color="#6C83BB" offset="0.7"/>
+<stop stop-color="#637DB5" offset="0.75"/>
+<stop stop-color="#4C6EA4" offset="0.82"/>
+<stop stop-color="#265689" offset="0.91"/>
+<stop stop-color="#003D6D" offset="0.99"/>
+</linearGradient>
+<polygon fill="url(#_15)" points="135.572,-120.108 135.572,-98.88 109.721,-105.749 "/>
+<linearGradient id="_16" gradientUnits="userSpaceOnUse" x1="108.62" y1="-137.93" x2="134.12" y2="-68.43">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_16)" points="97.182,-112.409 110.625,-105.72 135.882,-120.319 123.023,-125.175 "/>
+<polygon fill="#58A015" points="132.854,-86.221 116.422,-91.854 114.508,-111.732 133.445,-106.912 "/>
+<polygon fill="#17594C" points="132.854,-86.221 144.623,-94.354 145.854,-114.873 132.854,-106.912 "/>
+<linearGradient id="_17" gradientUnits="userSpaceOnUse" x1="105.33" y1="-103.01" x2="158.66" y2="-124.34">
+<stop stop-color="#DCE8E4" offset="0"/>
+<stop stop-color="#43910A" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_17)" points="114.392,-111.732 132.854,-106.912 145.794,-114.873 127.016,-118.783 "/>
+<polygon fill="#A15EB6" points="155.074,-85.857 138.643,-91.488 137.395,-111.286 155.666,-106.549 "/>
+<polygon fill="#5E1B67" points="155.074,-85.857 166.844,-93.988 168.074,-114.51 155.074,-106.549 "/>
+<linearGradient id="_18" gradientUnits="userSpaceOnUse" x1="118.58" y1="-107.01" x2="179.92" y2="-117.01">
+<stop stop-color="#DEDEED" offset="0"/>
+<stop stop-color="#9646AC" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_18)" points="137.278,-111.286 155.074,-106.549 168.015,-114.51 149.236,-118.42 "/>
+<linearGradient id="_19" gradientUnits="userSpaceOnUse" x1="151.58" y1="-107.35" x2="177.08" y2="-53.6">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#E0EAF3" offset="0.11"/>
+<stop stop-color="#A2C2DD" offset="0.35"/>
+<stop stop-color="#8CA9CF" offset="0.48"/>
+<stop stop-color="#6C83BB" offset="0.7"/>
+<stop stop-color="#637DB5" offset="0.75"/>
+<stop stop-color="#4C6EA4" offset="0.82"/>
+<stop stop-color="#265689" offset="0.91"/>
+<stop stop-color="#003D6D" offset="0.99"/>
+</linearGradient>
+<polygon fill="url(#_19)" points="148.205,-60.69 172.549,-77.511 174.761,-112.288 147.872,-95.819 "/>
+<linearGradient id="_20" gradientUnits="userSpaceOnUse" x1="97.82" y1="-111.74" x2="158.07" y2="-62.49">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_20)" points="148.205,-60.69 114.219,-72.339 109.926,-105.792 149.096,-95.819 "/>
+<polygon fill="#7899BA" points="147.278,-95.021 161.751,-81.749 173.334,-89.417 174.08,-111.786 "/>
+<linearGradient id="_21" gradientUnits="userSpaceOnUse" x1="149.14" y1="-126.92" x2="193.64" y2="-66.92">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_21)" points="147.528,-95.771 164.385,-88.013 189.001,-106.5 174.33,-112.536 "/>
+<polygon fill="#7899BA" points="147.848,-94.663 110.006,-104.687 112.667,-85.292 144.501,-75.499 "/>
+<linearGradient id="_22" gradientUnits="userSpaceOnUse" x1="123.4" y1="-111.76" x2="128.9" y2="-39.76">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_22)" points="148.328,-96.028 109.886,-105.927 101.106,-92.935 141.801,-80.379 "/>
+<rect fill="none" height="100" width="100" x="91.792" y="-149.167"/>
+</svg>
\ No newline at end of file
--- /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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg width="16" height="16" viewBox="0 0 16 16">
+<polygon fill="#496DA2" points="8.54,8.603 9.474,8.046 9.328,12.963 8.437,13.543 "/>
+<path d="M8.468,4.789c-0.211,0.13-0.471,0.293-0.748,0.456C7.185,5.456,6.111,4.399,6.745,3.57 c0.293-0.195,0.504-0.309,0.764-0.471C7.07,3.488,7.233,4.854,8.468,4.789z" fill="#496DA2"/>
+<polygon fill="#496DA2" points="8.421,13.559 9.344,12.932 8.688,13.822 7.864,14.373 "/>
+<polygon fill="#496DA2" points="9.633,3.526 11.02,2.778 10.893,8.346 9.75,9.016 "/>
+<polygon fill="#CEE1EF" points="6.083,1.627 4.965,2.088 9.759,3.463 11.035,2.778 "/>
+<path d="M9.805,3.457L4.982,2.084l0.206,5.465l1.32,0.422l0.235,0.757l0.285,0.453l0.835,5.191l0.573-0.83 l0.157-4.906l1.173,0.375L9.805,3.457z M7.166,3.438C7.218,3.44,7.271,3.45,7.326,3.467c0.411,0.129,0.75,0.622,0.76,1.099 c0.01,0.429-0.231,0.695-0.563,0.68C7.472,5.243,7.419,5.234,7.365,5.219C6.963,5.09,6.615,4.597,6.604,4.111 C6.595,3.699,6.84,3.423,7.166,3.438z" fill="#A2C2DD"/>
+<polygon fill="#496DA2" points="6.771,9.591 7.037,9.173 7.75,9.391 7.861,14.361 7.45,14.229 6.847,13.038 6.819,11.782 7.244,11.326 6.793,10.572 "/>
+</svg>
\ No newline at end of file
--- /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__
--- /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 <platform_paths.hrh>" \
+ "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
+}
--- /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 @@
+<RCC>
+ <qresource prefix="/" >
+ <file alias="cert.svg" >resources/cert.svg</file>
+ <file alias="drm.svg" >resources/drm.svg</file>
+ </qresource>
+</RCC>
--- /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 <QGraphicsLinearLayout>
+#include <hblabel.h>
+#include <hbpushbutton.h>
+#include <hbcombobox.h>
+#include <hblineedit.h>
+#include <hbinputeditorinterface.h>
+#include <QDebug>
+
+
+// ----------------------------------------------------------------------------
+// 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);
+ }
+
--- /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.h> // HbPopupBase::NoTimeout
+#include <hblabel.h>
+#include <hbaction.h>
+#include <QDebug>
+
+#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<SecUiNotificationDialog*>(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";
+}
--- /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)
--- /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
--- /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
+
--- /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
+
--- 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
--- 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 @@
- <!ELEMENT SystemDefinition (systemModel?, build?)>
- <!ATTLIST SystemDefinition
- name CDATA #REQUIRED
- schema CDATA #REQUIRED>
- <!ELEMENT systemModel (layer+)>
- <!ELEMENT layer (logicalset* | module*)*>
- <!ATTLIST layer
- name CDATA #REQUIRED
- levels CDATA #IMPLIED
- span CDATA #IMPLIED>
- <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
- <!ATTLIST logicalset name CDATA #REQUIRED>
- <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
- <!ATTLIST logicalsubset name CDATA #REQUIRED>
- <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
- <!ATTLIST module
- name CDATA #REQUIRED
- level CDATA #IMPLIED>
- <!ELEMENT component (unit* | package* | prebuilt*)*>
- <!ATTLIST component name CDATA #REQUIRED>
- <!ELEMENT unit EMPTY>
- <!ATTLIST unit
- unitID ID #REQUIRED
- name CDATA #REQUIRED
- mrp CDATA #REQUIRED
- filter CDATA #IMPLIED
- bldFile CDATA #REQUIRED
- priority CDATA #IMPLIED
- contract CDATA #IMPLIED>
- <!ELEMENT package EMPTY>
- <!ATTLIST package
- name CDATA #REQUIRED
- mrp CDATA #REQUIRED
- filter CDATA #IMPLIED
- contract CDATA #IMPLIED>
- <!ELEMENT prebuilt EMPTY>
- <!ATTLIST prebuilt
- name CDATA #REQUIRED
- version CDATA #REQUIRED
- late (Y|N) #IMPLIED
- filter CDATA #IMPLIED
- contract CDATA #IMPLIED>
- <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
- <!ELEMENT unitList (unitRef+)>
- <!ATTLIST unitList
- name ID #REQUIRED
- description CDATA #REQUIRED>
- <!ELEMENT unitRef EMPTY>
- <!ATTLIST unitRef unit IDREF #REQUIRED>
- <!ELEMENT targetList EMPTY>
- <!ATTLIST targetList
- name ID #REQUIRED
- description CDATA #REQUIRED
- target IDREFS #REQUIRED>
- <!ELEMENT target EMPTY>
- <!ATTLIST target
- name ID #REQUIRED
- abldTarget CDATA #REQUIRED
- description CDATA #REQUIRED>
- <!ELEMENT option EMPTY>
- <!ATTLIST option
- name ID #REQUIRED
- abldOption CDATA #REQUIRED
- description CDATA #REQUIRED
- enable (Y | N | y | n) #REQUIRED>
- <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
- <!ATTLIST configuration
- name ID #REQUIRED
- description CDATA #REQUIRED
- filter CDATA #REQUIRED>
- <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
- <!ELEMENT unitListRef EMPTY>
- <!ATTLIST unitListRef unitList IDREF #REQUIRED>
- <!ELEMENT layerRef EMPTY>
- <!ATTLIST layerRef layerName CDATA #REQUIRED>
- <!ELEMENT buildLayer EMPTY>
- <!ATTLIST buildLayer
- command CDATA #REQUIRED
- targetList IDREFS #IMPLIED
- unitParallel (Y | N | y | n) #REQUIRED
- targetParallel (Y | N | y | n) #IMPLIED>
- <!ELEMENT specialInstructions EMPTY>
- <!ATTLIST specialInstructions
- name CDATA #REQUIRED
- cwd CDATA #REQUIRED
- command CDATA #REQUIRED>
--- /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 @@
+ <!ELEMENT SystemDefinition (systemModel?, build?)>
+ <!ATTLIST SystemDefinition
+ name CDATA #REQUIRED
+ schema CDATA #REQUIRED>
+ <!ELEMENT systemModel (layer+)>
+ <!ELEMENT layer (logicalset* | module*)*>
+ <!ATTLIST layer
+ name CDATA #REQUIRED
+ levels CDATA #IMPLIED
+ span CDATA #IMPLIED>
+ <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalset name CDATA #REQUIRED>
+ <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalsubset name CDATA #REQUIRED>
+ <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
+ <!ATTLIST module
+ name CDATA #REQUIRED
+ level CDATA #IMPLIED>
+ <!ELEMENT component (unit* | package* | prebuilt*)*>
+ <!ATTLIST component name CDATA #REQUIRED>
+ <!ELEMENT unit EMPTY>
+ <!ATTLIST unit
+ unitID ID #REQUIRED
+ name CDATA #REQUIRED
+ mrp CDATA #REQUIRED
+ filter CDATA #IMPLIED
+ bldFile CDATA #REQUIRED
+ priority CDATA #IMPLIED
+ contract CDATA #IMPLIED
+ proFile CDATA #IMPLIED
+ qmakeArgs CDATA #IMPLIED>
+ <!ELEMENT package EMPTY>
+ <!ATTLIST package
+ name CDATA #REQUIRED
+ mrp CDATA #REQUIRED
+ filter CDATA #IMPLIED
+ contract CDATA #IMPLIED>
+ <!ELEMENT prebuilt EMPTY>
+ <!ATTLIST prebuilt
+ name CDATA #REQUIRED
+ version CDATA #REQUIRED
+ late (Y|N) #IMPLIED
+ filter CDATA #IMPLIED
+ contract CDATA #IMPLIED>
+ <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
+ <!ELEMENT unitList (unitRef+)>
+ <!ATTLIST unitList
+ name ID #REQUIRED
+ description CDATA #REQUIRED>
+ <!ELEMENT unitRef EMPTY>
+ <!ATTLIST unitRef unit IDREF #REQUIRED>
+ <!ELEMENT targetList EMPTY>
+ <!ATTLIST targetList
+ name ID #REQUIRED
+ description CDATA #REQUIRED
+ target IDREFS #REQUIRED>
+ <!ELEMENT target EMPTY>
+ <!ATTLIST target
+ name ID #REQUIRED
+ abldTarget CDATA #REQUIRED
+ description CDATA #REQUIRED>
+ <!ELEMENT option EMPTY>
+ <!ATTLIST option
+ name ID #REQUIRED
+ abldOption CDATA #REQUIRED
+ description CDATA #REQUIRED
+ enable (Y | N | y | n) #REQUIRED>
+ <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
+ <!ATTLIST configuration
+ name ID #REQUIRED
+ description CDATA #REQUIRED
+ filter CDATA #REQUIRED>
+ <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
+ <!ELEMENT unitListRef EMPTY>
+ <!ATTLIST unitListRef unitList IDREF #REQUIRED>
+ <!ELEMENT layerRef EMPTY>
+ <!ATTLIST layerRef layerName CDATA #REQUIRED>
+ <!ELEMENT buildLayer EMPTY>
+ <!ATTLIST buildLayer
+ command CDATA #REQUIRED
+ targetList IDREFS #IMPLIED
+ unitParallel (Y | N | y | n) #REQUIRED
+ targetParallel (Y | N | y | n) #IMPLIED>
+ <!ELEMENT specialInstructions EMPTY>
+ <!ATTLIST specialInstructions
+ name CDATA #REQUIRED
+ cwd CDATA #REQUIRED
+ command CDATA #REQUIRED>
Binary file wim/WimSoft/armv5/udeb/wimi.lib has changed
Binary file wim/WimSoft/armv5/urel/wimi.lib has changed
Binary file wim/WimSoft/winscw/udeb/WIMI.LIB has changed
Binary file wim/WimSoft/winscw/urel/WIMI.LIB has changed