sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/testpinnotifierplugin.cpp
branchRCL_3
changeset 22 8cb079868133
parent 21 ccb4f6b3db21
--- a/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/testpinnotifierplugin.cpp	Tue Aug 31 16:29:05 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/test/tunitcustcmd/src/testpinnotifierplugin.cpp	Wed Sep 01 12:34:26 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -21,13 +21,13 @@
 
 #include "testpinnotifierplugin.h"
 #include <ssm/ssmuiproviderdll.h>
-#include <eikdialg.h>
+#include <techview/eikdialg.h>
 #include <testpinnotifier.rsg>
 #include <bautils.h>
 #include <eikenv.h>
 #include <uikon.hrh>
 #include <ecom/implementationproxy.h>
-#include <eikseced.h>
+#include <techview/eikseced.h>
 #include <e32property.h>
 
 const TUint KCustomcmdServerPropertyKey = 0x0012AC;
@@ -36,6 +36,8 @@
 _LIT(KPinNotifierResFileNameAndPath,"\\resource\\apps\\testpinnotifier.rsc");
 _LIT(KPinNotifierTitle,"Security Check");
 
+//Hardcoding security pin code.
+_LIT(KPinCode,","); 
 
 CArrayPtr<MEikSrvNotifierBase2>* NotifierArrayL()
 	{
@@ -67,12 +69,8 @@
 
 CSecurityPinNotifier::TNotifierInfo CSecurityPinNotifier::RegisterL()
 	{
-	const TUid KSecurityPinNotifierUid = {0x2000E667};
-	iInfo.iUid = KSecurityPinNotifierUid;
-
-	const TUid KScreenOutputChannel = {0x10009D48};	
-	iInfo.iChannel = KScreenOutputChannel;
-
+	iInfo.iUid = CSsmUiSpecific::SecurityPinNotifierUid();
+	iInfo.iChannel = CSsmUiSpecific::ScreenOutputChannelUid();
 	iInfo.iPriority = ENotifierPriorityVHigh;
 	return iInfo;
 	}
@@ -162,7 +160,19 @@
 	securityResultBuffer = KErrGeneral; 
 	if (iMessage != RMessagePtr2())
 		{
-   		securityResultBuffer = KErrNone;
+   		TBuf<5> newPINValueVerify;
+
+   		//Get pinter for the secret editor control
+   		CEikSecretEditor* pinEditor = static_cast<CEikSecretEditor*>(Control(0));
+   		pinEditor->GetText(newPINValueVerify);
+
+		//Verify the entered pin number
+		if(0 == newPINValueVerify.Compare(KPinCode))
+			{
+			securityResultBuffer = KErrNone;
+			}
+
+		pinEditor->Reset();	
 		iMessage.Write(iReplySlot,securityResultBuffer);
 		iMessage.Complete(KErrNone);	
 		// Set this swp to indicate to stop the active schaduler