--- a/devencdiskutils/DevEncRfsPlugin/group/DevEncRfsPlugin.mmp Tue Feb 02 00:44:34 2010 +0200
+++ b/devencdiskutils/DevEncRfsPlugin/group/DevEncRfsPlugin.mmp Fri Mar 19 09:41:08 2010 +0200
@@ -33,7 +33,7 @@
SOURCE DevEncRfsPlugin.cpp
SOURCE DevEncRfsPluginImp.cpp
-START RESOURCE ..\data\200025B6.rss
+START RESOURCE ../data/200025B6.rss
#ifdef SYMBIAN_SECURE_ECOM
TARGET DevEncRfsPlugin.rsc
#endif
--- a/devencdiskutils/DevEncRfsPlugin/src/DevEncRfsPluginImp.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/devencdiskutils/DevEncRfsPlugin/src/DevEncRfsPluginImp.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -18,7 +18,7 @@
#include <e32std.h>
-#include <ImplementationProxy.h>
+#include <implementationproxy.h>
#include "DevEncRfsPlugin.h"
#include "DevEncUids.hrh"
--- a/devencdiskutils/DevEncStarter/inc/DevEncStarterUtils.h Tue Feb 02 00:44:34 2010 +0200
+++ b/devencdiskutils/DevEncStarter/inc/DevEncStarterUtils.h Fri Mar 19 09:41:08 2010 +0200
@@ -26,7 +26,7 @@
#include <w32std.h>
//#include <akncapserverclient.h> // for RAknUiServer
-#include "DevEncStarterdef.h"
+#include "DevEncStarterDef.h"
#include "DevEncStarterAppStarter.h"
// FORWARD DECLARATIONS
--- a/devencdiskutils/DevEncStarter/src/DevEncStarterEngine.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/devencdiskutils/DevEncStarter/src/DevEncStarterEngine.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -18,7 +18,7 @@
#include <startupdomainpskeys.h>
#include "DevEncStarterEngine.h"
-#include "DevEncStarterdef.h"
+#include "DevEncStarterDef.h"
#include "DevEncLog.h"
#include "DevEncStarterMmcObserver.h"
#include "DevEncUids.hrh"
--- a/devencdiskutils/Pk5Recognizer/src/Pk5Recognizer.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/devencdiskutils/Pk5Recognizer/src/Pk5Recognizer.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -20,11 +20,11 @@
#include <apmrec.h>
#include <apmstd.h>
#include <e32svr.h>
-#include <ImplementationProxy.h>
+#include <implementationproxy.h>
#include "Pk5Recognizer.h"
#include <barsread.h>
-#include <EikEnv.h>
+#include <eikenv.h>
#include <f32file.h>
// CONSTANTS
--- a/gba/common/GBALogger.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/gba/common/GBALogger.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -22,155 +22,159 @@
#include <flogger.h>
const TInt KDebugBufferSize1024 = 1024;
-const TInt KDebugBufferSize240 = 240;
-const TInt KDebugBufferSize120 = 120;
+const TInt KDebugBufferSize512 = 512;
+const TInt KDebugBufferSize240 = 240;
+const TInt KDebugBufferSize120 = 120;
_LIT(KTimeFormat, "%F%D/%M/%Y %J:%T:%S");
-void debuglineL(const char *a, void *arg1, void* arg1b, void *arg2, void *arg3, const char *arg4)
+void debugline(const char *a, void *arg1, void* arg1b, void *arg2, void *arg3, const char *arg4)
{
-
- HBufC8* logbuf = HBufC8::NewLC( KDebugBufferSize1024 );
- TPtr8 ptrlogbuf = logbuf->Des();
+ TBuf8<KDebugBufferSize1024> logbuffer;
+ TPtrC8 p((const TUint8 *)a);
+ TPtrC8 temp_arg4((const TUint8 *)arg4);
- TPtrC8 p((const unsigned char *)a);
- TPtrC8 temp_arg4((TUint8 *)arg4);
- ptrlogbuf.Format(p, arg1,arg1b, arg2, arg3);
- ptrlogbuf.Append(temp_arg4);
+ if( temp_arg4.Length() > KDebugBufferSize1024 - KDebugBufferSize120 )
+ return;
- if ( logbuf->Length() <= KDebugBufferSize120 )
+ logbuffer.Format(p, arg1,arg1b, arg2, arg3);
+ logbuffer.Append(temp_arg4);
+
+ if ( logbuffer.Length() <= KDebugBufferSize120 )
{
RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName,
EFileLoggingModeAppend,
- *logbuf );
+ logbuffer );
}
else
{
RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName,
EFileLoggingModeAppend,
- logbuf->Left( KDebugBufferSize120 ) );
+ logbuffer.Left( KDebugBufferSize120 ) );
//max length is 150, print another line
- if (logbuf->Mid(KDebugBufferSize120).Length()<= KDebugBufferSize120 )
+ if (logbuffer.Mid(KDebugBufferSize120).Length()<= KDebugBufferSize120 )
{
RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName,
EFileLoggingModeAppend,
- logbuf->Mid(KDebugBufferSize120) );
+ logbuffer.Mid(KDebugBufferSize120) );
}
else
{
RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName,
EFileLoggingModeAppend,
- logbuf->Mid(KDebugBufferSize120, KDebugBufferSize120) );
+ logbuffer.Mid(KDebugBufferSize120, KDebugBufferSize120) );
RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName,
EFileLoggingModeAppend,
- logbuf->Mid(KDebugBufferSize240) );
- }
-
- }
- CleanupStack::PopAndDestroy( logbuf );
+ logbuffer.Mid(KDebugBufferSize240) );
+ }
+ }
}
-void debuglineL(const char *a, void *arg1, void* arg1b, void *arg2, void *arg3, const TDesC &arg4)
+void debugline(const char *a, void *arg1, void* arg1b, void *arg2, void *arg3, const TDesC &arg4)
{
-
- HBufC8* logbuf = HBufC8::NewLC( KDebugBufferSize1024 );
- TPtr8 ptrlogbuf = logbuf->Des();
+ TBuf8<KDebugBufferSize1024> logbuffer;
- TPtrC8 p((const unsigned char *)a);
- ptrlogbuf.Format(p, arg1,arg1b, arg2, arg3);
- ptrlogbuf.Append(arg4);
+ if( arg4.Length() > KDebugBufferSize1024 - KDebugBufferSize120 )
+ return;
- if ( logbuf->Length() <= KDebugBufferSize120 )
+ TPtrC8 p((const TUint8 *)a);
+ logbuffer.Format(p, arg1,arg1b, arg2, arg3);
+ logbuffer.Append(arg4);
+
+ if ( logbuffer.Length() <= KDebugBufferSize120 )
{
RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName,
EFileLoggingModeAppend,
- *logbuf );
+ logbuffer );
}
else
{
RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName,
EFileLoggingModeAppend,
- logbuf->Left( KDebugBufferSize120 ) );
+ logbuffer.Left( KDebugBufferSize120 ) );
//max length is 150, print another line
- if (logbuf->Mid(KDebugBufferSize120).Length()<= KDebugBufferSize120 )
+ if (logbuffer.Mid(KDebugBufferSize120).Length()<= KDebugBufferSize120 )
{
RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName,
EFileLoggingModeAppend,
- logbuf->Mid(KDebugBufferSize120) );
+ logbuffer.Mid(KDebugBufferSize120) );
}
else
{
RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName,
EFileLoggingModeAppend,
- logbuf->Mid(KDebugBufferSize120, KDebugBufferSize120) );
+ logbuffer.Mid(KDebugBufferSize120, KDebugBufferSize120) );
RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName,
EFileLoggingModeAppend,
- logbuf->Mid(KDebugBufferSize240) );
- }
-
- }
- CleanupStack::PopAndDestroy( logbuf );
+ logbuffer.Mid(KDebugBufferSize240) );
+ }
+ }
}
-void debuglineL(const char *a, void *arg1, void *arg1b, void *arg2, void *arg3, const TDesC8 &arg4)
- {
- HBufC8* logbuf = HBufC8::NewLC( KDebugBufferSize1024 );
- TPtr8 ptrlogbuf = logbuf->Des();
- TPtrC8 p((const unsigned char *)a);
- ptrlogbuf.Format(p, arg1,arg1b, arg2, arg3);
- ptrlogbuf.Append(arg4);
- if ( logbuf->Length() <= KDebugBufferSize120 )
+void debugline(const char *a, void *arg1, void *arg1b, void *arg2, void *arg3, const TDesC8 &arg4)
+ {
+ TBuf8<KDebugBufferSize1024> logbuffer;
+
+ if( arg4.Length() > KDebugBufferSize1024 - KDebugBufferSize120)
+ return;
+
+ TPtrC8 p((const TUint8 *)a);
+ logbuffer.Format(p, arg1,arg1b, arg2, arg3);
+ logbuffer.Append(arg4);
+
+ if ( logbuffer.Length() <= KDebugBufferSize120 )
{
RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName,
EFileLoggingModeAppend,
- *logbuf );
+ logbuffer );
}
else
{
RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName,
EFileLoggingModeAppend,
- logbuf->Left(KDebugBufferSize120) );
+ logbuffer.Left(KDebugBufferSize120) );
//max length is 150, print another line
- if (logbuf->Mid(KDebugBufferSize120).Length()<= KDebugBufferSize120 )
+ if (logbuffer.Mid(KDebugBufferSize120).Length()<= KDebugBufferSize120 )
{
RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName,
EFileLoggingModeAppend,
- logbuf->Mid(KDebugBufferSize120) );
+ logbuffer.Mid(KDebugBufferSize120) );
}
else
{
RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName,
EFileLoggingModeAppend,
- logbuf->Mid(KDebugBufferSize120, KDebugBufferSize120) );
+ logbuffer.Mid(KDebugBufferSize120, KDebugBufferSize120) );
RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName,
EFileLoggingModeAppend,
- logbuf->Mid(KDebugBufferSize240) );
+ logbuffer.Mid(KDebugBufferSize240) );
}
}
- CleanupStack::PopAndDestroy( logbuf );
}
-void debuglineL(const char *a, void *arg1, void *arg1b, void *arg2, void *arg3, const char *arg4, const TInt& aNum )
+void debugline(const char *a, void *arg1, void *arg1b, void *arg2, void *arg3, const char *arg4, const TInt& aNum )
{
- HBufC8* logbuf = HBufC8::NewLC( KDebugBufferSize120 );
- TPtr8 ptrlogbuf = logbuf->Des();
+ TBuf8<KDebugBufferSize512> logbuf;
TPtrC8 temp_arg4((TUint8 *)arg4);
- ptrlogbuf.Format( temp_arg4, aNum );
-
- debuglineL(a, arg1, arg1b, arg2, arg3, *logbuf);
- CleanupStack::PopAndDestroy( logbuf );
+
+ if( temp_arg4.Length() > KDebugBufferSize512 - KDebugBufferSize120)
+ return;
+
+ logbuf.Format( temp_arg4, aNum );
+ debugline(a, arg1, arg1b, arg2, arg3, logbuf);
}
-void debuglineL(const char *a, void *arg1, void *arg1b, void *arg2, void *arg3, const TDesC &arg4, const TInt& aNum )
+void debugline(const char *a, void *arg1, void *arg1b, void *arg2, void *arg3, const TDesC &arg4, const TInt& aNum )
{
- HBufC* logbuf = HBufC::NewLC(KDebugBufferSize120);
- TPtr ptrlogbuf = logbuf->Des();
- ptrlogbuf.Format( arg4, aNum );
+ TBuf<KDebugBufferSize512> logbuf;
- debuglineL(a, arg1, arg1b, arg2, arg3, *logbuf);
- CleanupStack::PopAndDestroy( logbuf );
+ if( arg4.Length() > KDebugBufferSize512 - KDebugBufferSize120 )
+ return;
+
+ logbuf.Format( arg4, aNum );
+ debugline(a, arg1, arg1b, arg2, arg3, logbuf);
}
void DebugBinary( const TDesC8 &buf )
@@ -180,10 +184,12 @@
NULL, NULL , buf.Ptr(), buf.Length() );
}
-void debugTTimeL( TTime& aTime )
+void debugTTime( TTime& aTime )
{
TBuf<KDebugBufferSize120> buf;
- aTime.FormatL( buf, KTimeFormat);
+ TRAPD(error , aTime.FormatL( buf, KTimeFormat));
+ if(error != KErrNone)
+ return;
RFileLogger::WriteFormat( KGBALogDir, KGBALogFileName,
EFileLoggingModeAppend,
buf );
--- a/gba/gbafilter/src/HTTPFilterGBA.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/gba/gbafilter/src/HTTPFilterGBA.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -298,6 +298,7 @@
GBA_TRACE_DEBUG(("Event: EFailed"));
Cleanup( aTransaction );
}
+ break;
default:
{
GBA_TRACE_DEBUG_NUM(("Unknow Event: ID - %d" ), aEvent.iStatus );
@@ -592,9 +593,6 @@
//Default accesspoint will be used - iAPID = -1
iGbaInputParams.iAPID = -1;
- //Cancel the transaction
- aTrans.Cancel();
-
// fetch credentials from bootstrapper
iGbaUtility->Bootstrap(iGbaInputParams, iGbaOutputParams);
iBootstrapCount++;
@@ -623,6 +621,8 @@
propSet.SetPropertyL( iPasswordStr, password );
CleanupStack::PopAndDestroy(&password);
CleanupStack::PopAndDestroy(&username);
+ //Cancel the http transaction
+ aTrans.Cancel();
// Re-submit the http request with much needed credentials
aTrans.SubmitL();
}
@@ -752,7 +752,9 @@
{
THTTPHdrVal fieldVal;// The name of the current field.
THTTPHdrVal hdrVal;//A scratch hdrVal
- headers.GetField(wwwAuthenticate, ii, fieldVal);
+ TInt error = headers.GetField(wwwAuthenticate, ii, fieldVal);
+ if( error != KErrNone )
+ return lastGoodBasic;
TInt x = fieldVal.StrF().Index(RHTTPSession::GetTable());
GBA_TRACE_DEBUG_NUM((" FindHeaderPartToUseL part no:1 = %d"), x );
switch (fieldVal.StrF().Index(RHTTPSession::GetTable()))
--- a/gba/gbaserver/src/dataretriever.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/gba/gbaserver/src/dataretriever.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -829,7 +829,14 @@
{
THTTPHdrVal requestUri;
RHTTPTransactionPropertySet propSet = aTransaction.PropertySet();
- propSet.Property( stringPool.StringF(HTTP::EUri,RHTTPSession::GetTable()), requestUri );
+ TBool exist = propSet.Property( stringPool.StringF(HTTP::EUri,RHTTPSession::GetTable()), requestUri );
+
+ if(!exist)
+ {
+ CleanupStack::PopAndDestroy( pushCount );
+ return KErrNotFound;
+ }
+
//save rsp auth calcuation
//Save the string handle for rsp auth checking
//Close the previous handle, then set new one
@@ -906,7 +913,14 @@
{
THTTPHdrVal fieldVal;// The name of the current field.
THTTPHdrVal hdrVal;//A scratch hdrVal
- headers.GetField(wwwAuthenticate, i, fieldVal);
+
+ TInt error = headers.GetField(wwwAuthenticate, i, fieldVal);
+
+ if(error != KErrNone)
+ {
+ return KErrNotFound;
+ }
+
switch ( fieldVal.StrF().Index(RHTTPSession::GetTable() ) )
{
case HTTP::EDigest:
--- a/gba/inc/GBALogger.h Tue Feb 02 00:44:34 2010 +0200
+++ b/gba/inc/GBALogger.h Fri Mar 19 09:41:08 2010 +0200
@@ -27,17 +27,17 @@
#ifdef _DEBUG
- void debuglineL(const char *a, void *arg1, void* f, void *arg2, void *arg3, const TDesC &arg4);
- void debuglineL(const char *a, void *arg1, void* f, void *arg2, void *arg3, const TDesC8 &arg4);
- void debuglineL(const char *a, void *arg1, void* f, void *arg2, void *arg3, const char *arg4, const TInt &aNum);
- void debuglineL(const char *a, void *arg1, void* f, void *arg2, void *arg3, const TDesC8 &arg4, const TInt &aNum);
+ 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 debugTTimeL( TTime& aTime );
- void debuglineL(const char *a, void *arg1, void* f, void *arg2, void *arg3, const char *arg4);
+ void debugTTime( TTime& aTime );
+ void debugline(const char *a, void *arg1, void* f, void *arg2, void *arg3, const char *arg4);
#define GBA_DEBUG
- #define GBA_TRACE_DEBUG_DESC(a) debuglineL("%s:%s %d: %d",(void *) __FILE__, (void *) __func__, (void *)__LINE__, (void *)User::TickCount(),(a))
- #define GBA_TRACE_DEBUG_NUM( a,b ) debuglineL("%s:%s %d: %d",(void *) __FILE__, (void *) __func__, (void *)__LINE__, (void *)User::TickCount(),(a),b)
+ #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));
@@ -45,10 +45,10 @@
#define GBA_TRACE_DEBUG_BINARY(a)
#endif
- #define GBA_TRACE_BEGIN() debuglineL("%s:%s %d: %d",(void *) __FILE__, (void *) __func__, (void *)__LINE__, (void *)User::TickCount(),(KEnter))
- #define GBA_TRACE_END() debuglineL("%s:%s %d: %d",(void *) __FILE__, (void *) __func__, (void *)__LINE__, (void *)User::TickCount(),(KEnd))
- #define GBA_TRACE_TIME( a ) debugTTimeL( (a) );
- #define GBA_TRACE_DEBUG(a) debuglineL("%s:%s %d: %d",(void *) __FILE__, (void *) __func__, (void *)__LINE__, (void *)User::TickCount(),(a))
+ #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))
#else
--- a/gba/sis/gba.pkg Tue Feb 02 00:44:34 2010 +0200
+++ b/gba/sis/gba.pkg Fri Mar 19 09:41:08 2010 +0200
@@ -17,7 +17,7 @@
&EN
; Header
-#{"GBA (Beta)"},(0x2000F867), 0, 3, 0, TYPE=SA,RU
+#{"GBA (Beta)"},(0x20029F08), 0, 4, 0, TYPE=SA,RU
; Localised Vendor name
%{"Nokia"}
@@ -32,12 +32,12 @@
; Files to install
-"\epoc32\release\armv5\urel\gbaserver2.exe" -"c:\sys\bin\gbaserver2.exe"
-"\epoc32\release\armv5\urel\gbauicc2.dll" -"c:\sys\bin\gbauicc2.dll"
-"\epoc32\data\z\resource\plugins\gbauicc2.rsc" -"c:\resource\plugins\gbauicc2.rsc"
-"\epoc32\release\armv5\urel\gba2.dll" -"c:\sys\bin\gba2.dll"
-"\epoc32\release\armv5\urel\httpfiltergba2.dll" -"c:\sys\bin\httpfiltergba2.dll"
-"\epoc32\data\z\resource\plugins\httpfiltergba2.rsc" -"c:\resource\plugins\httpfiltergba2.rsc"
+"\epoc32\release\armv5\urel\gbaserver2.exe" -"!:\sys\bin\gbaserver2.exe"
+"\epoc32\release\armv5\urel\gbauicc2.dll" -"!:\sys\bin\gbauicc2.dll"
+"\epoc32\data\z\resource\plugins\gbauicc2.rsc" -"!:\resource\plugins\gbauicc2.rsc"
+"\epoc32\release\armv5\urel\gba2.dll" -"!:\sys\bin\gba2.dll"
+"\epoc32\release\armv5\urel\httpfiltergba2.dll" -"!:\sys\bin\httpfiltergba2.dll"
+"\epoc32\data\z\resource\plugins\httpfiltergba2.rsc" -"!:\resource\plugins\httpfiltergba2.rsc"
Binary file gba/sis/gba.sis has changed
Binary file gba/sis/gba.sisx has changed
--- a/gba/sis/gba_stub.pkg Tue Feb 02 00:44:34 2010 +0200
+++ b/gba/sis/gba_stub.pkg Fri Mar 19 09:41:08 2010 +0200
@@ -17,7 +17,7 @@
&EN
; Header
-#{"GBA"}, (0x2000F867), 1, 0, 0, TYPE=SA
+#{"GBA"}, (0x20029F08), 1, 0, 0, TYPE=SA
; Localised Vendor name
%{"Nokia"}
Binary file gba/sis/gba_stub.sis has changed
--- a/gba/uicc/src/GbaAkaIsa.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/gba/uicc/src/GbaAkaIsa.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -34,6 +34,7 @@
const TInt KIntegerConstant4 = 4;
const TInt KIntegerConstant16 = 16;
const TInt KIntegerConstant32 = 32;
+const TInt KMaximumKcSize = 8;
_LIT8( KAT, "@" );
_LIT8( KIMSMNC, "ims.mnc" );
@@ -330,19 +331,21 @@
GBA_TRACE_DEBUG(("Creating 2G authentication vector KDF(key,\"3gpp-gba-res\",sres)"));
GBA_TRACE_DEBUG_BINARY(authSIMdata.iSRES);
+ GBA_TRACE_DEBUG_NUM(("SRES size = %d"), authSIMdata.iSRES.Size() );
GBA_TRACE_DEBUG_BINARY(authSIMdata.iKC);
+ GBA_TRACE_DEBUG_NUM(("Kc size = %d"), authSIMdata.iKC.Size() );
TBuf8<KMaxBufferSize> lastSRESKC;
- TBuf8<2*RMmCustomAPI::KMaxKCLength+KAKA_RAND_LENGTH> kc2;
+ TBuf8< 2*KMaximumKcSize + KAKA_RAND_LENGTH > kc2;
// COPYING Kc twice
GBA_TRACE_DEBUG(("Copying iKC"));
- for( TInt i=0; i<(RMmCustomAPI::KMaxKCLength) ; i++ )
+ for( TInt i=0; i<KMaximumKcSize; i++ )
{
kc2.Append( (TUint8)(authSIMdata.iKC[i]) );
}
GBA_TRACE_DEBUG(("Copying iKC"));
- for( TInt i=0;i<(RMmCustomAPI::KMaxKCLength);i++ )
+ for( TInt i=0; i<KMaximumKcSize; i++ )
{
kc2.Append( (TUint8)(authSIMdata.iKC[i]) );
}
@@ -351,7 +354,7 @@
GBA_TRACE_DEBUG(("K part"));
GBA_TRACE_DEBUG_BINARY(kc2);
-
+ GBA_TRACE_DEBUG_NUM(("Key size = %d"), kc2.Size() );
// appending RAND
lastSRESKC.Append( 0x01);
lastSRESKC.Append(K3GPPGBARES);
@@ -803,8 +806,9 @@
GBA_TRACE_DEBUG_NUM(("QueryCardInterfaceL: GBA_U avail checking is Done, err = %d"), status.Int());
- if ( status.Int() == KErrNotFound )
+ if ( status.Int() == KErrNotFound || status.Int() == KErrNotSupported)
{
+ //If the GetUSIMServiceSupport API returnS KErrNotSupported,need to force 3G GBA_ME[E3GInterface]
//Not gba-u service available
GBA_TRACE_DEBUG(("QueryCardInterfaceL: it returns KErrNotFound, No GBA-U "));
// set interface as 3g then
@@ -839,7 +843,8 @@
}
else
{
- //nothing
+ // leave
+ User::LeaveIfError(KErrNotSupported);
}
}
--- a/pkiutilities/CTSecurityDialogs/NotifInc/CTSecurityDialogsAO.h Tue Feb 02 00:44:34 2010 +0200
+++ b/pkiutilities/CTSecurityDialogs/NotifInc/CTSecurityDialogsAO.h Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-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"
@@ -264,8 +264,6 @@
void MapTlsProviderOperation( TUint aOperation );
- TPtrC CutCertificateField(const TDesC& aField);
-
/**
* Completes client's request
*/
@@ -275,7 +273,7 @@
* Checks that are two PINs the same
*/
void VerifyPinsL();
-
+
private: // Data
RMessagePtr2 iMessagePtr;
TSecurityDialogNotification iOperation;
@@ -302,7 +300,7 @@
CCertAttributeFilter* iFilter;
RFs iFs;
CCTCertInfo* iCertInfo;
- CDesCArrayFlat* iCertArray;
+ CDesCArrayFlat* iCertArray;
RMPointerArray<CCTCertInfo> iCertInfos;
HBufC8* iCertBuf;
MCTWritableCertStore *iTrustedSiteCertStore;
@@ -322,12 +320,12 @@
TSaveCertInput iSaveCertInput;
TValidationError iAuthFailReason;
-
+
TBool& iDeleted;
-
+
CAknQueryDialog* iQueryDialog;
TBool iQueryDialogDeleted;
-
+
CCTPinQueryDialog* iPinQueryDialog;
TBool iPinQueryDialogDeleted;
};
--- a/pkiutilities/CTSecurityDialogs/NotifSrc/CTSecurityDialogsAO.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/pkiutilities/CTSecurityDialogs/NotifSrc/CTSecurityDialogsAO.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-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"
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
@@ -49,8 +49,6 @@
// LOCAL CONSTANTS AND MACROS
const TInt KCertArrayGranularity = 3;
const TInt KMaxLengthTextDetailsBody = 5000;
-// CertLabel, Issuer, Owner max length 510 bytes
-const TInt KMaxLengthTextCertLabel = 510;
// CertLabel, Issuer, Owner max visible length
const TInt KMaxLengthTextCertLabelVisible = 200;
// "dd/mm/yyyy0"
@@ -165,7 +163,7 @@
delete iKeyStore;
delete iCertStore;
iFs.Close();
-
+
iDeleted = ETrue;
}
@@ -186,7 +184,7 @@
iMessagePtr = aMessage;
WIMSECURITYDIALOGS_WRITE_FORMAT( "CCTSecurityDialogsAO::StartLD iOperation=%d", iOperation );
-
+
MapTlsProviderOperation( iOperation );
switch ( iOperation )
@@ -326,7 +324,7 @@
User::Panic( _L("CTestSecDlgNotifier"), 0 );
break;
}
-
+
// Note that CCTSecurityDialogsAO::StartLD() must complete the given message and
// delete itself when ready. However, there may be several steps before it can be
// deleted. CCTSecurityDialogsAO::HandleResponseAndCompleteL() completes the given
@@ -543,7 +541,7 @@
DoHandleMessageL( EErrorPukCodeIncorrect, KNullDesC, KNullDesC, 0, 0 );
}
// Ask the PUK code
- // The label is iPIN instead of iUnblockPIN, since we need to show to
+ // The label is iPIN instead of iUnblockPIN, since we need to show to
// the user which PIN to unblock
DoHandleMessageL( EEnterPukNR, iPIN.iPINLabel,
iPIN.iTokenLabel, iUnblockPIN.iMinLength, iUnblockPIN.iMaxLength );
@@ -762,8 +760,8 @@
aMinLength,
aMaxLength,
iRetValue,
- resource,
- iPinQueryDialog,
+ resource,
+ iPinQueryDialog,
iPinQueryDialogDeleted );
break;
}
@@ -1000,64 +998,64 @@
case EProcessTrustedSite:
{
WIMSECURITYDIALOGS_WRITE( "EProcessTrustedSite" );
- TInt count = iCertStore->WritableCertStoreCount();
- for ( TInt i = 0; i < count; i++ )
+ TInt count = iCertStore->WritableCertStoreCount();
+ for ( TInt i = 0; i < count; i++ )
+ {
+ MCTWritableCertStore *certstore = &iCertStore->WritableCertStore( i );
+ MCTToken& token = certstore->Token();
+ TUid tokenuid = token.Handle().iTokenTypeUid;
+ if ( tokenuid == KTrustedServerTokenUid )
{
- MCTWritableCertStore *certstore = &iCertStore->WritableCertStore( i );
- MCTToken& token = certstore->Token();
- TUid tokenuid = token.Handle().iTokenTypeUid;
- if ( tokenuid == KTrustedServerTokenUid )
- {
- iTrustedSiteCertStore = certstore;
- }
+ iTrustedSiteCertStore = certstore;
}
+ }
- CTrustSitesStore* trustedSitesStore = CTrustSitesStore::NewL();
- CleanupStack::PushL( trustedSitesStore );
+ CTrustSitesStore* trustedSitesStore = CTrustSitesStore::NewL();
+ CleanupStack::PushL( trustedSitesStore );
- // Find out whether or not site associated with certificate is trusted
- iTrustedSite = trustedSitesStore->IsTrustedSiteL( *iCertBuf, *iServerName );
+ // Find out whether or not site associated with certificate is trusted
+ iTrustedSite = trustedSitesStore->IsTrustedSiteL( *iCertBuf, *iServerName );
- if ( iTrustedSite )
- {
- TBool allowOutOfDate = trustedSitesStore->IsOutOfDateAllowedL(*iCertBuf, *iServerName );
-
- if (!allowOutOfDate)
- {
- CX509Certificate* cert = CX509Certificate::NewLC( iCertBuf->Des() );
+ if ( iTrustedSite )
+ {
+ TBool allowOutOfDate = trustedSitesStore->IsOutOfDateAllowedL(*iCertBuf, *iServerName);
+
+ if (!allowOutOfDate)
+ {
+ CX509Certificate* cert = CX509Certificate::NewLC( iCertBuf->Des() );
- const CValidityPeriod& validityPeriod = cert->ValidityPeriod();
- const TTime& startValue = validityPeriod.Start();
- const TTime& finishValue = validityPeriod.Finish();
- TTime current;
- current.UniversalTime();
+ const CValidityPeriod& validityPeriod = cert->ValidityPeriod();
+ const TTime& startValue = validityPeriod.Start();
+ const TTime& finishValue = validityPeriod.Finish();
+ TTime current;
+ current.UniversalTime();
- // First check certificate validity period
- if ( ( startValue > current ) || ( finishValue < current ) )
- {
- iTrustedSite = EFalse;
- }
-
- CleanupStack::PopAndDestroy(); //cert
- }
+ // First check certificate validity period
+ if ( ( startValue > current ) || ( finishValue < current ) )
+ {
+ iTrustedSite = EFalse;
}
- CleanupStack::PopAndDestroy( trustedSitesStore ); // trustedSitesStore
+
+ CleanupStack::PopAndDestroy( cert );
+ }
+ }
+ CleanupStack::PopAndDestroy( trustedSitesStore );
- if ( iTrustedSite )
- {
- // Site is trusted. Next step is to check that server
- // certificate is in the trusted site certificate storage
- iNextStep = ERetrieveServerCerts;
- iStatus = KRequestPending;
- SetActive();
- TRequestStatus* status = &iStatus;
- User::RequestComplete( status, KErrNone );
- }
- else
- {
- // Site is not trusted. Prompt user
- ShowNoTrustDialogL();
- }
+ if ( iTrustedSite )
+ {
+ // Site is trusted. Next step is to check that server
+ // certificate is in the trusted site certificate storage
+ iNextStep = ERetrieveServerCerts;
+ iStatus = KRequestPending;
+ SetActive();
+ TRequestStatus* status = &iStatus;
+ User::RequestComplete( status, KErrNone );
+ }
+ else
+ {
+ // Site is not trusted. Prompt user
+ ShowNoTrustDialogL();
+ }
break;
}
@@ -1394,7 +1392,7 @@
void CCTSecurityDialogsAO::DoHandleSelectCertificateL()
{
TBool foundDevCert = EFalse;
-
+
// Check certificate list to find out if there is certificate from
// Device Certificate Store.
for ( TInt ii = 0; ii < iCertHandleList.Count(); ii++)
@@ -1402,28 +1400,28 @@
TCTTokenObjectHandle handle = iCertHandleList[ii];
if ( handle.iTokenHandle.iTokenTypeUid == KDeviceCertStoreTokenUid )
{
- // Found a certificate from Device Certificate Store.
+ // Found a certificate from Device Certificate Store.
foundDevCert = ETrue;
- iTokenHandle = handle;
- iRetValue = ETrue;
+ iTokenHandle = handle;
+ iRetValue = ETrue;
iNextStep = EOperationCompleted;
iStatus = KRequestPending;
SetActive();
TRequestStatus* status = &iStatus;
- User::RequestComplete( status, KErrNone );
+ User::RequestComplete( status, KErrNone );
break;
}
-
+
}
-
+
if ( !foundDevCert )
- {
+ {
// No certificate from Device Certificate Store. Prompt user
// for certificate selection
CCTSelectCertificateDialog::RunDlgLD(
iCertArray, iCertHandleList, iTokenHandle,
iStatus, iRetValue ); // Takes ownerhip of array
-
+
iNextStep = EOperationCompleted;
iStatus = KRequestPending;
SetActive();
@@ -1439,7 +1437,7 @@
CX509Certificate* cert = CX509Certificate::NewLC( iCertBuf->Des() );
TInt resourceid = R_WIM_NO_TRUST_QUERY_UNTRUSTED;
TBool showPermAccept = ETrue;
-
+
if( iAuthFailReason == ESignatureInvalid || iAuthFailReason == ECertificateRevoked )
{
// Invalid or revoked certificate
@@ -1453,13 +1451,13 @@
if( iAuthFailReason == EValidatedOK || iAuthFailReason == EDateOutOfRange )
{
// Trusted certificate, but problems with CN or date
-
+
// Retrieve subject name
const CX500DistinguishedName& dName = cert->SubjectName();
-
+
// Retrieve common name
HBufC* cn = dName.ExtractFieldL( KX520CommonName );
-
+
// Check common name first and then date
if( !cn )
{
@@ -1490,15 +1488,17 @@
}
// No "Accept Permanently" option if certificate is out of date, or
- // if domain name is not defined.
+ // if domain name is not defined, or if trusted site store failed to
+ // open (and it's not possible to save the server certificate).
const CValidityPeriod& validityPeriod = cert->ValidityPeriod();
const TTime& startValue = validityPeriod.Start();
const TTime& finishValue = validityPeriod.Finish();
TTime current;
current.UniversalTime();
-
+
if( (( startValue > current ) || ( finishValue < current )) ||
- ( iServerName->Des().Length() == 0 ) )
+ ( iServerName->Des().Length() == 0 ) ||
+ ( !iTrustedSiteCertStore ) )
{
showPermAccept = EFalse;
}
@@ -2234,47 +2234,32 @@
// HBufC& aMessage, TPtrC aValue, TInt aResourceOne)
// Reads dynamic text, if the string is empty
// put a not defined text from the resource in its place
-// KMaxLengthTextCertLabel = 510, used by CertLabel(), Issuer(), Owner()
// ---------------------------------------------------------
//
void CCTSecurityDialogsAO::DetailsDynamicL(
TDes& aMessage, const TDesC& aValue, TInt aResource)
{
- HBufC* buf = HBufC::NewLC( KMaxLengthTextCertLabel );
- buf->Des() = aValue;
- buf->Des().TrimLeft();
- // Cut CertLabel after fourth semi colon
- TPtrC trimmedCertLabel = CutCertificateField( buf->Des() );
- buf->Des().Copy( trimmedCertLabel );
- TInt length = buf->Des().Length();
- if (length == 0 )
+ HBufC* buf = aValue.AllocLC();
+ TPtr trimmedValue( buf->Des() );
+ trimmedValue.TrimLeft();
+
+ if( trimmedValue.Length() > KMaxLengthTextCertLabelVisible )
+ {
+ trimmedValue.SetLength( KMaxLengthTextCertLabelVisible - 1 );
+ trimmedValue.Append( KTextUtilClipEndChar );
+ }
+
+ if( trimmedValue.Length() == 0 )
{
DetailsResourceL( aMessage, aResource );
}
else
{
- aMessage.Append( buf->Des() );
+ aMessage.Append( trimmedValue );
aMessage.Append( KEnter );
}
- CleanupStack::PopAndDestroy(); // buf
- }
-// ---------------------------------------------------------
-// CCTSecurityDialogsAO::CutCertificateField(TPtrC aField)
-// If CertLabel, Issuer and Owner length is over 80 characters,
-// cut it down to 80
-// Returns the cut certificate field.
-// ---------------------------------------------------------
-//
-TPtrC CCTSecurityDialogsAO::CutCertificateField( const TDesC& aField )
- {
- TInt fieldLength = aField.Length();
- if ( fieldLength >= KMaxLengthTextCertLabelVisible )
- {
- TPtrC cutCertLabel = aField.Mid( 0, KMaxLengthTextCertLabelVisible );
- return cutCertLabel;
- }
- return aField;
+ CleanupStack::PopAndDestroy( buf );
}
// -----------------------------------------------------------------------------
@@ -2375,12 +2360,12 @@
default:
User::Panic( _L("CTestSecDlgNotifier"), 0 );
}
-
+
if( iOperation != EServerAuthenticationFailure )
{
iMessagePtr.Complete( iRetValue ? KErrNone : KErrCancel );
}
-
+
delete this;
}
@@ -2429,14 +2414,14 @@
iQueryDialogDeleted = ETrue;
}
iQueryDialog = NULL;
-
+
if ( !iPinQueryDialogDeleted )
{
delete iPinQueryDialog;
iPinQueryDialogDeleted = ETrue;
}
iPinQueryDialog = NULL;
-
+
// Complete message if it has not been completed earlier.
if( !iMessagePtr.IsNull() )
{
@@ -2473,6 +2458,10 @@
iStatus = KRequestPending;
SetActive();
}
+ else
+ {
+ User::Leave( KErrGeneral );
+ }
}
// -----------------------------------------------------------------------------
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/DeviceToken/Src/Generic/Client/DevTokenClientSession.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/pkiutilities/DeviceToken/Src/Generic/Client/DevTokenClientSession.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -50,11 +50,11 @@
RProcess server;
TInt r = server.Create(KDevTokenServerImg, KNullDesC, serverUid);
- RDebug::Print( _L(" StartServer ") );
+ TRACE_PRINT( "StartServer" );
if ( r != KErrNone )
{
- RDebug::Print( _L("StartServer1 %d"), r );
+ TRACE_PRINT_NUM("StartServer1 %d", r );
return r;
}
@@ -72,19 +72,19 @@
server.Resume();
}
- RDebug::Print( _L(" StartServer 2") );
+ TRACE_PRINT(" StartServer 2");
// Wait to synchronise with server - if it dies in the meantime, it
// also gets completed
User::WaitForRequest(stat);
- RDebug::Print( _L(" StartServer 3") );
+ TRACE_PRINT(" StartServer 3");
// We can't use the 'exit reason' if the server panicked as this
// is the panic 'reason' and may be '0' which cannot be distinguished
// from KErrNone
r = (server.ExitType()==EExitPanic) ? KErrGeneral : stat.Int();
- RDebug::Print( _L(" StartServer 4 %d"), r );
+ TRACE_PRINT_NUM(" StartServer 4 %d", r );
server.Close();
return (r);
@@ -159,13 +159,13 @@
if ( r!=KErrNotFound && r!=KErrServerTerminated )
{
- RDebug::Print( _L("connect1 %d"), r );
+ TRACE_PRINT_NUM("connect1 %d", r );
return r;
}
if (--retry==0)
{
- RDebug::Print( _L(" connect2 %d"), r );
+ TRACE_PRINT_NUM(" connect2 %d", r );
return r;
}
@@ -173,7 +173,7 @@
if ( r!=KErrNone && r!=KErrAlreadyExists )
{
- RDebug::Print( _L(" connect3 %d"), r );
+ TRACE_PRINT_NUM(" connect3 %d", r );
return r;
}
--- a/pkiutilities/DeviceToken/Src/Generic/Server/DevTokenUtil.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/pkiutilities/DeviceToken/Src/Generic/Server/DevTokenUtil.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -20,6 +20,7 @@
#include <s32file.h>
#include "DevTokenUtil.h"
+
/// Read/write drive the stores reside on
_LIT(KFileStoreStandardDrive, "C:");
/// Rom drive where the initial store data is
@@ -59,18 +60,23 @@
// ---------------------------------------------------------------------------
//
TBool FileUtils::ExistsL(RFs& aFs, const TDesC& aFile)
- {
+ {
TBool result = EFalse;
- TBool open;
- TInt err = aFs.IsFileOpen(aFile, open);
-
- if (err == KErrNone)
+ TUint attributes;
+
+ TInt err = aFs.Att( aFile, attributes );
+
+ if ( err == KErrNone )
{
result = ETrue;
}
- else if (err != KErrNotFound && err != KErrPathNotFound)
+ else if ( err == KErrNotFound || err == KErrPathNotFound )
{
- User::Leave(err);
+ result = EFalse;
+ }
+ else
+ {
+ User::Leave( err );
}
return result;
--- a/pkiutilities/PKCS12/CrBer/Src/Crberset.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/pkiutilities/PKCS12/CrBer/Src/Crberset.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2000, 2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2000, 2004, 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"
@@ -817,8 +817,8 @@
{
handleThisTime = left;
}
- aData->Read(handled, ptr, handleThisTime);
- iTarget->Write(ptr);
+ User::LeaveIfError( aData->Read(handled, ptr, handleThisTime) );
+ User::LeaveIfError( iTarget->Write(ptr) );
ptr.Zero();
handled = handled + handleThisTime;
--- a/pkiutilities/PKCS12/CrBer/Src/crdata.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/pkiutilities/PKCS12/CrBer/Src/crdata.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2000, 2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2000, 2004, 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"
@@ -519,7 +519,13 @@
TDes8 tempDes = tempBuf->Des();
// Read data to a buffer from iPointer to end of file
- Read(currentPlace, tempDes, neededLengthToFind);
+ TInt readErr = Read(currentPlace, tempDes, neededLengthToFind);
+ if (readErr)
+ {
+ delete tempBuf;
+ tempBuf = NULL;
+ return readErr;
+ }
// Find the next new line character
newLinePlace = tempDes.Find(newLine);
--- a/pkiutilities/PKCS12/CrPkcs12/Inc/crcrypto.h Tue Feb 02 00:44:34 2010 +0200
+++ b/pkiutilities/PKCS12/CrPkcs12/Inc/crcrypto.h Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2000, 2002, 2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2000, 2002, 2004, 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"
@@ -178,8 +178,8 @@
const TInt aBlockSize,
CCrAlgInfo* algInfo);
- TInt MesDigestInputSize(TCrAlgorithm aDigestAlg);
- TInt MesDigestOutputSize(TCrAlgorithm aDigestAlg);
+ TInt MesDigestInputSizeL(TCrAlgorithm aDigestAlg);
+ TInt MesDigestOutputSizeL(TCrAlgorithm aDigestAlg);
void Reset();
private: // Data.
--- a/pkiutilities/PKCS12/CrPkcs12/Src/crcrypto.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/pkiutilities/PKCS12/CrPkcs12/Src/crcrypto.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2000, 2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2000, 2004, 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"
@@ -41,10 +41,10 @@
// -----------------------------------------------------------------------------
CCrCrypto::~CCrCrypto()
{
- Reset();
-
if( iAlgorithmInfos )
{
+ Reset();
+
iAlgorithmInfos->Reset();
delete iAlgorithmInfos;
iAlgorithmInfos = NULL;
@@ -713,8 +713,8 @@
TInt remainder = 0;
TInt rounds = 0;
TInt pushedToCStack = 0;
- TInt inputSize = MesDigestInputSize(aHashFunc);
- TInt outputSize = MesDigestOutputSize(aHashFunc);
+ TInt inputSize = MesDigestInputSizeL(aHashFunc);
+ TInt outputSize = MesDigestOutputSizeL(aHashFunc);
// Step 1: Construct D by concatenating copies of ID.
// Construct a string D
@@ -865,12 +865,12 @@
}
// -----------------------------------------------------------------------------
-// CCrCrypto::MesDigestInputSize
+// CCrCrypto::MesDigestInputSizeL
// Returns input size of the message digest algorithm.
// Return Values: Input size of the message digest algorithm in bytes.
-// If unknown algorithm returns -1.
+// If unknown algorithm, leaves with KErrNotSupported.
// -----------------------------------------------------------------------------
-TInt CCrCrypto::MesDigestInputSize(TCrAlgorithm aDigestAlg)
+TInt CCrCrypto::MesDigestInputSizeL( TCrAlgorithm aDigestAlg )
{
switch(aDigestAlg)
{
@@ -882,19 +882,20 @@
}
default:
{
- return -1;
+ User::Leave( KErrNotSupported );
+ return -1; // keeps compiler happy
}
}
}
// -----------------------------------------------------------------------------
-// CCrCrypto::MesDigestOutputSize
+// CCrCrypto::MesDigestOutputSizeL
// Returns output size of the message digest algorithm.
// Parameters: aDigestAlg message digest algortihm
// Return Values: Output size of the message digest algorithm in bytes.
-// If unknown algorithm returns -1.
+// If unknown algorithm, leaves with KErrNotSupported.
// -----------------------------------------------------------------------------
-TInt CCrCrypto::MesDigestOutputSize(TCrAlgorithm aDigestAlg)
+TInt CCrCrypto::MesDigestOutputSizeL( TCrAlgorithm aDigestAlg )
{
switch(aDigestAlg)
{
@@ -909,7 +910,8 @@
}
default:
{
- return -1;
+ User::Leave( KErrNotSupported );
+ return -1; // keeps compiler happy
}
}
}
--- a/pkiutilities/PKCS12/CrPkcs12/Src/crpkcs12.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/pkiutilities/PKCS12/CrPkcs12/Src/crpkcs12.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004, 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"
@@ -1130,10 +1130,17 @@
}
}
}
+
+ if( !pkcs7EncryptedDataBuf )
+ {
+ CleanupStack::PopAndDestroy(numberOfItemsInCStack); // set
+ numberOfItemsInCStack = 0;
+ return EFalse;
+ }
+
// OK, now we have buffer to be decrypted, used algorithm, salt and
// an iteration count. Next we decrypt buffer and append it to iBags.
-
- DecryptPkcs7EncryptedDataL( pkcs7EncryptedDataBuf,salt,iter,algorithm );
+ DecryptPkcs7EncryptedDataL( pkcs7EncryptedDataBuf, salt, iter, algorithm );
CleanupStack::PopAndDestroy(numberOfItemsInCStack);
numberOfItemsInCStack = 0;
@@ -1309,7 +1316,6 @@
{
TInt numberOfItemsinCStack = 0;
CCrBerSet* set = NULL;
- TInt errData = KErrNone;
set = CCrBerSet::NewLC( 1 );
++numberOfItemsinCStack;
@@ -1403,11 +1409,6 @@
CleanupStack::PushL(encryptedPrivateKeyInfo);
++numberOfItemsinCStack;
- if ( errData < KErrNone )
- {
- User::Leave(KErrArgument);
- }
-
// Decrypt
if ( !DecryptPrivateKeyL( encryptedPrivateKeyInfo,
salt,
--- a/pkiutilities/SecModUI/inc/SecModUISyncWrapper.h Tue Feb 02 00:44:34 2010 +0200
+++ b/pkiutilities/SecModUI/inc/SecModUISyncWrapper.h Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 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"
@@ -15,18 +15,14 @@
*
*/
-
#ifndef SECMODUISYNCWRAPPER_H
#define SECMODUISYNCWRAPPER_H
-
-// INCLUDES
#include <e32base.h>
#include <f32file.h>
#include <ct/rcpointerarray.h>
#include <ct/rmpointerarray.h>
-// FORWARD DECLERATIONS
class MCTToken;
class MCTAuthenticationObject;
class MCTAuthenticationObjectList;
@@ -36,7 +32,7 @@
class TCTKeyAttributeFilter;
class MCTKeyStore;
class TCTTokenObjectHandle;
-// CLASS DECLARATION
+
/**
* class CSecModUISyncWrapper
@@ -47,88 +43,66 @@
*/
class CSecModUISyncWrapper : public CActive
{
- public:
-
- /**
- * Two-phased constructor.
- */
- static CSecModUISyncWrapper* NewLC();
+ public: // Constructors and destructor
- /**
- * Two-phased constructor.
- */
+ static CSecModUISyncWrapper* NewLC();
static CSecModUISyncWrapper* NewL();
-
- /**
- * Destructor.
- */
virtual ~CSecModUISyncWrapper();
- public: // New functions
-
- /**
- * TInt ListL
- * @since S60 2.0
- * @param aStore reference to store where operation is done.
- * @param aArray certificates are stored here.
- * @param aFilter Information on what kind certificates are looked.
- * @return TInt Status Symbian's API's call.
- */
-
+ public: // New functions
TInt Initialize(CUnifiedKeyStore& aKeyStore );
TInt OpenWIM();
TInt GetAuthObjectInterface(
- MCTToken& aToken,
+ MCTToken& aToken,
MCTTokenInterface*& aTokenInterface);
- TInt ListAuthObjects(
- MCTAuthenticationObjectList& aAuthObjList,
+ TInt ListAuthObjects(
+ MCTAuthenticationObjectList& aAuthObjList,
RMPointerArray<MCTAuthenticationObject>& aAuthObjects );
-
+
TInt ListKeys(
- MCTKeyStore& aKeyStore,
- RMPointerArray<CCTKeyInfo>& aKeysInfos,
+ MCTKeyStore& aKeyStore,
+ RMPointerArray<CCTKeyInfo>& aKeysInfos,
const TCTKeyAttributeFilter& aFilter);
-
+
TInt DeleteKey(
- CUnifiedKeyStore& aKeyStore,
- TCTTokenObjectHandle aHandle);
-
+ CUnifiedKeyStore& aKeyStore,
+ TCTTokenObjectHandle aHandle);
+
TInt ChangeReferenceData( MCTAuthenticationObject& aAuthObject );
TInt UnblockAuthObject( MCTAuthenticationObject& aAuthObject );
-
+
TInt EnableAuthObject( MCTAuthenticationObject& aAuthObject );
-
+
TInt DisableAuthObject( MCTAuthenticationObject& aAuthObject );
-
+
TInt CloseAuthObject( MCTAuthenticationObject& aAuthObject );
-
+
TInt TimeRemaining( MCTAuthenticationObject& aAuthObject, TInt& aStime );
- protected:
-
+ protected: // From CActive
+
void DoCancel();
void RunL();
- private:
+ private: // New functions
CSecModUISyncWrapper();
- void HandleErrorL();
- private: //Data
+ private: // Data
// Internal operation states.
enum TOperation
{
- EOperationInit,
+ EOperationInit,
EOperationGetAOInterface,
EOperationListAOs,
EOperationListKeys,
- EOperationDelKey,
+ EOperationDelKey,
EOperationChangeReferenceData,
EOperationUnblockAO,
EOperationEnableAO,
@@ -140,13 +114,12 @@
// For wrapping asynchronous calls.
CActiveSchedulerWait iWait;
+
// Internal state of operation.
TOperation iOperation;
-
+
// CT objects
TAny* iObject;
};
#endif // SECMODUISYNCWRAPPER_H
-
-// End of File
--- a/pkiutilities/SecModUI/src/SecModUISyncWrapper.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/pkiutilities/SecModUI/src/SecModUISyncWrapper.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 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,8 +18,6 @@
*/
-
-// INCLUDE FILES
#include "SecModUISyncWrapper.h"
#include <ct/ccttokentypeinfo.h>
#include <ct/mcttokentype.h>
@@ -51,7 +49,7 @@
CSecModUISyncWrapper* CSecModUISyncWrapper::NewLC()
{
CSecModUISyncWrapper* wrap = new (ELeave) CSecModUISyncWrapper();
- CleanupStack::PushL(wrap);
+ CleanupStack::PushL(wrap);
return wrap;
}
@@ -86,14 +84,19 @@
TInt CSecModUISyncWrapper::Initialize(CUnifiedKeyStore& aKeyStore)
{
LOG_ENTERFN("CSecModUISyncWrapper::Initialize");
- iOperation = EOperationInit;
- iObject = STATIC_CAST(TAny*, &aKeyStore);
- aKeyStore.Initialize(iStatus);
- SetActive();
- iWait.Start();
- iOperation = EOperationNone;
- LOG_LEAVEFN("CSecModUISyncWrapper::Initialize");
- return iStatus.Int();
+ if( !IsActive() && !iWait.IsStarted() )
+ {
+ iOperation = EOperationInit;
+ iObject = STATIC_CAST(TAny*, &aKeyStore);
+ aKeyStore.Initialize(iStatus);
+ SetActive();
+ iWait.Start();
+ iOperation = EOperationNone;
+ LOG_LEAVEFN("CSecModUISyncWrapper::Initialize");
+ return iStatus.Int();
+ }
+ LOG_LEAVEFN("CSecModUISyncWrapper::Initialize - KErrInUse");
+ return KErrInUse;
}
// -----------------------------------------------------------------------------
@@ -104,18 +107,23 @@
MCTToken& aToken, MCTTokenInterface*& aTokenInterface)
{
LOG_ENTERFN("CSecModUISyncWrapper::GetAuthObjectInterface");
- iOperation = EOperationGetAOInterface;
- iObject = STATIC_CAST(TAny*, &aToken);
- const TUid KUidInterfaceAO = { KCTInterfaceAuthenticationObject };
- aToken.GetInterface(KUidInterfaceAO, aTokenInterface, iStatus);
- iOperation = EOperationGetAOInterface;
- SetActive();
- iWait.Start();
- iOperation = EOperationNone;
- LOG_LEAVEFN("CSecModUISyncWrapper::GetAuthObjectInterface");
- return iStatus.Int();
+ if( !IsActive() && !iWait.IsStarted() )
+ {
+ iOperation = EOperationGetAOInterface;
+ iObject = STATIC_CAST(TAny*, &aToken);
+ const TUid KUidInterfaceAO = { KCTInterfaceAuthenticationObject };
+ aToken.GetInterface(KUidInterfaceAO, aTokenInterface, iStatus);
+ iOperation = EOperationGetAOInterface;
+ SetActive();
+ iWait.Start();
+ iOperation = EOperationNone;
+ LOG_LEAVEFN("CSecModUISyncWrapper::GetAuthObjectInterface");
+ return iStatus.Int();
+ }
+ LOG_LEAVEFN("CSecModUISyncWrapper::GetAuthObjectInterface - KErrInUse");
+ return KErrInUse;
}
-
+
// -----------------------------------------------------------------------------
// CSecModUISyncWrapper::ListAuthObjects(...)
// -----------------------------------------------------------------------------
@@ -125,56 +133,71 @@
RMPointerArray<MCTAuthenticationObject>& aAuthObjects)
{
LOG_ENTERFN("CSecModUISyncWrapper::ListAuthObjects");
- iOperation = EOperationListAOs;
- iObject = STATIC_CAST(TAny*, &aAuthObjList);
- aAuthObjList.List( aAuthObjects, iStatus );
- iOperation = EOperationListAOs;
- SetActive();
- iWait.Start();
- iOperation = EOperationNone;
- LOG_LEAVEFN("CSecModUISyncWrapper::ListAuthObjects");
- return iStatus.Int();
+ if( !IsActive() && !iWait.IsStarted() )
+ {
+ iOperation = EOperationListAOs;
+ iObject = STATIC_CAST(TAny*, &aAuthObjList);
+ aAuthObjList.List( aAuthObjects, iStatus );
+ iOperation = EOperationListAOs;
+ SetActive();
+ iWait.Start();
+ iOperation = EOperationNone;
+ LOG_LEAVEFN("CSecModUISyncWrapper::ListAuthObjects");
+ return iStatus.Int();
+ }
+ LOG_LEAVEFN("CSecModUISyncWrapper::ListAuthObjects - KErrInUse");
+ return KErrInUse;
}
-
+
// -----------------------------------------------------------------------------
// CSecModUISyncWrapper::ListKeys(...)
// -----------------------------------------------------------------------------
-//
+//
TInt CSecModUISyncWrapper::ListKeys(
- MCTKeyStore& aKeyStore,
- RMPointerArray<CCTKeyInfo>& aKeysInfos,
+ MCTKeyStore& aKeyStore,
+ RMPointerArray<CCTKeyInfo>& aKeysInfos,
const TCTKeyAttributeFilter& aFilter)
{
LOG_ENTERFN("CSecModUISyncWrapper::ListKeys");
- iOperation = EOperationListKeys;
- iObject = STATIC_CAST(TAny*, &aKeyStore);
- aKeyStore.List(aKeysInfos, aFilter, iStatus);
- SetActive();
- iWait.Start();
- iOperation = EOperationNone;
- LOG_LEAVEFN("CSecModUISyncWrapper::ListKeys");
- return iStatus.Int();
+ if( !IsActive() && !iWait.IsStarted() )
+ {
+ iOperation = EOperationListKeys;
+ iObject = STATIC_CAST(TAny*, &aKeyStore);
+ aKeyStore.List(aKeysInfos, aFilter, iStatus);
+ SetActive();
+ iWait.Start();
+ iOperation = EOperationNone;
+ LOG_LEAVEFN("CSecModUISyncWrapper::ListKeys");
+ return iStatus.Int();
+ }
+ LOG_LEAVEFN("CSecModUISyncWrapper::ListKeys - KErrInUse");
+ return KErrInUse;
}
// -----------------------------------------------------------------------------
// CSecModUISyncWrapper::DeleteKey(...)
// -----------------------------------------------------------------------------
-//
+//
TInt CSecModUISyncWrapper::DeleteKey(
- CUnifiedKeyStore& aKeyStore,
+ CUnifiedKeyStore& aKeyStore,
TCTTokenObjectHandle aHandle)
{
LOG_ENTERFN("CSecModUISyncWrapper::DeleteKey");
- iOperation = EOperationDelKey;
- iObject = STATIC_CAST(TAny*, &aKeyStore);
- aKeyStore.DeleteKey(aHandle, iStatus);
- SetActive();
- iWait.Start();
- iOperation = EOperationNone;
- LOG_LEAVEFN("CSecModUISyncWrapper::DeleteKey");
- return iStatus.Int();
+ if( !IsActive() && !iWait.IsStarted() )
+ {
+ iOperation = EOperationDelKey;
+ iObject = STATIC_CAST(TAny*, &aKeyStore);
+ aKeyStore.DeleteKey(aHandle, iStatus);
+ SetActive();
+ iWait.Start();
+ iOperation = EOperationNone;
+ LOG_LEAVEFN("CSecModUISyncWrapper::DeleteKey");
+ return iStatus.Int();
+ }
+ LOG_LEAVEFN("CSecModUISyncWrapper::DeleteKey - KErrInUse");
+ return KErrInUse;
}
-
+
// -----------------------------------------------------------------------------
// CSecModUISyncWrapper::ChangeReferenceData(MCTAuthenticationObject& aAuthObject)
// -----------------------------------------------------------------------------
@@ -183,14 +206,19 @@
MCTAuthenticationObject& aAuthObject)
{
LOG_ENTERFN("CSecModUISyncWrapper::ChangeReferenceData");
- iOperation = EOperationChangeReferenceData;
- iObject = STATIC_CAST(TAny*, &aAuthObject);
- aAuthObject.ChangeReferenceData(iStatus);
- SetActive();
- iWait.Start();
- iOperation = EOperationNone;
- LOG_LEAVEFN("CSecModUISyncWrapper::ChangeReferenceData");
- return iStatus.Int();
+ if( !IsActive() && !iWait.IsStarted() )
+ {
+ iOperation = EOperationChangeReferenceData;
+ iObject = STATIC_CAST(TAny*, &aAuthObject);
+ aAuthObject.ChangeReferenceData(iStatus);
+ SetActive();
+ iWait.Start();
+ iOperation = EOperationNone;
+ LOG_LEAVEFN("CSecModUISyncWrapper::ChangeReferenceData");
+ return iStatus.Int();
+ }
+ LOG_LEAVEFN("CSecModUISyncWrapper::ChangeReferenceData - KErrInUse");
+ return KErrInUse;
}
// -----------------------------------------------------------------------------
@@ -201,53 +229,68 @@
MCTAuthenticationObject& aAuthObject)
{
LOG_ENTERFN("CSecModUISyncWrapper::UnblockAuthObject");
- iOperation = EOperationUnblockAO;
- iObject = STATIC_CAST(TAny*, &aAuthObject);
- aAuthObject.Unblock(iStatus);
- SetActive();
- iWait.Start();
- iOperation = EOperationNone;
- LOG_LEAVEFN("CSecModUISyncWrapper::UnblockAuthObject");
- return iStatus.Int();
+ if( !IsActive() && !iWait.IsStarted() )
+ {
+ iOperation = EOperationUnblockAO;
+ iObject = STATIC_CAST(TAny*, &aAuthObject);
+ aAuthObject.Unblock(iStatus);
+ SetActive();
+ iWait.Start();
+ iOperation = EOperationNone;
+ LOG_LEAVEFN("CSecModUISyncWrapper::UnblockAuthObject");
+ return iStatus.Int();
+ }
+ LOG_LEAVEFN("CSecModUISyncWrapper::UnblockAuthObject - KErrInUse");
+ return KErrInUse;
}
// -----------------------------------------------------------------------------
// CSecModUIModel::EnableAuthObject(MCTAuthenticationObject& aAuthObject)
// -----------------------------------------------------------------------------
-//
-TInt CSecModUISyncWrapper::EnableAuthObject(
+//
+TInt CSecModUISyncWrapper::EnableAuthObject(
MCTAuthenticationObject& aAuthObject)
{
LOG_ENTERFN("CSecModUISyncWrapper::EnableAuthObject");
- iOperation = EOperationEnableAO;
- iObject = STATIC_CAST(TAny*, &aAuthObject);
- aAuthObject.Enable(iStatus);
- iOperation = EOperationUnblockAO;
- SetActive();
- iWait.Start();
- iOperation = EOperationNone;
- LOG_LEAVEFN("CSecModUISyncWrapper::EnableAuthObject");
- return iStatus.Int();
+ if( !IsActive() && !iWait.IsStarted() )
+ {
+ iOperation = EOperationEnableAO;
+ iObject = STATIC_CAST(TAny*, &aAuthObject);
+ aAuthObject.Enable(iStatus);
+ iOperation = EOperationUnblockAO;
+ SetActive();
+ iWait.Start();
+ iOperation = EOperationNone;
+ LOG_LEAVEFN("CSecModUISyncWrapper::EnableAuthObject");
+ return iStatus.Int();
+ }
+ LOG_LEAVEFN("CSecModUISyncWrapper::EnableAuthObject - KErrInUse");
+ return KErrInUse;
}
-
+
// -----------------------------------------------------------------------------
// CSecModUIModel::DisableAuthObject(MCTAuthenticationObject& aAuthObject)
// -----------------------------------------------------------------------------
-//
+//
TInt CSecModUISyncWrapper::DisableAuthObject(
MCTAuthenticationObject& aAuthObject)
{
LOG_ENTERFN("CSecModUISyncWrapper::DisableAuthObject");
- iOperation = EOperationDisableAO;
- iObject = STATIC_CAST(TAny*, &aAuthObject);
- aAuthObject.Disable(iStatus);
- SetActive();
- iWait.Start();
- iOperation = EOperationNone;
- LOG_LEAVEFN("CSecModUISyncWrapper::DisableAuthObject");
- return iStatus.Int();
- }
-
+ if( !IsActive() && !iWait.IsStarted() )
+ {
+ iOperation = EOperationDisableAO;
+ iObject = STATIC_CAST(TAny*, &aAuthObject);
+ aAuthObject.Disable(iStatus);
+ SetActive();
+ iWait.Start();
+ iOperation = EOperationNone;
+ LOG_LEAVEFN("CSecModUISyncWrapper::DisableAuthObject");
+ return iStatus.Int();
+ }
+ LOG_LEAVEFN("CSecModUISyncWrapper::DisableAuthObject - KErrInUse");
+ return KErrInUse;
+ }
+
// -----------------------------------------------------------------------------
// CSecModUISyncWrapper::CloseAuthObject(MCTAuthenticationObject& aAuthObject)
// -----------------------------------------------------------------------------
@@ -256,33 +299,43 @@
MCTAuthenticationObject& aAuthObject)
{
LOG_ENTERFN("CSecModUISyncWrapper::CloseAuthObject");
- iOperation = EOperationCloseAO;
- iObject = STATIC_CAST(TAny*, &aAuthObject);
- aAuthObject.Close(iStatus);
- SetActive();
- iWait.Start();
- iOperation = EOperationNone;
- LOG_LEAVEFN("CSecModUISyncWrapper::CloseAuthObject");
- return iStatus.Int();
+ if( !IsActive() && !iWait.IsStarted() )
+ {
+ iOperation = EOperationCloseAO;
+ iObject = STATIC_CAST(TAny*, &aAuthObject);
+ aAuthObject.Close(iStatus);
+ SetActive();
+ iWait.Start();
+ iOperation = EOperationNone;
+ LOG_LEAVEFN("CSecModUISyncWrapper::CloseAuthObject");
+ return iStatus.Int();
+ }
+ LOG_LEAVEFN("SecModUISyncWrapper::CloseAuthObject - KErrInUse");
+ return KErrInUse;
}
// -----------------------------------------------------------------------------
// CSecModUIModel::TimeRemaining(...)
// -----------------------------------------------------------------------------
-//
-TInt CSecModUISyncWrapper::TimeRemaining(
- MCTAuthenticationObject& aAuthObject,
+//
+TInt CSecModUISyncWrapper::TimeRemaining(
+ MCTAuthenticationObject& aAuthObject,
TInt& aStime )
{
LOG_ENTERFN("CSecModUISyncWrapper::TimeRemaining");
- iOperation = EOperationTimeRemAO;
- iObject = STATIC_CAST(TAny*, &aAuthObject);
- aAuthObject.TimeRemaining(aStime, iStatus);
- SetActive();
- iWait.Start();
- iOperation = EOperationNone;
- LOG_LEAVEFN("CSecModUISyncWrapper::TimeRemaining");
- return iStatus.Int();
+ if( !IsActive() && !iWait.IsStarted() )
+ {
+ iOperation = EOperationTimeRemAO;
+ iObject = STATIC_CAST(TAny*, &aAuthObject);
+ aAuthObject.TimeRemaining(aStime, iStatus);
+ SetActive();
+ iWait.Start();
+ iOperation = EOperationNone;
+ LOG_LEAVEFN("CSecModUISyncWrapper::TimeRemaining");
+ return iStatus.Int();
+ }
+ LOG_LEAVEFN("CSecModUISyncWrapper::TimeRemaining - KErrInUse");
+ return KErrInUse;
}
// -----------------------------------------------------------------------------
@@ -296,72 +349,72 @@
switch ( iOperation )
{
case EOperationInit:
- {
- LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationInit");
+ {
+ LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationInit");
STATIC_CAST(CUnifiedKeyStore*, iObject)->CancelInitialize();
break;
}
case EOperationGetAOInterface:
- {
- LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationGetAOInterface");
+ {
+ LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationGetAOInterface");
STATIC_CAST(MCTToken*, iObject)->CancelGetInterface();
break;
- }
+ }
case EOperationListAOs:
{
- LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationListAOs");
+ LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationListAOs");
STATIC_CAST(MCTAuthenticationObjectList*, iObject)->CancelList();
break;
}
case EOperationListKeys:
{
- LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationListKeys");
+ LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationListKeys");
STATIC_CAST(MCTKeyStore*, iObject)->CancelList();
break;
- }
+ }
case EOperationDelKey:
{
- LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationDelKey");
+ LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationDelKey");
STATIC_CAST(CUnifiedKeyStore*, iObject)->CancelDeleteKey();
break;
}
case EOperationChangeReferenceData:
{
- LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationChangeReferenceData");
+ LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationChangeReferenceData");
STATIC_CAST(MCTAuthenticationObject*, iObject)->
CancelChangeReferenceData();
break;
}
case EOperationUnblockAO:
{
- LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationInit");
+ LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationInit");
STATIC_CAST(MCTAuthenticationObject*, iObject)->CancelUnblock();
break;
}
case EOperationEnableAO:
{
- LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationEnableAO");
+ LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationEnableAO");
STATIC_CAST(MCTAuthenticationObject*, iObject)->CancelEnable();
break;
}
case EOperationDisableAO:
{
- LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationDisableAO");
+ LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationDisableAO");
STATIC_CAST(MCTAuthenticationObject*, iObject)->CancelDisable();
break;
}
case EOperationCloseAO:
{
- LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationCloseAO");
+ LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationCloseAO");
STATIC_CAST(MCTAuthenticationObject*, iObject)->CancelClose();
break;
}
case EOperationTimeRemAO:
{
- LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationTimeRemAO");
+ LOG_WRITE("CSecModUISyncWrapper::DoCancel: EOperationTimeRemAO");
STATIC_CAST(MCTAuthenticationObject*, iObject)->CancelTimeRemaining();
break;
- }
+ }
default:
{
break;
@@ -371,7 +424,7 @@
{
iWait.AsyncStop();
}
- LOG_LEAVEFN("CSecModUISyncWrapper::DoCancel");
+ LOG_LEAVEFN("CSecModUISyncWrapper::DoCancel");
}
// -----------------------------------------------------------------------------
@@ -380,20 +433,7 @@
// -----------------------------------------------------------------------------
//
void CSecModUISyncWrapper::RunL()
- {
- iWait.AsyncStop();
+ {
+ iWait.AsyncStop();
}
-// -----------------------------------------------------------------------------
-// CSecModUISyncWrapper::HandleErrorL()
-// Shows an error note according to status of operation,
-// -----------------------------------------------------------------------------
-//
-void CSecModUISyncWrapper::HandleErrorL()
- {
-
- }
-
-
-// End of File
-
Binary file remotelock/CenRep/keys_remotelock.xls has changed
Binary file securitydialogs/Autolock/CenRep/keys_autolock.xls has changed
Binary file securitydialogs/Autolock/CenRep/keys_lock.xls has changed
--- a/securitydialogs/Autolock/src/AutolockAppUi.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/securitydialogs/Autolock/src/AutolockAppUi.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -959,7 +959,25 @@
if (!iAppKey)
{
RWindowGroup& groupWin=iCoeEnv->RootWin();
- iAppKey = groupWin.CaptureKeyUpAndDowns(EStdKeyApplication0, 0, 0); // Capture app key
+ #if defined(_DEBUG)
+ RDebug::Printf( "%s %s (%u) searching for popupclock.exe =%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x0 );
+ #endif
+ TApaTaskList taskList( CCoeEnv::Static()->WsSession() );
+ const TUid KBigClockUid = { 0x2000FDC3 };
+ TApaTask task( taskList.FindApp( KBigClockUid ) );
+ if ( task.Exists() )
+ {
+ #if defined(_DEBUG)
+ RDebug::Printf( "%s %s (%u) popupclock.exe is running. Not capturing EStdKeyApplication0=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, EStdKeyApplication0 );
+ #endif
+ }
+ else
+ {
+ #if defined(_DEBUG)
+ RDebug::Printf( "%s %s (%u) popupclock.exe not running. Not capturing EStdKeyApplication0=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, EStdKeyApplication0 );
+ #endif
+ iAppKey = groupWin.CaptureKeyUpAndDowns(EStdKeyApplication0, 0, 0); // Capture app key
+ }
}
LockSideKeyL();
}
--- a/securitydialogs/SecUi/Inc/SecUiAutoLockSettingPage.h Tue Feb 02 00:44:34 2010 +0200
+++ b/securitydialogs/SecUi/Inc/SecUiAutoLockSettingPage.h Fri Mar 19 09:41:08 2010 +0200
@@ -63,7 +63,6 @@
TInt& iAutoLockValue;
TInt iMaximum;
TInt iOriginalIndex;
- TInt iPrevSelectionItem;
};
--- a/securitydialogs/SecUi/Src/SecUiAutoLockSettingPage.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/securitydialogs/SecUi/Src/SecUiAutoLockSettingPage.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -51,7 +51,6 @@
{
iOriginalIndex = aCurrentSelectionItem;
- iPrevSelectionItem = aCurrentSelectionItem;
}
//
@@ -168,10 +167,7 @@
//only take into account the "Up" event. Otherwise we'll end up having 2 dialogs.
if(aPointerEvent.iType == TPointerEvent::EButton1Up)
{
- if(iPrevSelectionItem!=cur)
- iPrevSelectionItem=cur;
- else
- {
+
//only react to the event if the pen is actually inside the dialog.
if(ListBoxControl()->Rect().Contains(aPointerEvent.iPosition))
{
@@ -210,7 +206,6 @@
}
}
- }
}
}
}
--- a/securitydialogs/Securitynotifier/Group/Securitynotifier.mmp Tue Feb 02 00:44:34 2010 +0200
+++ b/securitydialogs/Securitynotifier/Group/Securitynotifier.mmp Fri Mar 19 09:41:08 2010 +0200
@@ -51,7 +51,7 @@
#if defined(WINSCW)
DEFFILE ../BWinsCw/SecurityNotifierU.def
#endif
-LIBRARY featmgr.lib
+LIBRARY featmgr.lib apgrfx.lib apparc.lib
SMPSAFE
--- a/securitydialogs/Securitynotifier/Src/SecurityNotifier.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/securitydialogs/Securitynotifier/Src/SecurityNotifier.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -31,6 +31,7 @@
#include <AknQueryDialog.h>
#include <featmgr.h>
#include <SCPClient.h>
+#include <apgcli.h>
// LOCAL CONSTANTS AND MACROS
/*****************************************************
@@ -224,6 +225,34 @@
//
void CSecurityNotifier::GetParamsL(const TDesC8& aBuffer, TInt aReturnVal, const RMessagePtr2& aMessage)
{
+ #if defined(_DEBUG)
+ RDebug::Printf( "%s %s (%u) searching for autolock.exe =%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x0 );
+ #endif
+ TApaTaskList taskList( CCoeEnv::Static()->WsSession() );
+ const TUid KAutolockUid = { 0x100059B5 };
+ TApaTask task( taskList.FindApp( KAutolockUid ) );
+ if ( !task.Exists() )
+ {
+ #if defined(_DEBUG)
+ RDebug::Printf( "%s %s (%u) autolock.exe not running. Starting now=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x1 );
+ #endif
+ RApaLsSession ls;
+ User::LeaveIfError(ls.Connect());
+ CleanupClosePushL(ls);
+
+ CApaCommandLine* commandLine = CApaCommandLine::NewLC();
+ commandLine->SetExecutableNameL( _L("autolock.exe" ) );
+ commandLine->SetCommandL( EApaCommandRun );
+
+ // Try to launch the application.
+ User::LeaveIfError(ls.StartApp(*commandLine));
+ #if defined(_DEBUG)
+ RDebug::Printf( "%s %s (%u) autolock.exe created=%x", __FILE__, __PRETTY_FUNCTION__, __LINE__, 0x2 );
+ #endif
+
+ CleanupStack::PopAndDestroy(2); // commandLine, ls
+ }
+
/*****************************************************
* Series 60 Customer / ETel
* Series 60 ETel API
--- a/securitydialogs/group/bld.inf Tue Feb 02 00:44:34 2010 +0200
+++ b/securitydialogs/group/bld.inf Fri Mar 19 09:41:08 2010 +0200
@@ -30,8 +30,6 @@
#include "../Securityobserver/Group/bld.inf"
#include "../lockclient/group/bld.inf"
#include "../lockapp/group/bld.inf"
-#include "../simlockui/group/bld.inf"
-
PRJ_TESTMMPFILES
--- a/securitydialogs/simlockui/data/SimLockUI.rss Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,277 +0,0 @@
-/*
-* ============================================================================
-* Name : SimLockUI.rss
-* Part of : SimLock UI Application / Resource Definitions
-* Description : Resource definitions for SimLock UI
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-// Resource Name Identifier
-NAME SLUI
-
-// Include Files
-#include <eikon.rh>
-#include <eikon.rsg>
-#include <avkon.rh>
-#include <avkon.rsg>
-#include <appinfo.rh>
-
-#include "SimLockUI.hrh"
-#include "SimLockUI.loc"
-
-// Resource Identifiers
-RESOURCE RSS_SIGNATURE { }
-RESOURCE TBUF r_default_document_name { buf = "Document"; }
-
-// Constants
-#define ESimLockUiQueryFlags (EGeneralQueryFlags)
-
-// ========================== RESOURCE DEFINITIONS ===========================
-
-// ---------------------------------------------------------------------------
-// EIK_APP_INFO
-// Define default menu and CBA key.
-// ---------------------------------------------------------------------------
-//
-RESOURCE EIK_APP_INFO
- {
- cba = R_AVKON_SOFTKEYS_EMPTY;
- menubar= R_AVKON_MENUPANE_EMPTY;
- }
-
-// ---------------------------------------------------------------------------
-// Text resources
-//
-// ---------------------------------------------------------------------------
-//
-
-// Background text captions
-RESOURCE TBUF r_simlock_ui_background_text_main {buf = qtn_sim_title_sim_unlock;}
-RESOURCE TBUF r_simlock_ui_background_text_unlock_complete {buf = qtn_sim_title_unlock_complete;}
-RESOURCE TBUF r_simlock_ui_codes_not_match {buf = qtn_sim_title_code_no_match;}
-RESOURCE TBUF r_simlock_ui_background_text_unlock_incorrect {buf = qtn_sim_title_code_wrong;}
-RESOURCE TBUF r_simlock_ui_background_text_unlock_failed {buf = qtn_sim_title_unlock_fail;}
-
-// Information notes
-RESOURCE TBUF r_sim_unlock_message_sim_unlocked {buf = qtn_sim_info_prev_unlock;}
-RESOURCE TBUF r_sim_unlock_message_cannot_unlock {buf = qtn_sim_info_perm_lock;}
-RESOURCE TBUF r_sim_unlock_message_end_call {buf = qtn_sim_info_end_call;}
-RESOURCE TBUF r_sim_phone_unlocked {buf = qtn_sim_info_phone_unlocked;}
-
-// Text for SIM popup text
-RESOURCE TBUF r_sim_info_welcome_note_text{buf=qtn_sim_popup_intro_info;}
-
-
-// ---------------------------------------------------------------------------
-// r_sim_info_welcome_note
-// Intro note displayed when Sim Lock UI Application starts
-// ---------------------------------------------------------------------------
-//
- RESOURCE DIALOG r_sim_info_welcome_note
- {
- flags=ESimLockUiQueryFlags;
- buttons=R_AVKON_SOFTKEYS_YES_NO__YES;
- items=
- {
- DLG_LINE
- {
- type = EAknCtPopupHeadingPane;
- id = EAknMessageQueryHeaderId;
- control = AVKON_HEADING
- {
- headinglayout = R_AVKON_LIST_HEADING_PANE_POPUPS;
- label = qtn_sim_title_sim_unlock;
- };
- },
- DLG_LINE
- {
- type = EAknCtMessageQuery;
- id = EAknMessageQueryContentId;
-
- control = AVKON_MESSAGE_QUERY
- {
- };
- }
- };
- }
-
-// ---------------------------------------------------------------------------
-// r_sim_unlock_final
-// Indicates the final unlock attempt has been performed
-// ---------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_sim_unlock_final
- {
- flags=ESimLockUiQueryFlags;
- buttons=R_AVKON_SOFTKEYS_OK_EMPTY;
- items=
- {
- DLG_LINE
- {
- type = EAknCtPopupHeadingPane;
- id = EAknMessageQueryHeaderId;
- control = AVKON_HEADING
- {
- headinglayout = R_AVKON_LIST_HEADING_PANE_POPUPS;
- label = qtn_sim_title_unlock_fail;
- };
- },
- DLG_LINE
- {
- type=EAknCtMessageQuery;
- id=EAknMessageQueryContentId;
- control= AVKON_MESSAGE_QUERY
- {
- message = qtn_sim_info_code_wrong_final;
- };
- }
- };
- }
-
-// ---------------------------------------------------------------------------
-// r_sim_info_codes_not_match
-// Dialog that indicates two Sim lock codes do not match
-// ---------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_sim_info_codes_not_match
- {
- flags=ESimLockUiQueryFlags;
- buttons=R_AVKON_SOFTKEYS_OK_CANCEL__OK;
- items=
- {
- DLG_LINE
- {
- type = EAknCtPopupHeadingPane;
- id = EAknMessageQueryHeaderId;
- control = AVKON_HEADING
- {
- headinglayout = R_AVKON_LIST_HEADING_PANE_POPUPS;
- label = qtn_sim_title_code_no_match;
- };
- },
-
- DLG_LINE
- {
- type=EAknCtMessageQuery;
- id=EAknMessageQueryContentId;
- control= AVKON_MESSAGE_QUERY
- {
- message = qtn_sim_info_code_no_match;
- };
- }
- };
- }
-
-// ---------------------------------------------------------------------------
-// r_sim_info_code_incorrect
-// Dialog that indicates an incorrect code was entered
-// ---------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_sim_info_code_incorrect
- {
- flags=ESimLockUiQueryFlags;
- buttons=R_AVKON_SOFTKEYS_OK_CANCEL__OK;
- items=
- {
- DLG_LINE
- {
- type = EAknCtPopupHeadingPane;
- id = EAknMessageQueryHeaderId;
- control = AVKON_HEADING
- {
- headinglayout = R_AVKON_LIST_HEADING_PANE_POPUPS;
- label = qtn_sim_title_code_wrong;
- };
- },
-
- DLG_LINE
- {
- type=EAknCtMessageQuery;
- id=EAknMessageQueryContentId;
- control= AVKON_MESSAGE_QUERY
- {
- message = qtn_sim_urn_code_wrong;
- };
- }
- };
- }
-
-// ---------------------------------------------------------------------------
-// r_sim_info_enter_password
-// Password entry dialog
-// ---------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_sim_info_enter_password
-
- {
- flags=ESimLockUiQueryFlags;
- buttons=R_AVKON_SOFTKEYS_OK_CANCEL__OK;
- items=
- {
- DLG_LINE
- {
- type=EAknCtQuery;
- id=EGeneralQuery;
- control= AVKON_DATA_QUERY
- {
- layout = EPhoneLayout;
- label = qtn_sim_query_enter_code;
- control = EDWIN
- {
- lines = 1;
- width = SEC_ATT_PASSWORD_MAX_BUFFER;
- default_input_mode = EAknEditorNumericInputMode;
- allowed_input_modes = EAknEditorNumericInputMode;
- };
- };
- }
- };
- }
-
-// ---------------------------------------------------------------------------
-// r_sim_info_test_password_reenter
-// Password re-entry dialog
-// ---------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_sim_info_reenter_password
-
- {
- flags=ESimLockUiQueryFlags;
- buttons=R_AVKON_SOFTKEYS_OK_CANCEL__OK;
- items=
- {
-
- DLG_LINE
- {
- type=EAknCtQuery;
- id=EGeneralQuery;
- control= AVKON_DATA_QUERY
- {
- layout = EPhoneLayout;
- label = qtn_sim_query_reenter_code;
- control = EDWIN
- {
- lines = 1;
- width = SEC_ATT_PASSWORD_MAX_BUFFER;
- default_input_mode = EAknEditorNumericInputMode;
- allowed_input_modes = EAknEditorNumericInputMode;
- };
- };
- }
- };
- }
--- a/securitydialogs/simlockui/data/SimLockUI_reg.rss Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
-* ============================================================================
-* Name : SimLockUI_reg.rss
-* Part of : SimLock UI
-* Description : SimLock UI App Registration file file
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-//SimLockUI application's registration resource file
-
-#include <appinfo.rh>
-#include <SimLockUI.rsg>
-
-#include "SimLockUI.hrh"
-
-UID2 KUidAppRegistrationResourceFile
-UID3 SIMLOCK_UI_UID3
-
-RESOURCE APP_REGISTRATION_INFO
- {
- app_file="SimLockUI";
-
- // Application is not in the menu
- //hidden = KAppIsHidden;
- // Uncomment and comment previous line to un-hide
- hidden = KAppNotHidden;
- localisable_resource_file="\\resource\\apps\\SimLockUI";
- embeddability = KAppNotEmbeddable;
- newfile = KAppDoesNotSupportNewFile;
- }
--- a/securitydialogs/simlockui/group/SimLockUI.mmp Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* ============================================================================
-* Name : simlockui.mmp
-* Part of : SimLock UI
-* Description : SimLock UI mmp file
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-#include "../inc/SimLockUI.hrh"
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-CAPABILITY ALL -TCB
-
-TARGETPATH /sys/bin
-TARGET SimLockUI.exe
-TARGETTYPE exe
-
-UID 0x00000000 SIMLOCK_UI_UID3
-VENDORID VID_DEFAULT
-
-LANG SC
-
-SOURCEPATH ../src
-SOURCE SimLockUI.cpp
-SOURCE SimLockUIApplication.cpp
-SOURCE SimLockUIBackgroundControl.cpp
-SOURCE SimLockUIAppUi.cpp
-SOURCE SimLockUIDocument.cpp
-SOURCE SimLockDataHandlingDelegate.cpp
-SOURCE SimLockTelephonyProxy.cpp
-
-USERINCLUDE ../inc
-SYSTEMINCLUDE /epoc32/include/internal
-
-APP_LAYER_SYSTEMINCLUDE
-LIBRARY euser.lib
-LIBRARY apparc.lib
-LIBRARY cone.lib
-LIBRARY eikcore.lib
-LIBRARY avkon.lib
-LIBRARY gdi.lib
-LIBRARY etel.lib
-LIBRARY etelmm.lib
-LIBRARY customapi.lib
-LIBRARY CommonEngine.lib
-LIBRARY aknskins.lib
-LIBRARY aknskinsrv.lib
-LIBRARY aknswallpaperutils.lib
-LIBRARY aknlayout2.lib
-LIBRARY AknLayout2Scalable.lib
-LIBRARY CdlEngine.lib
-LIBRARY ws32.lib
-LIBRARY etel3rdparty.lib
-LIBRARY eikcoctl.lib
-
-SOURCEPATH ../data
-
-// Main resource file
-START RESOURCE SimLockUI.RSS
-HEADER
-TARGETPATH /resource/apps
-LANG SC
-END
-
-// Resource registration file
-START RESOURCE SimLockUI_reg.rss
-TARGETPATH /private/10003a3f/apps
-END
-
-
-// End of file.
-
--- a/securitydialogs/simlockui/group/bld.inf Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* ============================================================================
-* Name : bld.inf
-* Part of : SimLockUI Build Information
-* Description : Build information file for project simlockui
-* Version :
-* 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"
-* 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: Build info file for Ado domain appinstall
-*
-* ============================================================================
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_MMPFILES
-
-// Project File
-SimLockUI.mmp
-
-// Icon File
-
-PRJ_EXPORTS
-// Export IBY files
-..\rom\simlockui.iby CORE_MW_LAYER_IBY_EXPORT_PATH( simlockui.iby)
-..\rom\simlockui_resources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(simlockui_resources.iby)
-
-// For EE texts
-..\rom\simlockui_resources.iby CORE_APP_LAYER_IBY_EXPORT_PATH(simlockui_resources.iby)
-
-..\inc\simlockuikeys.h \epoc32\include\oem\simlockuikeys.h
\ No newline at end of file
--- a/securitydialogs/simlockui/inc/SimLockDataHandlingDelegate.h Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/*
-* ============================================================================
-* Name : SimLockDataHandlingDelegate.h
-* Part of : Sim Lock UI Application
-* Description : Handles reading and writing of Sim Lock data including
- unlocking the Sim Lock.
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-#ifndef SIMLOCKDATAHANDLINGDELEGATE_H
-#define SIMLOCKDATAHANDLINGDELEGATE_H
-
-// System Includes
-#include <e32base.h>
-
-// Forward Declarations
-class RMmCustomAPI;
-struct TSimPathStr;
-struct TSimLockHeadStr;
-class CActiveSchedulerWait;
-class TIsiReceiveC;
-class CPeriodic;
-
-/**
- * CSimLockDataHandlingDelegate
- *
- * Delegate class to handle communication with lower layers of S60 and Symbian,
- * and also the native( ISA ) layer.
- *
- * @lib euser.lib
- * @lib iscapi.lib
- * @lib isimessage.lib
- * @lib etel.lib
- * @lib etelmm.lib
- * @lib customapi.lib
- */
-class CSimLockDataHandlingDelegate : public CActive
- {
-public: // Public Constructor / Destructor
-
- /**
- * Two-phased constructor
- *
- */
- static CSimLockDataHandlingDelegate* NewL( RMmCustomAPI& aCustomAPI );
-
- /**
- * Destructor
- *
- */
- virtual ~CSimLockDataHandlingDelegate();
-
-public: // Public API
-
- /**
- * Open the Sim Lock( type 1 ) given a passcode.
- *
- * @param aPassword TDesC of the password to open lock
- * @return Indicates the result of the Sim Lock open attempt
- */
- TInt OpenSimLock( const TDesC& aPassword );
-
- /**
- * Determine if the Sim Lock is open.
- *
- * @return Indicates if Sim Lock is open
- */
- TBool IsSimLockOpen() const;
-
-
-private: // Private Constructors
-
- /**
- * C++ constructor.
- *
- * @param aCustomAPI ETel custom API object
- */
- CSimLockDataHandlingDelegate( RMmCustomAPI& aCustomAPI );
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
-
-private: // From CActive
-
- /**
- * Active object run method
- * @see CActive
- */
- virtual void RunL();
-
- /**
- * Active object cancel method
- * @see CActive
- */
- virtual void DoCancel();
-
-private: // Local Member API
-
- /**
- * CPeriodic Callback function for elapsed timer
- *
- * @param aUnused requred for interface
- * @return required but unused
- */
- static TInt TimerElapsed(TAny* aUnused);
-
- /**
- * Pause execution and allow active scheduler to run until the current outstanding
- * request complets
- *
- */
- void CompleteRequestWithTimeout();
-
-private: // Member Data
- /**
- * Indicates if the Sim Lock is open per the last read from the Sim Lock
- * server.
- */
- TBool iLockIsOpen;
-
- /**
- * Handle to ETel MultiMode Custom API server
- */
- RMmCustomAPI& iCustomAPI;
-
- /**
- * Help with asynchronous requests
- */
- CActiveSchedulerWait* iSchedulerWait;
-
- /**
- * Indicates that Sim Lock data has been read
- */
- TBool iDataHasBeenRead;
-
- /**
- * Timeout handling timer
- * owns
- */
- CPeriodic* iTimer;
-
- };
-
-#endif //SIMLOCKDATAHANDLINGDELEGATE_H
-
-// End of File
-
--- a/securitydialogs/simlockui/inc/SimLockISAServerDefinitions.h Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,173 +0,0 @@
-/*
-* ============================================================================
-* Name : SimLockISAServerDefinitions.h
-* Part of : Sim Lock UI Application
-* Description : Definitions for Sim Lock ISA Server
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-#ifndef SimLockISAServerDefinitions_H
-#define SimLockISAServerDefinitions_H
-
-// INCLUDES
-#include <e32base.h>
-
-// =============================================
-// Convert to little endian
-// =============================================
-
-// Macro to convert big endian to native type
-// EPOC ARM is little endian
-#define BE2INT16( x ) ( ( ( ( x ) & 0xFF00 ) >> 8 ) |( ( ( x ) & 0x00FF ) << 8 ) )
-
-
-// =============================================
-// From Simlock_lock.h in cellmo: ISA server
-// =============================================
-
-// MACROS
-
-#define SIMLOCK_PROFILE_SIZE 8
-#define SIMLOCK_CONFIG_SIZE 8
-
-/* Block status */
-typedef TUint8 SL_BLOCK_STATUS;
-#define SL_BLOCK_NOT_DISCARD 0x00
-#define SL_BLOCK_DISCARD 0x01
-#define SL_BLOCK_PERMANENT 0x02
-#define SL_BLOCK_MANDATORY 0x03
-
-/* Requirement status */
-typedef TUint8 SL_LOCKTYPE;
-#define SL_LOCKTYPE_AUTO 0x01
-#define SL_LOCKTYPE_CLOSED 0x02
-#define SL_LOCKTYPE_OPEN 0x03
-
-
-/* Criteria */
-typedef TUint8 SL_OPERATOR;
-#define SL_OP_BYTEWISE_DISTINCT_EQ 0x01
-#define SL_OP_BYTEWISE_DISTINCT_GTE 0x02
-#define SL_OP_BYTEWISE_DISTINCT_LTE 0x03
-#define SL_OP_BYTEWISE_DISTINCT_NEQ 0x04
-#define SL_OP_NIBBLEWISE_DISTINCT_EQ 0x05
-#define SL_OP_NIBBLEWISE_DISTINCT_GTE 0x06
-#define SL_OP_NIBBLEWISE_DISTINCT_LTE 0x07
-#define SL_OP_NIBBLEWISE_DISTINCT_NEQ 0x08
-#define SL_OP_BITWISE_DISTINCT_NEQ 0x09
-#define SL_OP_BYTEWISE_UNIFIED_GTE 0x0A
-#define SL_OP_BYTEWISE_UNIFIED_LTE 0x0B
-#define SL_OP_BYTEWISE_UNIFIED_NEQ 0x0C
-#define SL_OP_NIBBLEWISE_UNIFIED_GTE 0x0D
-#define SL_OP_NIBBLEWISE_UNIFIED_LTE 0x0E
-#define SL_OP_NIBBLEWISE_UNIFIED_NEQ 0x0F
-#define SL_OP_BITWISE_DISTINCT_EQ 0x10
-#define CRITERIA_MAXIMUM 0x10
-
-
-/* No mask( all data counts ) */
-#define SIMLOCK_MASK_NOT_DEF 0x0000
-
-// DATA TYPES
-
-// Sim Lock data structures
-struct TSimLockConfigStr
- {
- TUint8 Byte[SIMLOCK_CONFIG_SIZE];
- };
-
-struct TSimLockProfileStr
- {
- TUint8 Byte[SIMLOCK_PROFILE_SIZE];
- };
-
-/* An aboslute path on SIM card */
-struct TSimPathStr
- {
- TUint8 ah;
- TUint8 al;
- TUint8 bh;
- TUint8 bl;
- TUint8 ch;
- TUint8 cl;
- TUint8 dh;
- TUint8 dl;
- }; /* sizeof( SIM_PATH_STR ) = 8 */
-
-#define SIM_PATH_SIZE sizeof( TSimPathStr )
-
-/* A match requirement */
-struct TSimLockMRStr
- {
- TUint32 ReadSpec;
- TSimPathStr FileId;
- TUint16 Mask;
- TUint16 Offset;
- TUint8 DataSize;
- TUint8 UnitLength;
- SL_OPERATOR Criterion;
- SL_LOCKTYPE LockType;
- }; /* sizeof( SL_MR_STR ) = 20 */
-
-#define SL_MR_STR_SIZE sizeof( TSimLockMRStr )
-
-/* A match block */
-struct TSimLockMBStr
- {
- TUint16 Offset;
- TUint8 AccessClass;
- SL_BLOCK_STATUS mbStatus;
- TUint8 mrCount;
- TUint8 Reserved1;
- TUint8 Reserved2;
- TUint8 Reserved3;
- }; /* sizeof( SL_MB_STR ) = 8 */
-
-#define SL_MB_STR_SIZE sizeof( TSimLockMBStr )
-
-/* Sim Lock header */
-struct TSimLockHeadStr
- {
- // Use BB5 Head Str
- TSimLockProfileStr Profile; // !!!! 8 TUint8s
- TSimLockConfigStr ConfigData; // !!!! 8 TUint8s
-
- TUint16 Offset;
- TUint8 mbCount;
- TUint8 UnlockCount;
- TUint8 Reserved1;
- TUint8 Reserved2;
-
- TUint8 Reserved3;
- TUint8 Reserved4;
- }; /* sizeof( SL_HEAD_STR ) = 8 or 24 */
-
-#define SL_HEAD_STR_SIZE ( ( TInt )sizeof( TSimLockHeadStr ) )
-
-// CONSTANTS
-
-extern TInt KSimLockUnlockAttemptsAvailable;
-
-// FUNCTION PROTOTYPES
-
-// FORWARD DECLARATIONS
-
-
-#endif // SimLockISAServerDefinitions_H
-
-// End of File
--- a/securitydialogs/simlockui/inc/SimLockTelephonyProxy.h Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*
-* ============================================================================
-* Name : SimLockTelephonyProxy.h
-* Part of : Sim Lock UI Telephony Proxy
-* Description : Wrap asynchronous calls to Core Telephony
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-#ifndef SIMLOCK_TELEPHONY_PROXY_H
-#define SIMLOCK_TELEPHONY_PROXY_H
-
-// System Includes
-#include <e32base.h>
-#include <Etel3rdParty.h> // CTelephony members
-
-// Forward Declarations
-class CPeriodic;
-
-/**
- * CSimLockTelephonyProxy
- *
- * Act as proxy for asynchronous calls to CTelephony
- *
- * @lib euser.lib
- * @lib etel3rdparty.lib
- */
-class CSimLockTelephonyProxy : public CActive
- {
-public: // Public Constructor/Destructor
-
- /**
- * NewL
- * Construct a CSimLockTelephonyProxy
- * using two phase construction, and return a pointer to the created object
- * @return a pointer to the created instance of CSimLockTelephonyProxy
- */
- static CSimLockTelephonyProxy* NewL();
-
- /**
- * Destructor
- */
- ~CSimLockTelephonyProxy();
-
-public: // Public API
-
- /**
- * Find out if a call is in progress.
- *
- * @return Whether or not a call is in progress
- */
- TBool IsCallInProgress();
-
-private: // From CActive
-
- /**
- * Active object run method
- */
- virtual void RunL();
-
- /**
- * Active object cancel method
- */
- virtual void DoCancel();
-
- private: // Private Constructors
-
- /**
- * C++ constructor.
- *
- */
- CSimLockTelephonyProxy();
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
-private: // Private Member Functions
-
- /**
- * CPeriodic Callback function for elapsed timer
- *
- * @param aClientObject pointer to CSimLockTelephonyProxy client object
- * @return required but unused
- */
- static TInt TimerElapsed(TAny* aClientObject);
-
- /**
- * Complete an asynchronous request synchronously with a hardcoded timeout
- */
- void CompleteRequestWithTimeout();
-
-private: // Member Data
-
- /**
- * Telephony indicators( used to detect ongoing voice call )
- */
- CTelephony::TIndicatorV1 iIndicators;
-
- /**
- * Telephony indicator package as received from CTelephony
- */
- CTelephony::TIndicatorV1Pckg iIndicatorPackage;
-
- /**
- * ETel 3rd Party API( used to detect ongoing voice call )
- * owns
- */
- CTelephony* iTelephony;
-
- /**
- * Active scheduler wait API
- * owns
- */
- CActiveSchedulerWait* iSchedulerWait;
-
- /**
- * Request timeout timer
- * owns
- */
- CPeriodic* iTimer;
-
- };
-
-#endif // SIMLOCK_TELEPHONY_PROXY_H
-
-// End of file.
--- a/securitydialogs/simlockui/inc/SimLockUI.hrh Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* ============================================================================
-* Name : SimLockUI.hrh
-* Part of : Sim Lock UI Application
-* Description : Resource compatible header file
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-#ifndef __SimLockUI_HRH__
-#define __SimLockUI_HRH__
-
-#define SIMLOCK_UI_UID3 0x2000B0FA
-#define SEC_ATT_PASSWORD_MAX_BUFFER 32
-
-#endif // __SimLockUI_HRH__
-
-// End of file.
--- a/securitydialogs/simlockui/inc/SimLockUI.loc Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*
-* ============================================================================
-* Name : SimLockUI.loc
-* Part of : Sim Lock UI Application / Resource Definitions
-* Description : Resource definitions for Sim Lock UI
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-// LOCALISATION STRINGS
-
-// NEW
-
-//d: SIM Unlock Process
-//l: heading_pane_t1
-//r: 3.2
-//
-#define qtn_sim_title_sim_unlock "SIM Unlock Process"
-
-//d: Intro message query giving high level description of the SIM Unlock process
-//l: popup_info_list_pane_t1
-//r: 3.2
-//
-#define qtn_sim_popup_intro_info "You have inserted an invalid SIM. Would you like to SIM unlock your phone? You have a limited number of unsuccessful attempts after which your phone will be permanently locked."
-
-//d: Header during unlock code query showing attempt number, where: 1 <= %0N <= 3; %1N = 3
-//l: main_pane_empty_t1/opt2
-//r: 3.2
-//
-#define qtn_sim_title_unlock_attempt_no "Unlock Attempt %0N of %1N"
-
-//d: Unlock code query prompt
-//l: popup_query_data_window_t3/opt2
-//r: 3.2
-//
-#define qtn_sim_query_enter_code "Enter the unlock code"
-
-//d: Unlock code reentry query prompt
-//l: popup_query_data_window_t3/opt2
-//r: 3.2
-//
-#define qtn_sim_query_reenter_code "Reenter the unlock code"
-
-//d: Header indicating successful SIM unlock
-//l: main_pane_empty_t1/opt2
-//r: 3.2
-//
-#define qtn_sim_title_unlock_complete "Unlock Process Complete"
-
-//d: Info indicating successful SIM unlock. Forewarns that device will reboot.
-//l: popup_note_window/opt2
-//r: 3.2
-//
-#define qtn_sim_info_phone_unlocked "Your phone is unlocked. The phone will now restart."
-
-//d: Header indicating non-matching codes were entered.
-//l: heading_pane_t1
-//r: 3.2
-//
-#define qtn_sim_title_code_no_match "Codes not matched"
-
-//d: Info indicating that two entered unlock codes were not the same.
-//l: popup_info_list_pane_t1
-//r: 3.2
-//
-#define qtn_sim_info_code_no_match "The unlock codes entered do not match each other. The same unlock code must be entered twice. Try again?"
-
-//d: Header indicating that an incorrect SIM unlock code was entered.
-//l: heading_pane_t1
-//r: 3.2
-//
-#define qtn_sim_title_code_wrong "Incorrect Code Entered"
-
-//d: Info note indicating that the SIM unlock process failed.
-//l: popup_info_list_pane_t1
-//r: 3.2
-//
-#define qtn_sim_urn_code_wrong "The incorrect unlock code was entered. The phone was not unlocked. Try again?"
-
-//d: Header indicating that the SIM unlock process failed.
-//l: heading_pane_t1
-//r: 3.2
-//
-#define qtn_sim_title_unlock_fail "Unlock Process Failed"
-
-//d: Info note that the SIM unlock process failed. Three attempts remain.
-//l: popup_info_list_pane_t1
-//r: 3.2
-//
-#define qtn_sim_info_code_wrong_three "The incorrect unlock code was entered. Only three (3) unlock attempts remain before the phone is permanently locked."
-
-//d: Info note that the SIM unlock process failed. Two attempts remain.
-//l: popup_info_list_pane_t1
-//r: 3.2
-//
-#define qtn_sim_info_code_wrong_two "The incorrect unlock code was entered. Only two (2) unlock attempts remain before the phone is permanently locked."
-
-//d: Info note that the SIM unlock process failed. One attempt remains.
-//l: popup_info_list_pane_t1
-//r: 3.2
-//
-#define qtn_sim_info_code_wrong_one "The incorrect unlock code was entered. Only one (1) unlock attempt remains before the phone is permanently locked."
-
-//d: Info note that the SIM unlock process failed. No attempts remain.
-//l: popup_info_list_pane_t1
-//r: 3.2
-//
-
-#define qtn_sim_info_code_wrong_final "The incorrect unlock code was entered on the final attempt. The phone is permanently locked and cannot be unlocked."
-
-//d: Info note that the SIM has previously been unlocked.
-//l: popup_note_window/opt2
-//r: 3.2
-//
-#define qtn_sim_info_prev_unlock "The SIM card is already unlocked."
-
-//d: Info note that the phone has previously been permanently locked.
-//l: popup_note_window/opt2
-//r: 3.2
-//
-#define qtn_sim_info_perm_lock "Phone is permanently locked and cannot be unlocked."
-
-//d: Note to end an ongoing call before entering SIM unlock code (as the phone will reboot upon successful unlock.)
-//l: popup_note_window/opt2
-//r: 3.2
-//
-#define qtn_sim_info_end_call "End call before entering unlock code."
-
--- a/securitydialogs/simlockui/inc/SimLockUI.pan Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
- /*
-* ============================================================================
-* Name : SimLockUI.pan
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-#ifndef __SIMLOCKUI_PAN__
-#define __SIMLOCKUI_PAN__
-
-/** SimLockUI application panic codes */
-enum TSimLockUIPanics
- {
- ESimLockUIBasicUi = 1,
- ESimLockUIUnableToReadSimLock
- // add further panics here
- };
-
-inline void Panic(TSimLockUIPanics aReason)
- {
- _LIT(applicationName,"SimLockUI"); //lint !e1534 static variable OK
- User::Panic(applicationName, aReason);
- }
-
-#endif // __SIMLOCKUI_PAN__
--- a/securitydialogs/simlockui/inc/SimLockUIApplication.h Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* ============================================================================
-* Name : SimLockUIApplication.h
-* Part of : Sim Lock UI Application
-* Description : SimLock UI Application header
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-#ifndef __SIMLOCKUI_APPLICATION_H__
-#define __SIMLOCKUI_APPLICATION_H__
-
-#include <aknapp.h> // CAknApplication
-
-/**
- * CSimLockUIApplication
- * Sim Lock UI Application class.
- *
- * An instance of CSimLockUIApplication is the application part of the AVKON
- * application framework for the SimLockUI example application
- *
- * @lib avkon.lib
- * @lib eikcore.lib
- * @lib eiksrv.lib
- */
-class CSimLockUIApplication : public CAknApplication
- {
-public: // from CAknApplication
-
- /**
- * From CAknApplication
- * Utility function to return the application's UID.
- *
- * @return Application's UID (KUidPDApplicationApp).
- */
- TUid AppDllUid() const;
-
-protected: // from CAknApplication
-
- /**
- * CreateDocumentL
- *
- * Create a CApaDocument object and return a pointer to it
- * @return a pointer to the created document
- */
- CApaDocument* CreateDocumentL();
- };
-
-#endif // __SIMLOCKUI_APPLICATION_H__
-
-// end of file.
--- a/securitydialogs/simlockui/inc/SimLockUIAppui.h Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,231 +0,0 @@
-/*
-* ============================================================================
-* Name : SimLockUIAppUI.h
-* Part of : Sim Lock UI Application
-* Description : SimLock UI Application UI Header
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-#ifndef __SIMLOCKUI_APPUI_H__
-#define __SIMLOCKUI_APPUI_H__
-
-// System includes
-#include <aknappui.h>
-#include <aknnotedialog.h> // CAknNoteDialog::TTone
-#include <e32property.h> // RProperty.
-
-
-// FORWARD DECLARATIONS
-class RProperty;
-// User includes
-#include "SimLockUIBackgroundControl.h" // CSimLockUIBackgroundControl::TBackgroundText
-
-// Forward reference
-class CSimLockUIBackgroundControl;
-class CSimLockDataHandlingDelegate;
-class CAknInformationNote;
-class CSimLockTelephonyProxy;
-
-//const TUid KSimLockProperty={0x2000B0FC};
-/**
- * CSimLockUIAppUi
- *
- * An instance of class CSimLockUIAppUi is the UserInterface part of the AVKON
- * application framework for the SimLockUI example application
- *
- * @lib avkon.lib
- * @lib eikcore.lib
- * @lib eiksrv.lib
- */
-class CSimLockUIAppUi : public CAknAppUi
- {
-public: // Constructor/Destructor
-
- /**
- * CSimLockUIAppUi
- * Perform the first phase of two phase construction.
- * This needs to be public due to the way the framework constructs the AppUi
- *
- * @param aSimLockDelegate Sim Lock UI Delegate (ownership not transferred)
- */
- CSimLockUIAppUi( CSimLockDataHandlingDelegate& aSimLockDelegate );
-
- /**
- * ConstructL
- * Perform the second phase construction of a CSimLockUIAppUi object
- * this needs to be public due to the way the framework constructs the AppUi
- */
- void ConstructL();
-
- /**
- * ~CSimLockUIAppUi
- * Destroy the object and release all memory objects
- */
- virtual ~CSimLockUIAppUi();
-
-private: // Private Data Type(s)
-
- /**
- * Indicate which background text to use
- */
- enum TBackgroundText
- {
- EBackgroundTextEmpty,
- EBackgroundTextMain,
- EBackgroundTextUnlockComplete,
- EBackgroundTextUnlockFailed,
- EBackgroundTextUnlockIncorrect
- };
-
-private: // from CAknAppUi
- /**
- * @see CAknAppUi::HandleCommandL
- */
- virtual void HandleCommandL( TInt aCommand );
-
- /**
- * @see CAknAppUi::HandleForegroundEventL
- */
- virtual void HandleForegroundEventL( TBool aForeground );
-
-private: // Private Function Declarations
-
- /**
- * ProcessSimUnlockDialogsL
- * Process the series of dialogs that control the Sim Unlock process
- *
- * @return Indicates whether or not application flow should continue
- */
- TBool ProcessSimUnlockDialogsL();
-
- /**
- * CreateBackgroundControlL
- * Create the background control for SimLock UI. Background contains the default
- * background image for the current skin and text indicating to the user the
- * current stage in the unlock process.
- *
- */
- void CreateBackgroundControlL();
-
- /**
- * CheckLockStateL
- * Check the state of the lock and display a dialog if it is either
- * unlocked or there are no lock attempts remaining.
- *
- * @return Indicates whether or not application flow should continue
- */
- TBool CheckLockStateL() const;
-
- /**
- * DisplayIntroductionDialogL
- * Display introduction dialog
- *
- * @return Indicates whether or not application flow should continue
- */
- TBool DisplayIntroductionDialogL();
-
- /**
- * PromptForPasswordL
- * Handle scenario where unlock attempt failed. Prompt user about whether or
- * not to continue
- *
- * @param aPassword Descriptor to receive password
- * @return Indicates whether or not application flow should continue
- */
- TBool PromptForPasswordL( TDes& aPassword );
-
- /**
- * CompletePromptForPasswordL
- * Ask for second password and check for call in progress
- *
- * @param aPassword original password entered
- * @param aNewPassword Descriptor where 2nd password is to be inserted
- * @return Indicates whether or not application flow should continue
- */
- TBool CompletePromptForPasswordL( const TDesC& aPassword, TDes& aNewPassword );
-
- /**
- * AttemptToUnlockSimL
- * Ask for second password and check for call in progress
- *
- * @param aPassword the Sim Lock password
- * @return Indicates whether or not application flow should continue
- */
- TBool AttemptToUnlockSimL( const TDesC& aPassword );
-
- /**
- * HandleUnlockFailedL
- * Handle scenario where unlock attempt failed. Prompt user about whether or
- * not to continue
- *
- * @return Indicates whether or not application flow should continue
- */
- TBool HandleUnlockFailedL();
-
- /**
- /**
- * ShowInformationNoteL
- * Show an information note
- *
- * @param aResourceId indicates what resource is displayed
- * @return Indicates whether or not application flow should continue
- */
- TInt ShowInformationNoteL( TInt aResourceId ) const;
-
- /**
- * SetBackgroundText
- * Change text in background control
- *
- * @param aText indicates type of text
- */
- void SetBackgroundTextL( TBackgroundText aText );
-
-private: // Private Member Data
-
- /**
- * Control that contains SimLock UI background
- * owns
- */
- CSimLockUIBackgroundControl* iBackgroundControl;
-
- /**
- * Pointer to "delegate" class that is responsible for non-UI functions related
- * to the phone and SimLock.
- */
- CSimLockDataHandlingDelegate& iSimLockDelegate;
-
- /**
- * For foreground event handling, indicate first time run
- */
- TBool iFirstRun;
-
- /**
- * Proxy used to talk to CTelephony in a synchronous fashion
- * owns
- */
- CSimLockTelephonyProxy* iTelephonyProxy;
-
- //RProperty for publish key
- RProperty iProperty;
-
- };
-
-
-#endif // __SIMLOCKUI_APPUI_H__
-
-// End of file.
--- a/securitydialogs/simlockui/inc/SimLockUIBackgroundControl.h Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
-* ============================================================================
-* Name : SimLockUIBackgroundControl.h
-* Part of : Sim Lock UI Application
-* Description : SimLock UI Background Control Header
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-#ifndef __SIMLOCKUI_BACKGROUNDCONTROL_H__
-#define __SIMLOCKUI_BACKGROUNDCONTROL_H__
-
-// System includes
-#include <e32base.h>
-#include <coecntrl.h> // CCoeControl
-
-// Forward declarations
-class CAknsBasicBackgroundControlContext;
-class CGraphicsContext;
-
-/**
- * CSimLockUIBackgroundControl
- *
- * A CCoeControl object that represents the application background.
- *
- * @lib cone.lib
- * @lib aknskins.lib
- * @lib aknskinsrv.lib
- * @lib aknswallpaperutils.lib
- */
-class CSimLockUIBackgroundControl : public CCoeControl
- {
-public: // Public Constructors
-
- /**
- * NewL
- * Create a CSimLockUIBackgroundControl object, which will draw itself to aRect
- *
- * @param aRect the rectangle this view will be drawn to
- * @return a pointer to the created instance of CSimLockUIBackgroundControl
- */
- static CSimLockUIBackgroundControl* NewL( const TRect& aRect );
-
- /**
- * NewLC
- * Create a CSimLockUIBackgroundControl object, which will draw itself to aRect
- *
- * @param aRect the rectangle this view will be drawn to
- * @return a pointer to the created instance of CSimLockUIBackgroundControl
- */
- static CSimLockUIBackgroundControl* NewLC( const TRect& aRect );
-
-
- /**
- * ~CSimLockUIBackgroundControl
- * Destroy the object and release all memory objects
- */
- virtual ~CSimLockUIBackgroundControl();
-
-public: // Public API
-
- /**
- * SetBackgroundText
- * Set the background text
- *
- * @param aText new background text( ownership passed )
- */
- void SetBackgroundText( HBufC* aText );
-
-private: // Private Consructors
-
- /**
- * ConstructL
- * Perform the second phase construction of a CSimLockUIBackgroundControl object
- *
- * @param aRect the rectangle this view will be drawn to
- */
- void ConstructL( const TRect& aRect );
-
-private: // From CCoeControl
-
- /**
- * SizeChanged
- * Indicate that the control has been resized
- */
- virtual void SizeChanged();
-
- /**
- * Draw
- * Draw this CSimLockUIBackgroundControl to the screen
- *
- * @param aRect the rectangle of this view that needs updating
- */
- virtual void Draw( const TRect& aRect ) const;
-
- /**
- * MopSupplyObject
- * Retrieves an object of the same type as that encapsulated in aId.
- *
- * @param aId type of object to retrieve
- */
- virtual TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
-
-private: // Private Member API
-
- /**
- * DisplayText
- * Called by Draw() to display the appropriate background text
- *
- * @param aGc graphics context which draws the text
- */
- void DisplayText( CGraphicsContext& aGc ) const;
-
-private: // Member data
-
- /**
- * Control which represents the background image
- * owns
- */
- CAknsBasicBackgroundControlContext* iBackgroundSkinContext;
-
- /**
- * Text to display on background pane
- * owns
- */
- HBufC* iDisplayText;
- };
-
-
-#endif // __SIMLOCKUI_BACKGROUNDCONTROL_H__
-
-// End of file.
-
--- a/securitydialogs/simlockui/inc/SimLockUIDocument.h Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +0,0 @@
-/*
-* ============================================================================
-* Name : SimLockUIDocument.h
-* Part of : Sim Lock UI Application
-* Description : Create session to ETel and owns SimLock UI Delegate
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-#ifndef __SIMLOCKUI_DOCUMENT_H__
-#define __SIMLOCKUI_DOCUMENT_H__
-
-// INCLUDES
-#include <akndoc.h>
-#include <RMmCustomAPI.h> // RMmCustomAPI, RTelServer, RMobilePhone
-
-// CONSTANTS
-
-// MACROS
-
-// DATA TYPES
-
-// FUNCTION PROTOTYPES
-
-// FORWARD DECLARATIONS
-
-class CSimLockUIAppUi;
-class CEikApplication;
-class CSimLockDataHandlingDelegate;
-
-
-/**
- * CSimLockUIDocument
- * An instance of class CSimLockUIDocument is the Document part of the AVKON
- * application framework for the SimLockUI example application
- *
- * @lib avkon.lib
- * @lib eikcore.lib
- * @lib eiksrv.lib
- */
-class CSimLockUIDocument : public CAknDocument
- {
-public: // Public Constructors/Destructor
-
- /**
- * NewL
- * Construct a CSimLockUIDocument for the AVKON application aApp
- * using two phase construction, and return a pointer to the created object
- * @param aApp application creating this document
- * @return a pointer to the created instance of CSimLockUIDocument
- */
- static CSimLockUIDocument* NewL( CEikApplication& aApp );
-
- /**
- * NewLC
- * Construct a CSimLockUIDocument for the AVKON application aApp
- * using two phase construction, and return a pointer to the created object,
- * leaving an instance on the Cleanup Stack.
- *
- * @param aApp application creating this document
- * @return a pointer to the created instance of CSimLockUIDocument
- */
- static CSimLockUIDocument* NewLC( CEikApplication& aApp );
-
- /**
- * ~CSimLockUIDocument
- * Destroy the object and release all memory objects
- */
- virtual ~CSimLockUIDocument();
-
-public: // from CAknDocument
-
- /**
- * CreateAppUiL
- * Create a CSimLockUIAppUi object and return a pointer to it
- *
- * @return a pointer to the created instance of the AppUi created
- */
- virtual CEikAppUi* CreateAppUiL();
-
-private: // Private Constructors
-
- /**
- * ConstructL
- * Perform the second phase construction of a CSimLockUIDocument object
- */
- void ConstructL();
-
- /**
- * CSimLockUIDocument
- * Perform the first phase of two phase construction
- *
- * @param aApp application creating this document
- */
- CSimLockUIDocument( CEikApplication& aApp );
-
-
-private: // Member Data
-
- /**
- * Handle to ETel Server
- */
- RTelServer iServer;
-
- /**
- * Handle to ETel Mobile Phone Object
- */
- RMobilePhone iPhone;
-
- /**
- * Handle to ETel Custom API Object
- */
- RMmCustomAPI iCustomPhone;
-
- /**
- * Handle to Sim Lock Delegate
- * owns
- */
- CSimLockDataHandlingDelegate* iSimLockDelegate;
- };
-
-
-#endif // __SIMLOCKUI_DOCUMENT_H__
-
-// end of file.
-
--- a/securitydialogs/simlockui/inc/SimLockUiKeys.h Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* ============================================================================
-* Name : SimLockUIKeys.h
-* Part of : Sim Lock UI Application
-* Description : SimLock P&S keys
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-#ifndef __SIMLOCKUI_KEYS_H__
-#define __SIMLOCKUI_KEYS_H__
-
-// System includes
-#include <aknappui.h>
-#include <aknnotedialog.h> // CAknNoteDialog::TTone
-#include <e32property.h> // RProperty.
-
-
-// FORWARD DECLARATIONS
-class RProperty;
-const TUid KSimLockProperty={0x10003b21};
-
-
-enum TSimLockPropertyKeys { ESimLockProperty, ESimLockActiveStatus };
-
-/**
- *0: Default value
- *1: Indicates that "function" is done
-*/
-enum TSimLockActiveStatus
- {
- KSimLockStatusUnknown = 0,
- KSimLockStatusDone
- };
-
-#endif // __SIMLOCKUI_KEYS_H__
-
-// End of file.
--- a/securitydialogs/simlockui/rom/simlockui.iby Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* ============================================================================
-* Name : simlockui.iby
-* Part of : SimLock UI
-* Description : SimLock UI iby file
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-
-
-#ifndef _SIMLOCKUI_IBY_
-#define _SIMLOCKUI_IBY_
-
-#include <data_caging_paths_for_iby.hrh>
-#ifdef FF_SIMLOCKD_UI
-// Definitions for applications with a UI
-S60_APP_EXE( SimLockUI )
-S60_APP_AIF_RSC( SimLockUI )
-
-#endif // FF_SIMLOCK_UI
-
-#endif // _SIMLOCKUI_IBY_
--- a/securitydialogs/simlockui/rom/simlockui_resources.iby Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* ============================================================================
-* Name : simlockui_resources.iby
-* Part of : SimLock UI
-* Description : SimLock UI resources iby file
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-#ifndef _SIMLOCKUI_RESOURCES_IBY_
-#define _SIMLOCKUI_RESOURCES_IBY_
-
-#include <data_caging_paths_for_iby.hrh>
-#ifdef FF_SIMLOCKD_UI
-S60_APP_RESOURCE( SimLockUI )
-#endif // FF_SIMLOCK_UI
-
-#endif // _SIMLOCKUI_RESOURCES_IBY_
--- a/securitydialogs/simlockui/src/SimLockDataHandlingDelegate.cpp Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,175 +0,0 @@
-/*
-* ============================================================================
-* Name : SimLockDataHandlingDelegate.cpp
-* Part of : Sim Lock UI Application
-* Description : Implementation of Sim Lock UI Application
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-// System Include Files
-#include <RMmCustomAPI.h> // RMmCustomAPI, RMobilePhone
-
-// User Include Files
-#include "SimLockDataHandlingDelegate.h"
-#include "SimLockUI.pan"
-#include "SimLockISAServerDefinitions.h"
-
-
-TInt KSimLockTimeoutDelay = 5000000; // 5 seconds
-
-// ===========================================================================
-// PUBLIC CONSTRUCTORS
-// ===========================================================================
-
-// ---------------------------------------------------------------------------
-// CSimLockDataHandlingDelegate::NewL
-// ---------------------------------------------------------------------------
-CSimLockDataHandlingDelegate* CSimLockDataHandlingDelegate::NewL( RMmCustomAPI& aCustomAPI )
- {
- CSimLockDataHandlingDelegate* self = new ( ELeave ) CSimLockDataHandlingDelegate( aCustomAPI );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockDataHandlingDelegate::~CSimLockDataHandlingDelegate
-// ---------------------------------------------------------------------------
-CSimLockDataHandlingDelegate::~CSimLockDataHandlingDelegate()
- {
- Cancel();
- delete iTimer;
- delete iSchedulerWait;
- }
-
-// ===========================================================================
-// PUBLIC MEMBER FUNCTIONS
-// ===========================================================================
-
-// ---------------------------------------------------------------------------
-// CSimLockDataHandlingDelegate::OpenSimLock
-// ---------------------------------------------------------------------------
-TInt CSimLockDataHandlingDelegate::OpenSimLock( const TDesC& aPassword )
- {
- // Use ETel custom API to deactive SimLock
- return iCustomAPI.DeActivateSimLock( aPassword, RMmCustomAPI::EOperator );
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockDataHandlingDelegate::IsSimLockOpen
-// ---------------------------------------------------------------------------
-TBool CSimLockDataHandlingDelegate::IsSimLockOpen() const
- {
-
- ASSERT( iDataHasBeenRead );
-
- return iLockIsOpen;
- }
-
-
-// ===========================================================================
-// PRIVATE CONSTRUCTORS
-// ===========================================================================
-
-// ---------------------------------------------------------------------------
-// CSimLockDataHandlingDelegate::CSimLockDataHandlingDelegate
-// ---------------------------------------------------------------------------
-CSimLockDataHandlingDelegate::CSimLockDataHandlingDelegate( RMmCustomAPI& aCustomAPI )
-: CActive( EPriorityStandard ),
- iCustomAPI( aCustomAPI )
- { //lint !e1403 iIndicators initialized in CBase ctor
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockDataHandlingDelegate::ConstructL
-// ---------------------------------------------------------------------------
-void CSimLockDataHandlingDelegate::ConstructL()
- {
- CActiveScheduler::Add(this);
- iSchedulerWait = new ( ELeave ) CActiveSchedulerWait;
- iTimer = CPeriodic::NewL(EPriorityHigh);
- }
-
-// ===========================================================================
-// PRIVATE MEMBER FUNCTIONS
-// ===========================================================================
-
-// ---------------------------------------------------------------------------
-// CSimLockDataHandlingDelegate::RunL
-// ---------------------------------------------------------------------------
-void CSimLockDataHandlingDelegate::RunL()
- {
-
- // Stop the current run sequence
- iSchedulerWait->AsyncStop();
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockDataHandlingDelegate::DoCancel
-// ---------------------------------------------------------------------------
-void CSimLockDataHandlingDelegate::DoCancel()
- {
-
- // Cancel timer
- iTimer->Cancel();
-
- // Stop the current run sequence so we can continue execution in a
- // synchronous fashion
- iSchedulerWait->AsyncStop();
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockTelephonyProxy::TimerElapsed
-// ---------------------------------------------------------------------------
-TInt CSimLockDataHandlingDelegate::TimerElapsed(TAny* /*aUnused*/)
- {
- // Some request did not complete while reading Sim Lock data.
- // This is not expected, so Panic.
- Panic( ESimLockUIUnableToReadSimLock );
-
- return 0;
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockDataHandlingDelegate::CompleteRequestWithTimeout
-// ---------------------------------------------------------------------------
-void CSimLockDataHandlingDelegate::CompleteRequestWithTimeout()
- {
-
- ASSERT( ! iTimer->IsActive() );
-
- if ( ! iTimer->IsActive() )
- {
- iTimer->Cancel();
- }
-
- // Start timer with KSimLockProxyTimeout to protect against requests that
- // do not complete for some reason.
- iTimer->Start(KSimLockTimeoutDelay,0,TCallBack(&TimerElapsed));
-
- SetActive();
-
- // Wait for request to complete. Response time is expected to be negligible.
- iSchedulerWait->Start();
- iTimer->Cancel();
- }
-
-
-// end of file.
-
--- a/securitydialogs/simlockui/src/SimLockTelephonyProxy.cpp Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* ============================================================================
-* Name : SimLockTelephonyProxy.cpp
-* Part of : Sim Lock UI Telephony Proxy
-* Description : Wrap asynchronous calls to Core Telephony
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-// System Includes
-#include <Etel3rdParty.h> // CTelephony
-
-// User Includes
-#include "SimLockTelephonyProxy.h"
-#include "SimLockUi.pan"
-
-
-TInt KSimLockProxyTimeout = 5000000; // 5 seconds
-
-// ---------------------------------------------------------------------------
-// CSimLockDataHandlingDelegate::NewL
-// ---------------------------------------------------------------------------
-CSimLockTelephonyProxy* CSimLockTelephonyProxy::NewL()
- {
- CSimLockTelephonyProxy* self = new ( ELeave ) CSimLockTelephonyProxy();
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockTelephonyProxy::CSimLockTelephonyProxy
-// ---------------------------------------------------------------------------
-CSimLockTelephonyProxy::~CSimLockTelephonyProxy()
- {
- Cancel();
- delete iTelephony;
- delete iSchedulerWait;
- delete iTimer;
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockTelephonyProxy::IsCallInProgress
-// ---------------------------------------------------------------------------
-TBool CSimLockTelephonyProxy::IsCallInProgress()
- {
- iTelephony->GetIndicator( iStatus, iIndicatorPackage );
- CompleteRequestWithTimeout();
-
- if ( iStatus != KErrNone )
- {
- // If there is an error obtaining status, assume no call in progress
- }
- else if ( iIndicators.iIndicator & CTelephony::KIndCallInProgress )
- {
- return ETrue;
- }
-
- return EFalse;
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockTelephonyProxy::RunL
-// ---------------------------------------------------------------------------
-void CSimLockTelephonyProxy::RunL()
- {
- // Stop the current run sequence so we can continue execution in a
- // synchronous fashion
- iSchedulerWait->AsyncStop();
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockTelephonyProxy::DoCancel
-// ---------------------------------------------------------------------------
-void CSimLockTelephonyProxy::DoCancel()
- {
- // Cancel outstanding request
- iTelephony->CancelAsync( CTelephony::EGetIndicatorCancel );
- iSchedulerWait->AsyncStop();
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockTelephonyProxy::CSimLockTelephonyProxy
-// ---------------------------------------------------------------------------
-CSimLockTelephonyProxy::CSimLockTelephonyProxy()
- : CActive( EPriorityStandard ),
- iIndicatorPackage( iIndicators )
- {
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockTelephonyProxy::ConstructL
-// ---------------------------------------------------------------------------
-void CSimLockTelephonyProxy::ConstructL()
- {
- CActiveScheduler::Add( this );
- iSchedulerWait = new ( ELeave ) CActiveSchedulerWait;
- iTelephony = CTelephony::NewL();
- iTimer = CPeriodic::NewL(EPriorityHigh);
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockTelephonyProxy::TimerElapsed
-// ---------------------------------------------------------------------------
-TInt CSimLockTelephonyProxy::TimerElapsed(TAny* aClientObject)
- {
- CSimLockTelephonyProxy* clientObject = static_cast<CSimLockTelephonyProxy*>(aClientObject);
-
- // Timeout timer has elapsed. An asynchronous request timed out.
- ASSERT(0);
-
- // Cancel original request
- clientObject->Cancel();
- return 0;
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockTelephonyProxy::CompleteRequestWithTimeout
-// ---------------------------------------------------------------------------
-void CSimLockTelephonyProxy::CompleteRequestWithTimeout()
- {
-
- if ( iTimer->IsActive() )
- {
- ASSERT(0);
- iTimer->Cancel();
- }
-
- // Start timer with KSimLockProxyTimeout to protect against requests that
- // do not complete for some reason.
- iTimer->Start(KSimLockProxyTimeout,0,TCallBack(&TimerElapsed, this));
-
- SetActive();
-
- // Wait for request to complete. Response time is expected to be negligible.
- iSchedulerWait->Start();
-
- iTimer->Cancel();
- }
-
-// end of file
-
--- a/securitydialogs/simlockui/src/SimLockUI.cpp Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* ============================================================================
-* Name : SimLockUI.cpp
-* Part of : Sim Lock UI Application
-* Description : Sim Lock UI App framework code
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-// System Includes
-#include <eikstart.h>
-
-// User Includes
-#include "SimLockUIApplication.h"
-
-// ---------------------------------------------------------------------------
-// NewApplication
-// ---------------------------------------------------------------------------
-CApaApplication* NewApplication()
- {
- // Create an application, and return a pointer to it
- return new CSimLockUIApplication;
- }
-
-// ---------------------------------------------------------------------------
-// E32Main
-// ---------------------------------------------------------------------------
-TInt E32Main()
- {
- return EikStart::RunApplication( NewApplication );
- }
-
-// End of file
-
-
--- a/securitydialogs/simlockui/src/SimLockUIApplication.cpp Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* ============================================================================
-* Name : SimLockUIApplication.cpp
-* Part of : Sim Lock UI Application
-* Description : Implementation of Sim Lock UI Application UI Methods
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-// User include files
-#include "SimLockUIDocument.h"
-#include "SimLockUIApplication.h"
-#include "SimLockUI.hrh"
-
-// UID for the application, this should correspond to the uid defined in the mmp file
-static const TUid KUidSimLockUIApp = {SIMLOCK_UI_UID3};
-
-// ---------------------------------------------------------------------------
-// CSimLockUIApplication::CreateDocumentL
-// ---------------------------------------------------------------------------
-CApaDocument* CSimLockUIApplication::CreateDocumentL()
- {
- // Create an SimLockUI document, and return a pointer to it
- CApaDocument* document = CSimLockUIDocument::NewL( *this );
- return document;
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIApplication::AppDllUid
-// ---------------------------------------------------------------------------
-TUid CSimLockUIApplication::AppDllUid() const
- {
- // Return the UID for the SimLockUI application
- return KUidSimLockUIApp;
- }
-
-// End of file
-
--- a/securitydialogs/simlockui/src/SimLockUIAppui.cpp Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,417 +0,0 @@
-/*
- * ============================================================================
- * Name : SimLockUIAppUi.cpp
- * Part of : Sim Lock UI Application
- * Description : Implementation of Sim Lock UI Application UI Methods
- * Version :
- *
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-// Platform Includes
-#include <avkon.hrh>
-#include <aknnotewrappers.h> // CAknNoteDialog
-#include <stringloader.h> // StringLoader
-#include <exterror.h> // KErrGsm0707OperationNotAllowed
-#include <eikspane.h> // CEikStatusPane
-#include <aknmessagequerydialog.h> // CAknMessageQueryDialog
-#include <e32base.h>
-#include <e32property.h> //Rproperty
-// Local Includes
-#include "SimLockISAServerDefinitions.h"
-#include "SimLockUI.pan"
-#include "SimLockUIAppUi.h"
-#include "SimLockUIBackgroundControl.h"
-#include "SimLockUI.hrh"
-#include "SimLockDataHandlingDelegate.h"
-#include "SimLockTelephonyProxy.h"
-#include "SimLockUiKeys.h"
-
-// Resource Includes
-#include <SimLockUI.rsg>
-
-// ---------------------------------------------------------------------------
-// CSimLockUIAppUi::CSimLockUIAppUi
-// ---------------------------------------------------------------------------
-CSimLockUIAppUi::CSimLockUIAppUi(
- CSimLockDataHandlingDelegate& aSimLockDelegate) :
- iSimLockDelegate(aSimLockDelegate), iFirstRun(ETrue)
- {
- // no implementation required
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIAppUi::ConstructL
-// ---------------------------------------------------------------------------
-void CSimLockUIAppUi::ConstructL()
- {
- BaseConstructL(EAknEnableSkin | EAknEnableMSK);
-
- // Used to get status of phone call
- iTelephonyProxy = CSimLockTelephonyProxy::NewL();
- //Define RProperty to Publish Keys for SimLockUi
- TInt ret = RProperty::Define(KSimLockProperty, ESimLockActiveStatus,
- RProperty::EInt);
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIAppUi::~CSimLockUIAppUi
-// ---------------------------------------------------------------------------
-CSimLockUIAppUi::~CSimLockUIAppUi()
- {
-
- delete iTelephonyProxy;
-
- if (iBackgroundControl)
- {
- RemoveFromStack(iBackgroundControl);
- delete iBackgroundControl;
- }
- //Sets SimLock Ui P&S keys to show that SimLock Ui is exiting
- RProperty::Set(KSimLockProperty, ESimLockActiveStatus, KSimLockStatusDone);
-
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIAppUi::HandleCommandL
-// ---------------------------------------------------------------------------
-void CSimLockUIAppUi::HandleCommandL(TInt aCommand)
- {
- switch (aCommand)
- {
- case EEikCmdExit:
- case EAknSoftkeyExit:
- Exit();
- break;
-
- default:
- Panic(ESimLockUIBasicUi);
- break;
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIAppUi::HandleForegroundEventL
-// ---------------------------------------------------------------------------
-void CSimLockUIAppUi::HandleForegroundEventL(TBool aForeground)
- {
- CAknAppUi::HandleForegroundEventL(aForeground);
-
- // When the app switches to the foreground for the first time, display
- // series of dialogs.
- if (aForeground && iFirstRun)
- {
- iFirstRun = EFalse;
- ProcessSimUnlockDialogsL();
- PrepareToExit();
- Exit();
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIAppUi::ProcessSimUnlockDialogsL
-// ---------------------------------------------------------------------------
-TBool CSimLockUIAppUi::ProcessSimUnlockDialogsL()
- {
- TBool keepLooping = ETrue;
-
- TBuf<SEC_ATT_PASSWORD_MAX_BUFFER> password;
-
- // Loop until flag is set
- do
- {
- // Create background if not already there
- if (!iBackgroundControl)
- {
- CreateBackgroundControlL();
- }
- // Display Introduction Dialog/Prompt
- if (!DisplayIntroductionDialogL())
- {
- return EFalse;
- }
- // Prompt for password and attempt to unlock Sim
- if (!PromptForPasswordL(password))
- {
- // skip next iteration
- continue;
- }
- // Set only if no dialogs are ever dismissed
- keepLooping = AttemptToUnlockSimL(password);
-
- // Continue to loop while indicated to start over and dialog
- // has not been dismissed
- }
- while (keepLooping);
-
- return keepLooping;
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIAppUi::CreateBackgroundControlL
-// ---------------------------------------------------------------------------
-void CSimLockUIAppUi::CreateBackgroundControlL()
- {
- CEikStatusPane* statusPane = StatusPane();
-
- // Remove status pane
- // Crop background pane to reveal idle status pane
- TRect background = ClientRect();
- statusPane->ReduceRect(background);
- statusPane->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_EMPTY);
-
- iBackgroundControl = CSimLockUIBackgroundControl::NewL(background);
- AddToStackL(iBackgroundControl);
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIAppUi::DisplayIntroductionDialogL
-// ---------------------------------------------------------------------------
-TBool CSimLockUIAppUi::DisplayIntroductionDialogL()
- {
- SetBackgroundTextL(EBackgroundTextEmpty);
-
- HBufC* displayText = StringLoader::LoadLC(R_SIM_INFO_WELCOME_NOTE_TEXT);
- CAknMessageQueryDialog* query = new (ELeave) CAknMessageQueryDialog(
- CAknMessageQueryDialog::ENoTone);
- CleanupStack::PushL(query);
- query->SetMessageTextL(*displayText);
- TInt executeResult = query->ExecuteLD(R_SIM_INFO_WELCOME_NOTE);
- CleanupStack::Pop(query);
- CleanupStack::PopAndDestroy(displayText);
- return executeResult;
-
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIAppUi::PromptForPasswordL
-// ---------------------------------------------------------------------------
-TBool CSimLockUIAppUi::PromptForPasswordL(TDes& aPassword)
- {
- TBuf<SEC_ATT_PASSWORD_MAX_BUFFER> newPassword;
-
- // Prompt for password twice. Loop until passwords match.
- do
- {
- aPassword.Zero();
-
- // Ask for password
- CAknTextQueryDialog* dialog = CAknTextQueryDialog::NewL(aPassword);
- // dialog->SetMaxLength(SEC_ATT_PASSWORD_MAX_LENGTH);
-
- if (!dialog->ExecuteLD(R_SIM_INFO_ENTER_PASSWORD))
- {
- return EFalse;
- }
-
- // Ask to re-enter password and verify there is no call in progress
- if (!CompletePromptForPasswordL(aPassword, newPassword))
- {
- return EFalse;
- }
- }
- while (newPassword.Compare(aPassword));
-
- return ETrue;
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIAppUi::CompletePromptForPasswordL
-// ---------------------------------------------------------------------------
-TBool CSimLockUIAppUi::CompletePromptForPasswordL(const TDesC& aPassword,
- TDes& aNewPassword)
- {
- TBool callInProgress = EFalse;
-
- aNewPassword.Zero();
-
- do // Loop until no call in progress
- {
- // Display dialog to ask to re-enter password
- CAknTextQueryDialog* dialog = CAknTextQueryDialog::NewL(aNewPassword);
- if (!dialog->ExecuteLD(R_SIM_INFO_REENTER_PASSWORD))
- {
- return EFalse;
- }
-
- // Check to see if passwords match
- if (aNewPassword.Compare(aPassword))
- {
- // Create message query dialog to indicate that codes do not match
- CAknMessageQueryDialog* query =
- new (ELeave) CAknMessageQueryDialog(
- CAknMessageQueryDialog::ENoTone);
- return query->ExecuteLD(R_SIM_INFO_CODES_NOT_MATCH);
- }
-
- // If there is a call in progress, show note and return to "re-enter password" prompt
- if (!iTelephonyProxy->IsCallInProgress())
- {
- return ETrue;
- }
-
- // Do not allow Sim unlocking, return to password prompt
- ShowInformationNoteL(R_SIM_UNLOCK_MESSAGE_END_CALL);
- callInProgress = ETrue;
- }
- while (callInProgress);
-
- return ETrue;
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIAppUi::AttemptToUnlockSimL
-// ---------------------------------------------------------------------------
-TBool CSimLockUIAppUi::AttemptToUnlockSimL(const TDesC& aPassword)
- {
-
-const TDesC& password = aPassword;
-
-#ifdef __WINS__
- // In WINS (Emulator) builds, call to OpenSimLock will just time out
- TInt unlockResult = KErrGsm0707IncorrectPassword;
-#else
- // Attempt to unlock SIM
- TInt unlockResult = iSimLockDelegate.OpenSimLock( password );
-#endif
-
- CAknMessageQueryDialog* query = new (ELeave) CAknMessageQueryDialog(
- CAknMessageQueryDialog::ENoTone);
-
- switch (unlockResult)
- {
- case KErrAlreadyExists:
- // Should not happen! This indicates that the phone was already unlocked,
- // which it shouldn't be if we got this far.
- ASSERT( 0 );
-
- // Fall Through
-
- case KErrNone:
- SetBackgroundTextL(EBackgroundTextUnlockComplete);
- ShowInformationNoteL(R_SIM_PHONE_UNLOCKED);
- return EFalse;
-
- default:
- // Oops, we missed one.
- ASSERT( 0 );
- case KErrGsm0707OperationNotAllowed:
- case KErrLocked:
- // Permanently locked
- SetBackgroundTextL(EBackgroundTextEmpty);
- query->ExecuteLD(R_SIM_UNLOCK_FINAL);
- return EFalse;
- case KErrTimedOut:
- case KErrGeneral:
- case KErrArgument:
- case KErrGsm0707IncorrectPassword:
- // Not permanently locked
- return HandleUnlockFailedL();
-
-
- }//switch
- }
-// ---------------------------------------------------------------------------
-// CSimLockUIAppUi::HandleUnlockFailedL
-// ---------------------------------------------------------------------------
-TBool CSimLockUIAppUi::HandleUnlockFailedL()
- {
- TBuf<SEC_ATT_PASSWORD_MAX_BUFFER> password;
- // Otherwise, prompt user to try again
- SetBackgroundTextL(EBackgroundTextEmpty);
-
- // Show "Code Incorrect" and prompt user to continue or not
- CAknMessageQueryDialog* query = new (ELeave) CAknMessageQueryDialog(
- CAknMessageQueryDialog::ENoTone);
- if (query->ExecuteLD(R_SIM_INFO_CODE_INCORRECT))
- {
- if ( PromptForPasswordL(password) )
- {
- return AttemptToUnlockSimL(password);
- }
- else
- {
- // Set flag indicating to keep looping
- return ETrue;
- }
- }
- else
- {
- // display intro popup
- return ETrue;
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIAppUi::ShowInformationNoteL
-// ---------------------------------------------------------------------------
-TInt CSimLockUIAppUi::ShowInformationNoteL(TInt aResourceId) const
- {
- TInt executeResult;
-
- // Show note with the provided resource id
- HBufC* displayText = StringLoader::LoadLC(aResourceId);
-
- CAknInformationNote* dialog = new (ELeave) CAknInformationNote(ETrue);
- executeResult = dialog->ExecuteLD(*displayText);
- CleanupStack::PopAndDestroy(displayText);
- return executeResult;
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIAppUi::SetBackgroundTextL
-// ---------------------------------------------------------------------------
-void CSimLockUIAppUi::SetBackgroundTextL(TBackgroundText aText)
- {
- HBufC* displayText = NULL;
-
- // Load resource and set text in background control based on provided info
- switch (aText)
- {
- case EBackgroundTextEmpty:
- displayText = KNullDesC().AllocL();
- break;
-
- case EBackgroundTextMain:
- displayText = StringLoader::LoadL(
- R_SIMLOCK_UI_BACKGROUND_TEXT_MAIN);
- break;
-
- case EBackgroundTextUnlockComplete:
- displayText = StringLoader::LoadL(
- R_SIMLOCK_UI_BACKGROUND_TEXT_UNLOCK_COMPLETE);
- break;
-
- case EBackgroundTextUnlockFailed:
- displayText = StringLoader::LoadL(
- R_SIMLOCK_UI_BACKGROUND_TEXT_UNLOCK_FAILED);
- break;
-
- case EBackgroundTextUnlockIncorrect:
- displayText = StringLoader::LoadL(
- R_SIMLOCK_UI_BACKGROUND_TEXT_UNLOCK_INCORRECT);
- break;
-
- default:
- ASSERT( 0 );
- break;
- }
-
- // Transfer ownership to iBackgroundControl
- iBackgroundControl->SetBackgroundText(displayText);
- }
-
-// End of file.
--- a/securitydialogs/simlockui/src/SimLockUIBackgroundControl.cpp Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-/*
-* ============================================================================
-* Name : SimLockUIBackgroundControl.cpp
-* Part of : Sim Lock UI Application
-* Description : Implementation of Sim Lock UI Background
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-* ============================================================================
-*/
-
-
-// System Includes
-#include <coemain.h>
-#include <aknsdrawutils.h> // AknsDrawUtils
-#include <aknsskininstance.h> // MAknsSkinInstance
-#include <aknscontrolcontext.h> // MAknsControlContext
-#include <aknsbasicbackgroundcontrolcontext.h> // CAknsBasicBackgroundControlContext
-#include <AknLayoutScalable_Avkon.cdl.h> // AknLayoutScalable_Avkon
-#include <aknutils.h> // AknsUtils
-
-// User Includes
-#include "SimLockUIBackgroundControl.h"
-#include "SimLockISAServerDefinitions.h"
-#include <SimLockUI.rsg>
-
-static const TInt KSkinLayoutOption = 2;
-
-// ---------------------------------------------------------------------------
-// CSimLockUIBackgroundControl::NewL
-// ---------------------------------------------------------------------------
-CSimLockUIBackgroundControl* CSimLockUIBackgroundControl::NewL( const TRect& aRect )
- {
- CSimLockUIBackgroundControl* self = CSimLockUIBackgroundControl::NewLC( aRect );
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIBackgroundControl::NewLC
-// ---------------------------------------------------------------------------
-CSimLockUIBackgroundControl* CSimLockUIBackgroundControl::NewLC( const TRect& aRect )
- {
- CSimLockUIBackgroundControl* self = new ( ELeave ) CSimLockUIBackgroundControl;
- CleanupStack::PushL( self );
- self->ConstructL( aRect );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIBackgroundControl::~CSimLockUIBackgroundControl
-// ---------------------------------------------------------------------------
-CSimLockUIBackgroundControl::~CSimLockUIBackgroundControl()
- {
- delete iBackgroundSkinContext;
- delete iDisplayText;
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIBackgroundControl::SetBackgroundText
-// ---------------------------------------------------------------------------
-void CSimLockUIBackgroundControl::SetBackgroundText( HBufC* aText )
- {
- delete iDisplayText;
-
- iDisplayText = aText;
-
- DrawDeferred();
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIBackgroundControl::ConstructL
-// ---------------------------------------------------------------------------
-void CSimLockUIBackgroundControl::ConstructL( const TRect& aRect )
- {
- // Create a window for this application view
- CreateWindowL();
-
- iBackgroundSkinContext = CAknsBasicBackgroundControlContext::NewL(
- KAknsIIDQsnBgAreaMain, aRect, EFalse );
-
- // Set the windows size
- SetRect( aRect );
-
- // Activate the window, which makes it ready to be drawn
- ActivateL();
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIBackgroundControl::SizeChanged
-// ---------------------------------------------------------------------------
-void CSimLockUIBackgroundControl::SizeChanged()
- {
- // Background skin.
- iBackgroundSkinContext->SetRect( Rect() );
- }
-
-
-// ---------------------------------------------------------------------------
-// CSimLockUIBackgroundControl::Draw
-// ---------------------------------------------------------------------------
-void CSimLockUIBackgroundControl::Draw( const TRect& /*aRect*/ ) const
- {
- // Draw background skin
- CWindowGc& graphicsContext = SystemGc();
- MAknsSkinInstance* skin = AknsUtils::SkinInstance();
- MAknsControlContext* controlContext = AknsDrawUtils::ControlContext( this );
- AknsDrawUtils::Background( skin, controlContext, this, graphicsContext, Rect() );
-
- // Draw background text
- DisplayText( graphicsContext );
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIBackgroundControl::MopSupplyObject
-// ---------------------------------------------------------------------------
-TTypeUid::Ptr CSimLockUIBackgroundControl::MopSupplyObject( TTypeUid aId )
- {
- if ( aId.iUid == MAknsControlContext::ETypeId )
- {
- // Return the background skin object
- return MAknsControlContext::SupplyMopObject( aId, iBackgroundSkinContext );
- }
-
- return CCoeControl::MopSupplyObject( aId );
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIBackgroundControl::DisplayText
-// ---------------------------------------------------------------------------
-void CSimLockUIBackgroundControl::DisplayText( CGraphicsContext& aGc ) const
- {
- if ( iDisplayText )
- {
- // Set up text and layout
- TAknLayoutText line;
- TAknTextLineLayout layout = AknLayoutScalable_Avkon::main_pane_empty_t1( KSkinLayoutOption ).LayoutLine();
-
- line.LayoutText( Rect(), layout );
-
- // Get color from skin instance.
- TRgb color( line.Color() );
-
- if ( AknsUtils::AvkonSkinEnabled() )
- {
- TRgb skinColor;
-
- MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-
- TInt err = AknsUtils::GetCachedColor( skin,
- skinColor,
- KAknsIIDQsnTextColors,
- EAknsCIQsnTextColorsCG6 );
- if ( err == KErrNone )
- {
- color = skinColor;
- }
- }
-
- // Actually display the text
- line.DrawText( aGc, *iDisplayText, ETrue, color );
- }
- }
-
-// End of file.
-
--- a/securitydialogs/simlockui/src/SimLockUIDocument.cpp Tue Feb 02 00:44:34 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
-* ============================================================================
-* Name : SimLockUIDocument.cpp
-* Part of : Sim Lock UI Application
-* Description : Implementation of Sim Lock UI Application
-* Version :
-*
-* 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"
-* 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: Build info file for Ado domain appinstall
-*
-* ============================================================================
-*/
-
-// System Include Files
-#include <RMmCustomAPI.h> // RMmCustomAPI, RMobilePhone
-#include <MmTsy_names.h> // KMmTsyModuleName
-#include <RMmCustomAPI.h>
-
-// User Include Files
-#include "SimLockDataHandlingDelegate.h"
-#include "SimLockISAServerDefinitions.h"
-#include "SimLockUIAppUi.h"
-#include "SimLockUIDocument.h"
-
-// Local Constants
-const TInt KTriesToConnectServer( 2 );
-const TInt KTimeBeforeRetryingServerConnection( 50000 );
-static const TInt KPhoneInfoIndex( 0 );
-
-
-// ---------------------------------------------------------------------------
-// CSimLockUIDocument::NewL
-// ---------------------------------------------------------------------------
-CSimLockUIDocument* CSimLockUIDocument::NewL( CEikApplication& aApp )
- {
- CSimLockUIDocument* self = NewLC( aApp );
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIDocument::NewLC
-// ---------------------------------------------------------------------------
-CSimLockUIDocument* CSimLockUIDocument::NewLC( CEikApplication& aApp )
- {
- CSimLockUIDocument* self = new ( ELeave ) CSimLockUIDocument( aApp );
- CleanupStack::PushL( self );
- self->ConstructL();
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIDocument::~CSimLockUIDocument
-// ---------------------------------------------------------------------------
-CSimLockUIDocument::~CSimLockUIDocument()
- {
- // Close phone
- if ( iPhone.SubSessionHandle() )
- {
- iPhone.Close();
- }
-
- // Close custom phone
- if ( iCustomPhone.SubSessionHandle() )
- {
- iCustomPhone.Close();
- }
-
- // Close ETel connection
- if ( iServer.Handle() )
- {
- iServer.UnloadPhoneModule( KMmTsyModuleName );
- iServer.Close();
- }
-
- // Delete simlock delegate
- delete iSimLockDelegate;
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIDocument::CreateAppUiL
-// ---------------------------------------------------------------------------
-CEikAppUi* CSimLockUIDocument::CreateAppUiL()
- {
- // Create the application user interface, and return a pointer to it,
- // the framework takes ownership of this object
- CEikAppUi* appUi = new(ELeave)CSimLockUIAppUi( *iSimLockDelegate );
- return appUi;
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIDocument::ConstructL
-// ---------------------------------------------------------------------------
-void CSimLockUIDocument::ConstructL()
- {
- RTelServer::TPhoneInfo phoneInfo;
-
- TInt error( KErrGeneral );
-
- // Connect to ETel server
- // All server connections are tried to be made KTriesToConnectServer times because occasional
- // fails on connections are possible, at least on some servers.
- for ( TInt thisTry=0; thisTry<KTriesToConnectServer; thisTry++ )
- {
- error = iServer.Connect();
- if ( error == KErrNone )
- {
- break;
- }
-
- // Very small delay. Does not have negative impact on UI. Justifiable as workaround
- // for potential failure.
- User::After( KTimeBeforeRetryingServerConnection );
- }
- User::LeaveIfError( error );
-
- // load TSY module
- error = iServer.LoadPhoneModule( KMmTsyModuleName );
- if ( error != KErrAlreadyExists )
- {
- // May also return KErrAlreadyExists if something else
- // has already loaded the TSY module. And that is
- // not an error.
- User::LeaveIfError( error );
- }
-
- // Set TSY paramaters and open RPhone handle, then RMobilePhone handle
- User::LeaveIfError( iServer.SetExtendedErrorGranularity( RTelServer::EErrorExtended ) );
- User::LeaveIfError( iServer.GetPhoneInfo( KPhoneInfoIndex, phoneInfo ) );
- User::LeaveIfError( iPhone.Open( iServer, phoneInfo.iName ) );
- User::LeaveIfError( iCustomPhone.Open( iPhone ) );
-
- // Create SimLock Data Handling Delegate
- iSimLockDelegate = CSimLockDataHandlingDelegate::NewL( iCustomPhone );
- }
-
-// ---------------------------------------------------------------------------
-// CSimLockUIDocument::CSimLockUIDocument
-// ---------------------------------------------------------------------------
-CSimLockUIDocument::CSimLockUIDocument( CEikApplication& aApp )
- : CAknDocument( aApp )
- {
- // no implementation required
- }
-
-// end of file.
-
--- a/wim/Scard/src/ScardAccessControl.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/wim/Scard/src/ScardAccessControl.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2003-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"
@@ -693,7 +693,7 @@
EFileLoggingModeAppend,
_L( "CScardAccessControl::InitialiseReader: Opening Reader\n" ) );
#endif
- iReader->Open( iStatus );
+ iReader->OpenAsync( iStatus );
}
#ifdef _DEBUG
else
--- a/wim/SwimReader/inc/SwimLauncher.h Tue Feb 02 00:44:34 2010 +0200
+++ b/wim/SwimReader/inc/SwimLauncher.h Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2003-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"
@@ -29,7 +29,7 @@
* @lib SwimReader.lib
* @since Series60 2.1
*/
-class CSwimReaderLauncher : public MScardReaderLauncher, public CBase
+class CSwimReaderLauncher : public MScardReaderLauncher, public CBase
{
public: // Constructors and destructor
--- a/wim/SwimReader/inc/SwimReaderIF.h Tue Feb 02 00:44:34 2010 +0200
+++ b/wim/SwimReader/inc/SwimReaderIF.h Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2003-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"
@@ -105,9 +105,9 @@
/**
* Open connection to Etel server
* @param aStatus TRequestStatus
- * @return void
- */
- void Open( TRequestStatus& aStatus );
+ * @return void
+ */
+ void OpenAsync( TRequestStatus& aStatus );
/**
* Send a CommandAPDU on a slot and return ResponseAPDU from slot
--- a/wim/SwimReader/src/SwimReaderIF.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/wim/SwimReader/src/SwimReaderIF.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2003-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"
@@ -215,13 +215,13 @@
}
// -----------------------------------------------------------------------------
-// CSwimReaderIF::Open
+// CSwimReaderIF::OpenAsync
// Uses CSwimReader::WakeUpL to initialize a connection to the ETEL server.
// -----------------------------------------------------------------------------
//
-void CSwimReaderIF::Open( TRequestStatus& aStatus )
+void CSwimReaderIF::OpenAsync( TRequestStatus& aStatus )
{
- _WIMTRACE(_L("WIM|SwimReader|CSwimReaderIF::Open|Begin"));
+ _WIMTRACE(_L("WIM|SwimReader|CSwimReaderIF::OpenAsync|Begin"));
iClientStatus = &aStatus;
aStatus = KRequestPending;
--- a/wim/WimClient/inc/WimSecModule.h Tue Feb 02 00:44:34 2010 +0200
+++ b/wim/WimClient/inc/WimSecModule.h Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-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"
@@ -183,10 +183,10 @@
TInt GetWIMInfoL();
/**
- * Handles cleanup for an object which is not derived from CBase
- * @param aObject -object to be cleaned up
+ * Handles cleanup for an TPinAddress array allocated using new[].
+ * @param aObject - TPinAddress list to be cleaned up
*/
- static void Cleanup( TAny* aObject );
+ static void CleanupPinAddressList( TAny* aObject );
/**
* Converts serialnumber to 8-bit form. Conversion reads
--- a/wim/WimClient/src/WimCert.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/wim/WimClient/src/WimCert.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-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"
@@ -330,10 +330,8 @@
else
{
TCertificateAddressList certRefLst =
- new( ELeave ) TCertificateAddress[iCertCount];
-
- CleanupStack::PushL( TCleanupItem( CleanupRefLst,
- certRefLst ) );
+ new( ELeave ) TCertificateAddress[ iCertCount ];
+ CleanupStack::PushL( TCleanupItem( CleanupRefLst, certRefLst ) );
TWimCertInfo* certInfoArr = new( ELeave )
TWimCertInfo[iCertCount];
@@ -681,13 +679,14 @@
// -----------------------------------------------------------------------------
// CWimCert::CleanupRefLst()
-// Handles cleanup for an object which is not derived from CBase
+// Handles cleanup of an TCertificateAddressList array
// -----------------------------------------------------------------------------
//
void CWimCert::CleanupRefLst( TAny* aObject )
{
_WIMTRACE ( _L( "CWimCert::CleanupRefLst()" ) );
- delete[] aObject;
+ TCertificateAddressList* certRefLst = static_cast< TCertificateAddressList* >( aObject );
+ delete[] certRefLst;
aObject = NULL;
}
--- a/wim/WimClient/src/WimSecModule.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/wim/WimClient/src/WimSecModule.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-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"
@@ -481,8 +481,8 @@
if ( pinCount )
{
- TPinAddress* pinLst = new( ELeave ) TPinAddress[pinCount];
- CleanupStack::PushL( TCleanupItem( Cleanup, pinLst ) );
+ TPinAddress* pinLst = new( ELeave ) TPinAddress[ pinCount ];
+ CleanupStack::PushL( TCleanupItem( CleanupPinAddressList, pinLst ) );
status = iClientSession->PINRefs( iReference, iPinLstAddr, pinLst,
( TText8 )pinCount );
@@ -549,9 +549,8 @@
if ( pinCount )
{
- TPinAddress* pinLst = new( ELeave ) TPinAddress[pinCount];
-
- CleanupStack::PushL( TCleanupItem( Cleanup, pinLst ) );
+ TPinAddress* pinLst = new( ELeave ) TPinAddress[ pinCount ];
+ CleanupStack::PushL( TCleanupItem( CleanupPinAddressList, pinLst ) );
status = iClientSession->PINRefs( iReference, iPinLstAddr, pinLst,
( TText8 )pinCount );
@@ -610,14 +609,15 @@
// -----------------------------------------------------------------------------
-// CWimSecModule::Cleanup()
-// Handles cleanup for an object which is not derived from CBase
+// CWimSecModule::CleanupPinAddressList()
+// Handles cleanup of an TPinAddress array
// -----------------------------------------------------------------------------
//
-void CWimSecModule::Cleanup( TAny* aObject )
+void CWimSecModule::CleanupPinAddressList( TAny* aObject )
{
_WIMTRACE ( _L( "CWimSecModule::Cleanup()" ) );
- delete aObject;
+ TPinAddress* pinLst = static_cast< TPinAddress* >( aObject );
+ delete[] pinLst;
aObject = NULL;
}
--- a/wim/WimServer/inc/WimCertHandler.h Tue Feb 02 00:44:34 2010 +0200
+++ b/wim/WimServer/inc/WimCertHandler.h Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-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"
@@ -31,33 +31,33 @@
/**
* Class for handling certificates in WIM card
-*
+*
* @since Series60 2.1
*/
class CWimCertHandler : public CBase
{
public: // Constructors and destructor
-
+
/**
* Two-phased constructor.
*/
static CWimCertHandler* NewL();
-
+
/**
* Destructor.
*/
virtual ~CWimCertHandler();
public: // New functions
-
+
/**
* Fetches certificates from WIM card.
* @param aMessage Encapsulates a client request.
* @param aWimMgmt Pointer to WIM reference management class.
*/
- void GetCertificatesFromWimL( const RMessage2& aMessage,
+ void GetCertificatesFromWimL( const RMessage2& aMessage,
CWimMemMgmt* aWimMgmt );
-
+
/**
* Fetches certificate extra information from WIM card.
* Extra information includes trusted usage and CDF referense
@@ -65,23 +65,23 @@
* @param aMessage Encapsulates a client request.
* @param aWimMgmt Pointer to WIM reference management class.
*/
- void GetExtrasFromWimL( const RMessage2& aMessage,
+ void GetExtrasFromWimL( const RMessage2& aMessage,
CWimMemMgmt* aWimMgmt );
-
+
/**
* Fetches count of certicates in certain WIM card.
* @param aMessage Encapsulates a client request.
* @param aWimMgmt Pointer to WIM reference management class.
*/
- void GetCerticateCountL( const RMessage2& aMessage,
+ void GetCerticateCountL( const RMessage2& aMessage,
CWimMemMgmt* aWimMgmt ) const;
/**
* Stores certificate to the WIM card.
* @since Series60 2.6
- * @param aRequest Enumerator used in message
- passing between client and server.
+ * @param aRequest Enumerator used in message
+ passing between client and server.
* @param aMessage Encapsulates a client request.
*/
void StoreCertificateL( TWimServRqst aRequest,
@@ -95,11 +95,11 @@
*/
void RemoveCertificateL( const RMessage2& aMessage,
CWimMemMgmt* aWimMgmt ) const;
-
+
/**
* Fetches certificate details.
- * @param aOpCode Enumerator used in message
- passing between client and server.
+ * @param aOpCode Enumerator used in message
+ passing between client and server.
* @param aMessage Encapsulates a client request.
*/
void GetCertificateDetailsL( TWimServRqst aOpCode,
@@ -111,14 +111,14 @@
* @param aMessage Encapsulates a client request.
*/
void ExportPublicKeyL( const RMessage2& aMessage ) const;
-
-
+
+
TBool SanityCheck( TUint32 aCertRef );
-
+
TBool CheckReadCapsForUsage( const RMessage2& aMsg,
TUint8 aUsage );
-
-
+
+
WIMI_STAT ResolveCertUsage( const RMessage2& aMsg,
TUint8& aUsage );
@@ -143,7 +143,7 @@
TInt8 aUsage,
TUint8& aCertNum,
TUint32* aCertRefLst,
- TWimCertInfo* aCertInfoLst,
+ TWimCertInfo* aCertInfoLst,
const RMessage2& aMessage );
/**
@@ -154,7 +154,7 @@
* @return TInt KErrNone or KErrArgument
*/
TInt CopyCertificateInfo( TWimCertInfo& aCertInfo,
- WIMI_Ref_t* aCert,
+ WIMI_Ref_t* aCert,
const RMessage2& aMessage );
/**
@@ -165,7 +165,7 @@
* @param aMessage Encapsulates a client request.
* @return Status returned by WIMI. See in WimClsv.h.
*/
- WIMI_STAT GetExtrasFromWimRefL( WIMI_Ref_t* aTmpWimRef,
+ WIMI_STAT GetExtrasFromWimRefL( WIMI_Ref_t* aTmpWimRef,
TInt8 aUsage,
TDesC8& aKeyHash,
const RMessage2& aMessage );
@@ -187,8 +187,8 @@
* @param aUsage Certificate usage.
* @return Status returned by WIMI. See in wimclsv.h.
*/
- WIMI_STAT GetCertificateCountByWIM( WIMI_Ref_t* aRef,
- TUint8& aCertCount,
+ WIMI_STAT GetCertificateCountByWIM( WIMI_Ref_t* aRef,
+ TUint8& aCertCount,
TUint8 aUsage ) const;
/**
@@ -202,6 +202,13 @@
TDes8& aPublicKey,
const TUint8 aCertType ) const;
+ /**
+ * Returns WIM reference. Returns WIM ref cached in aWimMgmt, or
+ * fetches new using WIMI_GetWIMRef() and caches it in aWimMgmt.
+ * @since Serier60 5.2
+ * @param aWimMgmt WIM memory manager
+ */
+ WIMI_Ref_t* MainWimRef( CWimMemMgmt& aWimMgmt ) const;
private: // Data
CWimUtilityFuncs* iWimUtilFuncs;
@@ -209,5 +216,5 @@
};
#endif // CWIMCERTHANDLER_H
-
+
//End of File
--- a/wim/WimServer/inc/WimServer.h Tue Feb 02 00:44:34 2010 +0200
+++ b/wim/WimServer/inc/WimServer.h Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2003-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"
@@ -137,20 +137,20 @@
* close.
*
* @lib
- * @since S60
+ * @since S60
*/
class CShutdown : public CTimer
- {
+ {
public:
-
+
inline CShutdown();
-
+
inline void ConstructL();
-
+
inline void Start();
-
+
private:
-
+
void RunL();
};
@@ -219,23 +219,26 @@
/**
* Initializes WIMI if not yet initialized.
* In initalization WIM data from card is fetched to WIMI.
+ * @param aMessage Client request, completed to return initialization status.
* @return void
*/
void WimInitialize( const RMessage2& aMessage );
-
+
/**
* Cancel Initializes WIMI if not yet initialized.
* Stop the apdu sending
+ * @param aMessage Client request, completed with KErrNone.
* @return void
*/
void CancelWimInitialize( const RMessage2& aMessage );
/**
* Set WimInitialized flag
- * @param aInitialized ETrue/EFalse whether WIM is initialized
+ * @param aInitialized ETrue/EFalse whether WIM is initialized
+ * @param aWimStatus KErrNone or other error code
* @return void
*/
- static void SetWimInitialized( TBool aInitialized, TInt aStatus );
+ static void SetWimInitialized( TBool aInitialized, TInt aWimStatus );
/**
* Get TrustSettingsStore pointer
@@ -276,17 +279,17 @@
* @param TBool Refresh event received from SAT.
*/
void SetRefreshNotificationReceived( TBool aValue );
-
+
/**
* Return the pointer of Timer
*/
CWimTimer* WimTimer();
-
+
/**
* Interface derived from MWimTimerListener
*/
void TimerExpired();
-
+
#ifdef WIMSERVER_SHUTDOWN
void AddSession();
@@ -421,7 +424,7 @@
// Pointer to CServer object
static CWimServer* iWimServer;
// Callback structure for WIMI
-
+
/**
* Current service is accessing physical token.
* Used to determine if SIM Refresh can be allowed.
@@ -444,13 +447,13 @@
*
*/
CWimBTSapObserver* iBTSapObserver;
-
- // Pointer to Timer. Owned
- CWimTimer* iWimTimer;
+
+ // Pointer to Timer. Owned
+ CWimTimer* iWimTimer;
-#ifdef WIMSERVER_SHUTDOWN
+#ifdef WIMSERVER_SHUTDOWN
CShutdown iShutdown;
-#endif
+#endif
};
#endif // CWIMSERVER_H
--- a/wim/WimServer/src/WimCertHandler.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/wim/WimServer/src/WimCertHandler.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-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"
@@ -68,7 +68,7 @@
// Two-phased constructor.
// -----------------------------------------------------------------------------
//
-CWimCertHandler* CWimCertHandler::NewL()
+CWimCertHandler* CWimCertHandler::NewL()
{
_WIMTRACE(_L("WIM | WIMServer | CWimCertHandler::NewL | Begin"));
CWimCertHandler* self = new( ELeave ) CWimCertHandler;
@@ -78,7 +78,7 @@
return self;
}
-
+
// Destructor
CWimCertHandler::~CWimCertHandler()
{
@@ -101,7 +101,7 @@
// -----------------------------------------------------------------------------
//
void CWimCertHandler::GetCertificatesFromWimL(
- const RMessage2& aMessage,
+ const RMessage2& aMessage,
CWimMemMgmt* aWimMgmt )
{
_WIMTRACE(_L("WIM | WIMServer | CWimCertHandler::GetCertificatesFromWimL | Begin"));
@@ -117,16 +117,12 @@
TUint32* pCertRefLst = ( TUint32* )( certRefLst->Des().Ptr() );
TWimCertInfo* pCertInfoLst = ( TWimCertInfo* )( certInfoLst->Des().Ptr() );
- temp = aWimMgmt->WimRef();
- if ( !temp )
- {
- temp = WIMI_GetWIMRef( 0 );
- aWimMgmt->SetWIMRef( temp ); // takes ownership
- }
+ __ASSERT_ALWAYS( aWimMgmt, User::Leave( KErrArgument ) );
+ temp = MainWimRef( *aWimMgmt );
if ( temp )
{
- if ( EWimEntryTypeAll == certEntryType ||
+ if ( EWimEntryTypeAll == certEntryType ||
EWimEntryTypeCA == certEntryType )
{
callStatus = GetCertificateFromWimRefL( temp, WIMI_CU_CA,
@@ -134,7 +130,7 @@
pCertInfoLst, aMessage );
}
- if ( callStatus == WIMI_Ok && ( EWimEntryTypeAll == certEntryType ||
+ if ( callStatus == WIMI_Ok && ( EWimEntryTypeAll == certEntryType ||
EWimEntryTypePersonal == certEntryType ) )
{
callStatus = GetCertificateFromWimRefL( temp, WIMI_CU_Client,
@@ -142,7 +138,7 @@
pCertInfoLst, aMessage );
}
-
+
//record the ref for sanity checking, deallocate old refs first
for( TInt index = 0; index < iCertRefLst.Count(); ++index )
{
@@ -157,7 +153,7 @@
_WIMTRACE2(_L("WIM | WIMServer | CWimCertHandler::GetCertificatesFromWimL, +ref 0x%08x"), pCertRefLst[ index ]);
iCertRefLst.AppendL( pCertRefLst[ index ] );
}
-
+
aMessage.WriteL( 0, certRefLst->Des() );
aMessage.WriteL( 1, certInfoLst->Des() );
}
@@ -185,13 +181,13 @@
_WIMTRACE(_L("WIM | WIMServer | CWimCertHandler::GetCertificateFromWimRefL | Begin"));
TUint8 tempCrtCount;
WIMI_RefList_t refList = NULL;
- WIMI_STAT callStatus = WIMI_Ok;
+ WIMI_STAT callStatus = WIMI_ERR_BadReference;
if ( aTmpWimRef )
{
- callStatus = WIMI_GetCertificateListByWIM( aTmpWimRef,
- aUsage,
- &tempCrtCount,
+ callStatus = WIMI_GetCertificateListByWIM( aTmpWimRef,
+ aUsage,
+ &tempCrtCount,
&refList );
if ( callStatus == WIMI_Ok )
@@ -218,8 +214,8 @@
free_WIMI_Ref_t( refList[certIndex] );
}
}
- //variable step is equal to the number of certificate in CDF whose
- //length is set as 0.
+ //variable step is equal to the number of certificate in CDF whose
+ //length is set as 0.
aCertNum = static_cast< TUint8 >( aCertNum + tempCrtCount - step );
// Because list items are moved to aCertRefLst, only refList array
@@ -255,7 +251,7 @@
TUint8 type;
TUint16 certLen;
TUint8 modifiable = 0;
- WIMI_STAT callStatus = WIMI_GetCertificateInfo(
+ WIMI_STAT callStatus = WIMI_GetCertificateInfo(
aCert,
&tempRef,
&ptLabel,
@@ -265,10 +261,10 @@
&ptTrustedUsage,
&uiCDFRefs,
&usage, /* 0 = client, 1 = CA */
- &type, /* WTLSCert(1),
- X509Cert(2),
- X968Cert(3),
- CertURL(4) */
+ &type, /* WTLSCert(1),
+ X509Cert(2),
+ X968Cert(3),
+ CertURL(4) */
&certLen, /* cert. content or URL length */
&modifiable );
@@ -289,7 +285,7 @@
}
// it is x509cert
- if ( type == 2 && certLen != 0 )
+ if ( type == WIMI_CT_X509 && certLen != 0 )
{
//use this rough sanity checking for temp
if ( certLen < 10 )
@@ -307,33 +303,33 @@
aCertInfo.iLabel.Copy(
TPtr8(
- ptLabel.pb_buf,
- ptLabel.ui_buf_length,
+ ptLabel.pb_buf,
+ ptLabel.ui_buf_length,
ptLabel.ui_buf_length ) );
aCertInfo.iKeyId.Copy(
TPtr8(
- ptKeyID.pb_buf,
- ptKeyID.ui_buf_length,
+ ptKeyID.pb_buf,
+ ptKeyID.ui_buf_length,
ptKeyID.ui_buf_length ) );
-
+
aCertInfo.iCAId.Copy(
TPtr8(
- ptCAID.pb_buf,
- ptCAID.ui_buf_length,
+ ptCAID.pb_buf,
+ ptCAID.ui_buf_length,
ptCAID.ui_buf_length ) );
-
+
aCertInfo.iIssuerHash.Copy(
TPtr8(
- ptIssuerHash.pb_buf,
- ptIssuerHash.ui_buf_length,
+ ptIssuerHash.pb_buf,
+ ptIssuerHash.ui_buf_length,
ptIssuerHash.ui_buf_length ) );
aCertInfo.iUsage = usage;
aCertInfo.iType = type;
aCertInfo.iCertlen = certLen;
aCertInfo.iModifiable = modifiable;
-
+
// Certificate location
aCertInfo.iCDFRefs = iWimUtilFuncs->MapCertLocation( uiCDFRefs );
@@ -357,23 +353,19 @@
// -----------------------------------------------------------------------------
//
void CWimCertHandler::GetExtrasFromWimL(
- const RMessage2& aMessage,
+ const RMessage2& aMessage,
CWimMemMgmt* aWimMgmt )
{
_WIMTRACE(_L("WIM | WIMServer | CWimCertHandler::GetExtrasFromWimL | Begin"));
WIMI_STAT callStatus = WIMI_Ok;
TInt8 certUsage = 0;
-
+
HBufC8* keyIdBuf = iWimUtilFuncs->DesLC( 0, aMessage );
TPtrC8 keyIdHash = keyIdBuf->Des();
- WIMI_Ref_t* wimTempRef = aWimMgmt->WimRef();
- if ( !wimTempRef )
- {
- wimTempRef = WIMI_GetWIMRef( 0 );
- aWimMgmt->SetWIMRef( wimTempRef ); // takes ownership
- }
+ __ASSERT_ALWAYS( aWimMgmt, User::Leave( KErrArgument ) );
+ WIMI_Ref_t* wimTempRef = MainWimRef( *aWimMgmt );
if ( wimTempRef )
{
@@ -427,7 +419,7 @@
const RMessage2& aMessage )
{
_WIMTRACE(_L("WIM | WIMServer | CWimCertHandler::GetExtrasFromWimRefL | Begin"));
-
+
TUint8 tempCertCount = 0;
WIMI_RefList_t certRefList = NULL;
WIMI_STAT callStatus = WIMI_Ok;
@@ -437,19 +429,20 @@
if ( aTmpWimRef )
{
// List all certificates (by WIM and usage)
- callStatus = WIMI_GetCertificateListByWIM( aTmpWimRef,
- aUsage,
- &tempCertCount,
+ callStatus = WIMI_GetCertificateListByWIM( aTmpWimRef,
+ aUsage,
+ &tempCertCount,
&certRefList );
}
else
{
callStatus = WIMI_ERR_BadReference;
}
- CleanupPushWimRefListL( certRefList );
-
+
if ( callStatus == WIMI_Ok )
{
+ CleanupPushWimRefListL( certRefList );
+
WIMI_Ref_t* tempRef = NULL;
WIMI_BinData_t ptLabel;
WIMI_BinData_t ptKeyID;
@@ -474,7 +467,7 @@
&ptTrustedUsage,
&uiCDFRefs,
&usage,
- &certType,
+ &certType,
&certLen,
&modifiable );
if ( callStatus == WIMI_Ok )
@@ -548,7 +541,7 @@
certExtraInfo.iCDFRefs = 0;
certExtraInfo.iTrustedUsage = NULL;
- WIMI_STAT callStatus = WIMI_GetCertificateInfo(
+ WIMI_STAT callStatus = WIMI_GetCertificateInfo(
aCert,
&tempref,
&ptLabel,
@@ -558,9 +551,9 @@
&ptTrustedUsage,
&uiCDFRefs,
&usage, /* 0 = client, 1 = CA */
- &type,
+ &type,
&certlen, /* cert. content or URL length */
- &modifiable);
+ &modifiable);
if ( callStatus == WIMI_Ok )
{
free_WIMI_Ref_t( tempref );
@@ -573,7 +566,7 @@
pushedItemCount++;
TPtrC8 undecodedUsage;
- undecodedUsage.Set( ptTrustedUsage.pb_buf );
+ undecodedUsage.Set( ptTrustedUsage.pb_buf );
if ( ptTrustedUsage.ui_buf_length == 0 ) // No OIDs
{
@@ -606,7 +599,7 @@
}
else // Not found OID from buffer
{
- found = EFalse;
+ found = EFalse;
CleanupStack::PopAndDestroy( decodedOIDs );
}
decodedOIDs = NULL;
@@ -633,7 +626,7 @@
pushedItemCount++;
trustedUsage.Set( trustedUsagesBuf->Des() );
-
+
// Add OID's to one buffer from separate buffers
for ( TInt i = 0; i < decodedOIDArray.Count(); i++ )
{
@@ -651,9 +644,9 @@
TPckgBuf<TCertExtrasInfo> wimCertExtraPckg( certExtraInfo );
aMessage.ReadL( 1, wimCertExtraPckg );
-
+
wimCertExtraPckg().iCDFRefs = iWimUtilFuncs->MapCertLocation( uiCDFRefs );
-
+
if ( oidsLength > 0 ) // OID's found, write buffer to client
{
aMessage.WriteL( 3, trustedUsage );
@@ -670,13 +663,13 @@
// -----------------------------------------------------------------------------
//
void CWimCertHandler::GetCerticateCountL(
- const RMessage2& aMessage,
+ const RMessage2& aMessage,
CWimMemMgmt* aWimMgmt ) const
{
_WIMTRACE(_L("WIM | WIMServer | CWimCertHandler::GetCerticateCountL | Begin"));
WIMI_STAT callStatus = WIMI_Ok;
TWimEntryType certEntryType = ( TWimEntryType )aMessage.Int1();
-
+
__ASSERT_ALWAYS( certEntryType != EWimEntryTypeAll ||
certEntryType != EWimEntryTypeCA ||
certEntryType != EWimEntryTypePersonal, User::Leave( KErrArgument ) );
@@ -684,28 +677,24 @@
WIMI_Ref_t* wimRef = NULL;
TUint8 certCount = 0;
- wimRef = aWimMgmt->WimRef();
- if ( !wimRef )
- {
- wimRef = WIMI_GetWIMRef( 0 );
- aWimMgmt->SetWIMRef( wimRef ); // takes ownership
- }
+ __ASSERT_ALWAYS( aWimMgmt, User::Leave( KErrArgument ) );
+ wimRef = MainWimRef( *aWimMgmt );
if ( wimRef )
{
- if ( EWimEntryTypeAll == certEntryType ||
+ if ( EWimEntryTypeAll == certEntryType ||
EWimEntryTypeCA == certEntryType )
{
- callStatus = GetCertificateCountByWIM( wimRef,
- certCount,
- WIMI_CU_CA );
+ callStatus = GetCertificateCountByWIM( wimRef,
+ certCount,
+ WIMI_CU_CA );
}
- if ( callStatus == WIMI_Ok && ( EWimEntryTypeAll == certEntryType ||
+ if ( callStatus == WIMI_Ok && ( EWimEntryTypeAll == certEntryType ||
EWimEntryTypePersonal == certEntryType ) )
{
- callStatus = GetCertificateCountByWIM( wimRef,
- certCount,
+ callStatus = GetCertificateCountByWIM( wimRef,
+ certCount,
WIMI_CU_Client );
}
}
@@ -730,25 +719,25 @@
// -----------------------------------------------------------------------------
//
WIMI_STAT CWimCertHandler::GetCertificateCountByWIM(
- WIMI_Ref_t* aRef,
- TUint8& aCertCount,
+ WIMI_Ref_t* aRef,
+ TUint8& aCertCount,
TUint8 aUsage ) const
{
_WIMTRACE(_L("WIM | WIMServer | CWimCertHandler::GetCertificateCountByWIM | Begin"));
-
+
// Get the number of certificates from smart card.
TUint8 certNum = 0;
WIMI_RefList_t refList ;
- WIMI_STAT callStatus = WIMI_GetCertificateListByWIM( aRef,
+ WIMI_STAT callStatus = WIMI_GetCertificateListByWIM( aRef,
aUsage,
- &certNum,
+ &certNum,
&refList );
- if ( callStatus != WIMI_Ok )
+ if ( callStatus != WIMI_Ok )
{
return callStatus;
}
-
+
// Find out how many certificate has zero length
TInt certLenZero = 0;
TInt certMalformat = 0;
@@ -765,7 +754,7 @@
TUint8 type;
TUint16 certLen;
TUint8 modifiable = 0;
- callStatus = WIMI_GetCertificateInfo(
+ callStatus = WIMI_GetCertificateInfo(
refList[i],
&tempRef,
&ptLabel,
@@ -775,24 +764,24 @@
&ptTrustedUsage,
&uiCDFRefs,
&usage, /* 0 = client, 1 = CA */
- &type, /* WTLSCert(1),
- X509Cert(2),
- X968Cert(3),
- CertURL(4) */
+ &type, /* WTLSCert(1),
+ X509Cert(2),
+ X968Cert(3),
+ CertURL(4) */
&certLen, /* cert. content or URL length */
&modifiable );
if ( callStatus == WIMI_Ok )
{
free_WIMI_Ref_t( tempRef );
-
+
if ( certLen == 0 )
{
certLenZero++;
}
// it is x509cert
- if ( type == 2 && certLen != 0 )
+ if ( type == WIMI_CT_X509 && certLen != 0 )
{
//use this rough sanity checking
@@ -826,7 +815,7 @@
// Stores certificate to the WIM card.
// -----------------------------------------------------------------------------
//
-void CWimCertHandler::StoreCertificateL(
+void CWimCertHandler::StoreCertificateL(
TWimServRqst /*aOpcode*/,
const RMessage2& aMessage ) const
{
@@ -839,7 +828,7 @@
// Removes certificate from a WIM card.
// -----------------------------------------------------------------------------
//
-void CWimCertHandler::RemoveCertificateL(
+void CWimCertHandler::RemoveCertificateL(
const RMessage2& aMessage,
CWimMemMgmt* /*aWimMgmt*/ ) const
{
@@ -858,7 +847,7 @@
{
return EFalse;
}
-
+
for ( TInt index = 0; index < certNum; ++index )
{
if( aCertRef == iCertRefLst[ index ] )
@@ -875,8 +864,8 @@
// -----------------------------------------------------------------------------
//
void CWimCertHandler::GetCertificateDetailsL(
- TWimServRqst aOpCode,
- const RMessage2& aMessage )
+ TWimServRqst aOpCode,
+ const RMessage2& aMessage )
{
_WIMTRACE(_L("WIM | WIMServer | CWimCertHandler::GetCertificateDetailsL | Begin"));
TBool IsOk = SanityCheck( (TUint32)aMessage.Ptr0() );
@@ -885,7 +874,7 @@
aMessage.Panic(_L("WIM"), KErrBadHandle );
return;
}
-
+
//capability checking
TUint8 usage = 255;
WIMI_STAT callStatus = ResolveCertUsage( aMessage, usage );
@@ -893,7 +882,7 @@
{
if( !CheckReadCapsForUsage( aMessage, usage ) )
{
- aMessage.Complete(KErrPermissionDenied);
+ aMessage.Complete(KErrPermissionDenied);
return;
}
}
@@ -926,7 +915,7 @@
_WIMTRACE(_L("CWimServer::ResolveCertUsage | Begin"));
// aMsg.Ptr0 contains reference to certificate
-
+
WIMI_Ref_pt pCertRef = const_cast< WIMI_Ref_pt >( aMsg.Ptr0() );
_WIMTRACE2(_L("CWimServer::ResolveCertUsage | Begin aMsg.Ptr0() = %d"), aMsg.Ptr0());
@@ -998,7 +987,7 @@
TUint8 aUsage )
{
TBool result = EFalse;
-
+
switch ( aUsage )
{
case WIMI_CU_CA:
@@ -1041,13 +1030,13 @@
//
void CWimCertHandler::ExportPublicKeyL( const RMessage2& aMessage ) const
{
- _WIMTRACE(_L("WIM | WIMServer | CWimPublicKeyHandler::ExportPublicKeyParamsL | Begin"));
+ _WIMTRACE(_L("WIM | WIMServer | CWimPublicKeyHandler::ExportPublicKeyL | Begin"));
TUint8 certType = 0;
TPckgBuf<TExportPublicKey> keyExportPckg;
aMessage.ReadL( 0, keyExportPckg );
-
+
HBufC8* publicKeyBuf = HBufC8::NewLC( KPublicKeyLength );
TBuf8<KKeyIdLen> keyIdBuf = keyExportPckg().iKeyId;
@@ -1118,7 +1107,7 @@
&ptTrustedUsage,
&uiCDFRefs,
&usage,
- &certType,
+ &certType,
&certLen,
&modifiable );
if ( callStatus == WIMI_Ok )
@@ -1142,7 +1131,7 @@
}
}
}
-
+
// Retrieve certificate data from WIM
if ( callStatus == WIMI_Ok )
{
@@ -1154,8 +1143,9 @@
TPtrC8 certPtr( ptCertData.pb_buf, ptCertData.ui_buf_length );
TPtr8 publicKeyPtr = publicKeyBuf->Des();
- TRAPD( parseOk, ParseCertPublicKeyL( certPtr, publicKeyPtr, certType ) );
- if ( parseOk )
+ TRAPD( parseError, ParseCertPublicKeyL( certPtr, publicKeyPtr, certType ) );
+ _WIMTRACE2(_L("WIM | WIMServer | CWimPublicKeyHandler::ExportPublicKeyL parseError %d"), parseError );
+ if ( !parseError )
{
aMessage.WriteL( 1, publicKeyPtr );
}
@@ -1167,13 +1157,15 @@
CleanupStack::PopAndDestroy( ptCertData.pb_buf );
}
}
-
+
CleanupStack::PopAndDestroy( certRefList );
}
CleanupStack::PopAndDestroy( publicKeyBuf );
+ _WIMTRACE2(_L("WIM | WIMServer | CWimPublicKeyHandler::ExportPublicKeyL callStatus %d"), callStatus);
aMessage.Complete( CWimUtilityFuncs::MapWIMError( callStatus ) );
+ _WIMTRACE(_L("WIM | WIMServer | CWimPublicKeyHandler::ExportPublicKeyL | End"));
}
// -----------------------------------------------------------------------------
@@ -1186,6 +1178,7 @@
TDes8& aPublicKey,
const TUint8 aCertType ) const
{
+ _WIMTRACE2(_L("WIM | WIMServer | CWimPublicKeyHandler::ParseCertPublicKeyL | Begin, type %d"), aCertType);
CCertificate* certificate = NULL;
CRSAPublicKey* publicKey = NULL;
@@ -1197,7 +1190,7 @@
publicKey = CWTLSRSAPublicKey::NewLC( certificate->PublicKey().KeyData() );
break;
}
-
+
case WIMI_CT_X509:
{
certificate = CX509Certificate::NewLC( aCertData );
@@ -1227,6 +1220,24 @@
encoded->WriteDERL( aPublicKey, pos );
CleanupStack::PopAndDestroy( 3, certificate ); // encoded, publicKey, certificate
+ _WIMTRACE(_L("WIM | WIMServer | CWimPublicKeyHandler::ParseCertPublicKeyL | End"));
}
+// -----------------------------------------------------------------------------
+// CWimCertHandler::MainWimRef()
+// Returns cached WIM ref using WIM memory manager
+// -----------------------------------------------------------------------------
+//
+WIMI_Ref_t* CWimCertHandler::MainWimRef( CWimMemMgmt& aWimMgmt ) const
+ {
+ WIMI_Ref_t* ref = aWimMgmt.WimRef();
+ if( !ref )
+ {
+ ref = WIMI_GetWIMRef( 0 );
+ aWimMgmt.SetWIMRef( ref ); // takes ownership
+ }
+ return ref;
+ }
+
+
// End of File
--- a/wim/WimServer/src/WimMemMgmt.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/wim/WimServer/src/WimMemMgmt.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-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"
@@ -61,7 +61,7 @@
CleanupStack::Pop( self );
return self;
}
-
+
// Destructor
CWimMemMgmt::~CWimMemMgmt()
{
@@ -185,7 +185,7 @@
void CWimMemMgmt::FreeWIMRefs( const RMessage2& aMessage )
{
_WIMTRACE(_L("WIM | WIMServer | CWimMemMgmt::FreeWIMRefsL | Begin"));
- TUint wimCount = aMessage.Int1();
+ TUint wimCount = aMessage.Int1();
WIMI_Ref_pt ref = reinterpret_cast< WIMI_Ref_pt >( aMessage.Int0() );
_WIMTRACE3(_L("WIM | WIMServer | CWimMemMgmt::FreeWIMRefsL | ref 0x%08x, wimCount %d"),
ref, wimCount);
@@ -193,7 +193,7 @@
for( TUint8 wimIndex = 0; wimIndex < wimCount; wimIndex++ )
{
_WIMTRACE2(_L("WIM | WIMServer | CWimMemMgmt::FreeWIMRefsL | index=%d"), wimIndex);
- FreeRef( ref ); // TODO: fix, now deallocating the same ref in each loop?
+ FreeRef( ref );
}
_WIMTRACE(_L("WIM | WIMServer | CWimMemMgmt::FreeWIMRefsL | End"));
@@ -225,7 +225,7 @@
}
}
_WIMTRACE(_L("WIM | WIMServer | CWimMemMgmt::FreeRefLst | not found") );
- aMessage.Complete( KErrNotFound );
+ aMessage.Complete( KErrNotFound );
}
// -----------------------------------------------------------------------------
@@ -239,7 +239,7 @@
for( TUint8 index = 0; index < count; index++ )
{
TWimiAllocRef* allocRef = iRefs[ index ];
- if( allocRef->ref == aRef )
+ if( allocRef && ( allocRef->ref == aRef ) )
{
_WIMTRACE(_L("WIM | WIMServer | CWimMemMgmt::ValidateWIMRefL, valid"));
return ETrue;
--- a/wim/WimServer/src/WimServer.cpp Tue Feb 02 00:44:34 2010 +0200
+++ b/wim/WimServer/src/WimServer.cpp Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2003-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"
@@ -38,7 +38,7 @@
#include <PSVariables.h> // Property values
#ifdef WIMSERVER_SHUTDOWN
-const TInt KServerShutdownDelay = 0x200000;
+const TInt KServerShutdownDelay = 0x200000;
#endif
// Initialize static variables. These variables are static because static
// callback functions in CWimCallBack.
@@ -60,23 +60,23 @@
_WIMTRACE(_L("WIM | WIMServer | StartServer | Enter"));
User::LeaveIfError( User::RenameThread( KWIMServerName ) );
_WIMTRACE(_L("WIM | WIMServer | StartServer | Create AS"));
-
+
CActiveScheduler* s = new(ELeave) CActiveScheduler;
- CleanupStack::PushL( s );
+ CleanupStack::PushL( s );
CActiveScheduler::Install( s );
-
+
_WIMTRACE(_L("WIM | WIMServer | StartServer | Create server"));
-
+
CWimServer::NewL();
-
+
_WIMTRACE(_L("WIM | WIMServer | StartServer | Notify client"));
// Notify Client that server has starter
- RProcess::Rendezvous( KErrNone );
+ RProcess::Rendezvous( KErrNone );
_WIMTRACE(_L("WIM | WIMServer | StartServer | Start ActiveScheduler"));
CActiveScheduler::Start();
-
+
CleanupStack::PopAndDestroy( s );
}
@@ -91,17 +91,17 @@
{
__UHEAP_MARK;
_WIMTRACE(_L("WIM | WIMServer | E32Main | Begin"));
-
+
CTrapCleanup* cleanup=CTrapCleanup::New();
TInt r=KErrNoMemory;
-
+
if ( cleanup )
{
TRAP( r, StartServerL() );
delete cleanup;
}
- _WIMTRACE(_L("WIM | WIMServer | E32Main Memory leak checking line"));
- __UHEAP_MARKEND;
+ _WIMTRACE(_L("WIM | WIMServer | E32Main Memory leak checking line"));
+ __UHEAP_MARKEND;
_WIMTRACE(_L("WIM | WIMServer | E32Main Memory checking passed"));
return r;
}
@@ -137,10 +137,10 @@
iWimSessionRegistry = CWimSessionRegistry::NewL();
iWimTrustSettingsStore = CWimTrustSettingsStore::NewL();
iWimTimer = CWimTimer::NewL( this );
-#ifdef WIMSERVER_SHUTDOWN
+#ifdef WIMSERVER_SHUTDOWN
iShutdown.ConstructL();
iShutdown.Start();
-#endif
+#endif
_WIMTRACE(_L("WIM | WIMServer | CWimServer::ConstructL | End"));
}
@@ -179,7 +179,7 @@
WIMI_CloseDownReq();
_WIMTRACE(_L("WIM | WIMServer | CWimServer::~CWimServer | WIMI_CloseDownReq"));
}
- //iWimTrustSettingsStore->CloseD();
+
delete iWimTrustSettingsStore;
delete iWimSessionRegistry;
delete iWimTimer;
@@ -272,14 +272,14 @@
// Set iWimInitialized flag
// -----------------------------------------------------------------------------
//
-void CWimServer::SetWimInitialized( TBool aInitialized, TInt aStatus )
+void CWimServer::SetWimInitialized( TBool aInitialized, TInt aWimStatus )
{
_WIMTRACE2(_L("WIM|WIMServer|CWimServer::SetWimInitialized|Value=%d"), aInitialized);
iWimInitialized = aInitialized;
if ( !aInitialized )
{
- iWimStatus = aStatus;
+ iWimStatus = aWimStatus;
}
}
@@ -348,11 +348,9 @@
void CWimServer::PanicServer( TWimServerPanic aPanic )
{
_WIMTRACE(_L("WIM | WIMServer | CWimServer::PanicServer | Begin"));
- // Set server state to EWimServerNotRunning
- TInt retVal = RProperty::Set( KUidSystemCategory,
- KWimServerUid.iUid,
- EWimServerNotRunning );
- retVal = retVal; // To prevent warning
+
+ // Set server state to EWimServerNotRunning.
+ (void)RProperty::Set( KUidSystemCategory, KWimServerUid.iUid, EWimServerNotRunning );
User::Panic( KWIMServerName, aPanic );
}
@@ -724,16 +722,16 @@
return callStatus;
}
free_WIMI_RefList_t( clicertRefList );
-
+
if ( clicertCount > 0 )
{
usage = WIMI_CU_Client;
- }
+ }
else
{
TUint8 cacertCount = 0;
WIMI_RefList_t cacertRefList = NULL;
-
+
callStatus = WIMI_GetCertificateListByKeyHash( ( TUint8* ) keyIdBuf.Ptr(),
WIMI_CU_CA,
&cacertCount,
@@ -753,7 +751,7 @@
aMsg.Complete( KErrBadHandle );
}
}
-
+
aUsage = static_cast< TUint8 >( usage );
_WIMTRACE2(_L("CWimServer::ResolveExportPublicReqL | End, heap=%d"),
@@ -919,7 +917,7 @@
// -----------------------------------------------------------------------------
// CWimServer::TimerExpired()
-// Interface derived from
+// Interface derived from MWimTimerListener
// -----------------------------------------------------------------------------
//
void CWimServer::TimerExpired()
@@ -928,18 +926,17 @@
WIMI_Ref_pt pWimRefTemp = NULL;
pWimRefTemp = WIMI_GetWIMRef( 0 );
-
+
if ( pWimRefTemp ) // Close the WIM
{
WIMI_CloseWIM( pWimRefTemp );
free_WIMI_Ref_t( pWimRefTemp );
}
- //SetWimInitialized( EFalse );
}
// -----------------------------------------------------------------------------
// CWimServer::WimTimer()
-// Return the pointer of Timer
+// Return the pointer of Timer
// -----------------------------------------------------------------------------
//
CWimTimer* CWimServer::WimTimer()
@@ -950,16 +947,16 @@
// -----------------------------------------------------------------------------
// CWimServer::CancelWimInitialize()
-// Cancel Wim Initialize
+// Cancel Wim Initialize
// -----------------------------------------------------------------------------
//
void CWimServer::CancelWimInitialize( const RMessage2& aMessage )
{
if ( !iWimInitialized )
{
- CWimCallBack::CancelWimInitialize();
+ CWimCallBack::CancelWimInitialize();
}
- aMessage.Complete( KErrNone );
+ aMessage.Complete( KErrNone );
}
--- a/wim/inc/ScardReader.h Tue Feb 02 00:44:34 2010 +0200
+++ b/wim/inc/ScardReader.h Fri Mar 19 09:41:08 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2003-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"
@@ -54,7 +54,7 @@
* @param aStatus Request status
* @return void
*/
- virtual void Open( TRequestStatus& aStatus ) = 0;
+ virtual void OpenAsync( TRequestStatus& aStatus ) = 0;
/**
* Closes the Card Reader. Implementations of this method must carry out