--- a/securitydialogs/SecUi/Src/SecUiManualSecuritySettings.cpp Thu May 27 13:44:17 2010 +0300
+++ b/securitydialogs/SecUi/Src/SecUiManualSecuritySettings.cpp Fri Jun 11 14:28:40 2010 +0300
@@ -18,10 +18,11 @@
#include <rmmcustomapi.h>
-#include <SecUi.rsg>
+#include "SecQueryUi.h"
#include "secuimanualsecuritysettings.h"
#include "secuisecuritysettings.h"
#include <exterror.h>
+#include "SecUi.h"
#include "SecUiWait.h"
#include <mmtsy_names.h>
/*****************************************************
@@ -108,6 +109,7 @@
// May also return KErrAlreadyExists if something else
// has already loaded the TSY module. And that is
// not an error.
+ RDEBUG("err", err);
User::LeaveIfError( err );
}
@@ -133,15 +135,11 @@
* Series 60 Customer / TSY
* Needs customer TSY implementation
*****************************************************/
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::~CManualSecuritySettings()"));
- #endif
+ RDEBUG("0", 0);
// Cancel active requests
if(iWait->IsActive())
{
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::~CManualSecuritySettings() CANCEL REQ"));
- #endif
+ RDEBUG("CancelAsyncRequest", 0);
iPhone.CancelAsyncRequest(iWait->GetRequestType());
}
// close phone
@@ -158,9 +156,7 @@
}
delete iNote;
delete iWait;
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::~CManualSecuritySettings() END"));
- #endif
+ RDEBUG("0", 0);
}
//
@@ -175,14 +171,10 @@
* Series 60 Customer / ETel
* Series 60 ETel API
*****************************************************/
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::ChangePinL()"));
- #endif
+ RDEBUG("aPin", aPin);
if (aPin == EPin1)
{
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::ChangePinL() PIN1"));
- #endif
+ RDEBUG("EPin1", EPin1);
RMobilePhone::TMobilePhoneLock lockType;
RMobilePhone::TMobilePhoneLockInfoV1 lockInfo;
RMobilePhone::TMobilePhoneLockInfoV1Pckg lockInfoPkg(lockInfo);
@@ -193,13 +185,12 @@
// The following is required, since the new multimode Etel is asynchronous
// rather than synchronous.
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::ChangePinL() GetLockInfo"));
- #endif
-
+ RDEBUG("SetRequestType", EMobilePhoneGetLockInfo);
iWait->SetRequestType(EMobilePhoneGetLockInfo);
iPhone.GetLockInfo(iWait->iStatus, lockType, lockInfoPkg);
+ RDEBUG("WaitForRequestL", 0);
TInt res = iWait->WaitForRequestL();
+ RDEBUG("WaitForRequestL res", res);
if (res != KErrNone)
return EFalse;
@@ -211,9 +202,7 @@
}
}
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::ChangePinL() CompareF"));
- #endif
+ RDEBUG("CompareF", 0);
if (aNew.CompareF(aVerifyNew) != 0)
{
// codes do not match note
@@ -236,17 +225,13 @@
aChange.iOldPassword = aOld;
aChange.iNewPassword = aNew;
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::ChangePinL() ChangeSecurityCode"));
- #endif
+ RDEBUG("EMobilePhoneChangeSecurityCode", EMobilePhoneChangeSecurityCode);
iWait->SetRequestType(EMobilePhoneChangeSecurityCode);
iPhone.ChangeSecurityCode(iWait->iStatus,secCodeType,aChange);
+ RDEBUG("WaitForRequestL", 0);
TInt res = iWait->WaitForRequestL();
+ RDEBUG("WaitForRequestL res", res);
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::ChangePinL() ChangeSecurityCode RES: %d"), res);
- #endif
-
switch(res)
{
case KErrNone:
@@ -268,7 +253,9 @@
else
{
iCustomPhone.CheckSecurityCode(iWait->iStatus,RMmCustomAPI::ESecurityCodePuk2);
+ RDEBUG("WaitForRequestL", 0);
TInt res = iWait->WaitForRequestL();
+ RDEBUG("WaitForRequestL res", res);
}
break;
case KErrGsm0707OperationNotAllowed:
@@ -289,9 +276,7 @@
//
EXPORT_C void CManualSecuritySettings::CancelChangePin()
{
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::CancelChangePin()"));
- #endif
+ RDEBUG("0", 0);
delete iNote;
iNote = NULL;
}
@@ -307,9 +292,7 @@
* Series 60 Customer / ETel
* Series 60 ETel API
*****************************************************/
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::UnblockPinL()"));
- #endif
+ RDEBUG("0", 0);
if (aNew.CompareF(aVerifyNew) != 0)
{
// codes do not match note
@@ -327,10 +310,12 @@
{
blockCodeType = RMobilePhone::ESecurityCodePuk2;
}
-
+ RDEBUG("blockCodeType", blockCodeType);
iWait->SetRequestType(EMobilePhoneVerifySecurityCode);
iPhone.VerifySecurityCode(iWait->iStatus, blockCodeType, aNew, aPuk);
+ RDEBUG("WaitForRequestL", 0);
TInt res = iWait->WaitForRequestL();
+ RDEBUG("WaitForRequestL res", res);
switch(res)
{
@@ -369,9 +354,7 @@
//
EXPORT_C void CManualSecuritySettings::CancelUnblockPin()
{
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::CancelUnblockPinL()"));
- #endif
+ RDEBUG("0", 0);
delete iNote;
iNote = NULL;
}
@@ -387,20 +370,14 @@
* Series 60 Customer / ETel
* Series 60 ETel API
*****************************************************/
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::LockSimL()"));
- #endif
-
-
+ RDEBUG("0", 0);
RMmCustomAPI::TLockNumber aLockType;
TInt ret = KErrGsm0707IncorrectPassword;
TInt length = aLockCode.Length();
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::LockSimL(): Param length: %d"), length);
- #endif
-
- if(aLockCode.Length() <= KSimLockMaxPasswordSize)
+ RDEBUG("length", length);
+ // from now on, it accepts all lenghts, because some locks are 20, others are 13
+ // if(aLockCode.Length() <= KSimLockMaxPasswordSize)
{
if (aType.CompareF(Operator) == 0)
{
@@ -439,9 +416,7 @@
}
}
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::LockSimL() RESULT: %d"), ret);
- #endif
+ RDEBUG("ret", ret);
switch (ret)
{
case KErrNone:
@@ -476,9 +451,7 @@
//
EXPORT_C void CManualSecuritySettings::CancelLockSim()
{
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::CancelLockSimL()"));
- #endif
+ RDEBUG("0", 0);
delete iNote;
iNote = NULL;
}
@@ -494,17 +467,14 @@
* Series 60 Customer / ETel
* Series 60 ETel API
*****************************************************/
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::UnLockSimL()"));
- #endif
+ RDEBUG("0", 0);
RMmCustomAPI::TLockNumber aLockType;
TInt ret = KErrGsm0707IncorrectPassword;
TInt length = aUnlockCode.Length();
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::UnLockSimL(): Param length: %d"), length);
- #endif
- if(aUnlockCode.Length() <= KSimLockMaxPasswordSize)
+ RDEBUG("length", length);
+ // from now on, it accepts all lenghts, because some locks are 20, others are 13
+ // if(aUnlockCode.Length() <= KSimLockMaxPasswordSize)
{
if (aType.CompareF(Operator) == 0)
{
@@ -548,9 +518,7 @@
}
}
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::UnLockSimL() RESULT: %d"), ret);
- #endif
+ RDEBUG("ret", ret);
switch (ret)
{
case KErrNone:
@@ -583,9 +551,7 @@
//
EXPORT_C void CManualSecuritySettings::CancelUnlockSim()
{
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::CancelUnLockSimL()"));
- #endif
+ RDEBUG("0", 0);
delete iNote;
iNote = NULL;
}
@@ -598,9 +564,7 @@
//
void CManualSecuritySettings::ShowResultNoteL(CAknNoteDialog::TTone aTone, TInt aResourceID)
{
- #if defined(_DEBUG)
- RDebug::Print(_L("(SECUI)CManualSecuritySettings::CancelUnLockSimL()"));
- #endif
+ RDEBUG("aResourceID", aResourceID);
CSecuritySettings::ShowResultNoteL(aResourceID, aTone);
}