diff -r 8ab6687fb94c -r 3adadc800673 telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmsecuritytsy.cpp --- a/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmsecuritytsy.cpp Thu May 27 14:05:07 2010 +0300 +++ b/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmsecuritytsy.cpp Fri Jun 11 14:49:29 2010 +0300 @@ -1,4 +1,4 @@ -// 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" @@ -16,6 +16,12 @@ //INCLUDES + +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "cmmsecuritytsyTraces.h" +#endif + #include "cmmsecuritytsy.h" #include "cmmphonetsy.h" #include "cmmtsyreqhandlestore.h" @@ -30,7 +36,7 @@ CMmSecurityTsy* CMmSecurityTsy::NewL( CMmPhoneTsy* aPhoneTsy ) // Ptr to PhoneTsy { -TFLOGSTRING("TSY: CMmSecurityTsy::NewL"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_NEWL_1, "TSY: CMmSecurityTsy::NewL"); CMmSecurityTsy* const mmSecurityTsy = new ( ELeave ) CMmSecurityTsy(); CleanupStack::PushL( mmSecurityTsy ); mmSecurityTsy->iMmPhoneTsy = aPhoneTsy; @@ -46,7 +52,7 @@ void CMmSecurityTsy::ConstructL() { -TFLOGSTRING("TSY: CMmSecurityTsy::ConstructL"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_CONSTRUCTL_1, "TSY: CMmSecurityTsy::ConstructL"); // Is security codes (PIN and phone password) checked in boot iSecurityCheckedForBoot = EFalse; @@ -72,7 +78,7 @@ CMmSecurityTsy::~CMmSecurityTsy() { -TFLOGSTRING("TSY: CMmSecurityTsy::~CMmSecurityTsy"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_DTOR_1, "TSY: CMmSecurityTsy::~CMmSecurityTsy"); } // --------------------------------------------------------------------------- @@ -86,7 +92,7 @@ const TInt aIpc, const TDataPackage& aPackage ) { -TFLOGSTRING3("TSY: CMmSecurityTsy::DoExtFuncL.\n \t\t\t IPC:%d\n \t\t\t Handle:%d", aIpc, aTsyReqHandle); +OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_DOEXTFUNCL_1, "TSY: CMmSecurityTsy::DoExtFuncL.\n \t\t\t IPC:%d\n \t\t\t Handle:%d", aIpc, aTsyReqHandle); TInt ret ( KErrNone ); @@ -290,7 +296,7 @@ // TInt CMmSecurityTsy::GetLockInfoL( const TDataPackage& aPackage ) { -TFLOGSTRING("LTSY: CMmSecurityTsy::GetLockInfoL - Client call"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_GETLOCKINFOL_1, "LTSY: CMmSecurityTsy::GetLockInfoL - Client call"); TInt ret ( KErrArgument ); @@ -326,7 +332,7 @@ RMobilePhone::TMobilePhoneLock* aLock, TDes8* aLockInfo ) { -TFLOGSTRING2("LTSY: CMmSecurityTsy::NotifyLockInfoChange - Lock: %d", aLock); +OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_NOTIFYLOCKINFOCHANGE_1, "LTSY: CMmSecurityTsy::NotifyLockInfoChange - Lock: %d", aLock); TInt ret( KErrNone ); @@ -357,7 +363,7 @@ TInt CMmSecurityTsy::NotifyLockInfoChangeCancel( const TTsyReqHandle aTsyReqHandle ) { -TFLOGSTRING("LTSY: CMmSecurityTsy::NotifyLockInfoChangeCancel"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_NOTIFYLOCKINFOCHANGECANCEL_1, "LTSY: CMmSecurityTsy::NotifyLockInfoChangeCancel"); iRetNotifyLockInfoChange = NULL; iRetNotifyPhoneLockChange = NULL; @@ -424,7 +430,7 @@ const TTsyReqHandle aTsyReqHandle, const TDataPackage& aPackage ) { -TFLOGSTRING("LTSY: CMmSecurityTsy::SetLockSettingL - Client call" ); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_SETLOCKSETTINGL_1, "LTSY: CMmSecurityTsy::SetLockSettingL - Client call" ); TInt ret( KErrNone ); @@ -496,8 +502,7 @@ reinterpret_cast ( aPackage.Ptr2() ); -TFLOGSTRING3("LTSY: CMmSecurityTsy::LockSetting - Lock:%d, Setting:%d", - *lock, *setting ); +OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_LOCKSETTINGL_1, "LTSY: CMmSecurityTsy::LockSetting - Lock:%d, Setting:%d",*lock, *setting ); // Some SIM cards might not support PIN1 disable. Thus // return error if client tries to disable it. @@ -542,7 +547,7 @@ event = RMobilePhone::EUniversalPinRequired; if ( RMobilePhone::ELockReplaced == *setting ) { -TFLOGSTRING("TSY: CMmSecurityTsy::LockSetting RMobilePhone::ELockReplaced"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_LOCKSETTINGL_2, "TSY: CMmSecurityTsy::LockSetting RMobilePhone::ELockReplaced"); iActiveCodeToUpinState = EActiveCodeToUpinAskUpin; } break; @@ -603,7 +608,7 @@ RMobilePhone::TMobilePhoneLockStatus, RMobilePhone::TMobilePhoneLockSetting ) { -TFLOGSTRING2("LTSY: CMmSecurityTsy::CompleteSetLockSetting - Error:%d", aErrorCode); +OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_COMPLETESETLOCKSETTING_1, "LTSY: CMmSecurityTsy::CompleteSetLockSetting - Error:%d", aErrorCode); TTsyReqHandle reqHandle = iMmPhoneTsy->iTsyReqHandleStore-> ResetTsyReqHandle( CMmPhoneTsy::EMultimodePhoneSetLockSetting ); @@ -666,7 +671,7 @@ TInt CMmSecurityTsy::CompleteChangeSecurityCode( TInt aErrorCode ) // Error code { - TFLOGSTRING2("TSY: CMmSecurityTsy::CompleteChangeSecurityCode - Error:%d", aErrorCode); + OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_COMPLETECHANGESECURITYCODE_1, "TSY: CMmSecurityTsy::CompleteChangeSecurityCode - Error:%d", aErrorCode); TTsyReqHandle reqHandle = iMmPhoneTsy->iTsyReqHandleStore-> @@ -703,7 +708,7 @@ // Thus this is the only way to get the information in boot. if ( iSecurityCheckedForBoot == EFalse ) { -TFLOGSTRING( "TSY: CMmSecurityTsy::NotifySecurityEvent - Checking PIN state"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_NOTIFYSECURITYEVENTL_1, "TSY: CMmSecurityTsy::NotifySecurityEvent - Checking PIN state"); // We can't do anything if sending fails. If this happens, // then every send to IsaApi should fail. (void)iMmPhoneTsy->iMmPhoneExtInterface->GetICCTypeL(); @@ -714,7 +719,7 @@ if ( iIsSecurityCodeRequestCachedInBoot && !iMmPhoneTsy->iBootState.iSecReady ) { -TFLOGSTRING( "TSY: CMmSecurityTsy::NotifySecurityEventL - Completing security code event"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_NOTIFYSECURITYEVENTL_2, "TSY: CMmSecurityTsy::NotifySecurityEventL - Completing security code event"); CompleteNotifySecurityEventL( RMobilePhone::EPhonePasswordRequired, KErrNone ); @@ -757,14 +762,13 @@ RMobilePhone::TMobilePhoneSecurityEvent aEvent, TInt aErrorCode ) { -TFLOGSTRING3("TSY: CMmSecurityTsy::CompleteNotifySecurityEvent - Event: %d, Error: %d", - aEvent, aErrorCode ); +OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_COMPLETENOTIFYSECURITYEVENTL_1, "TSY: CMmSecurityTsy::CompleteNotifySecurityEvent - Event: %d, Error: %d",aEvent, aErrorCode ); if ( iLastPinRequested != EPinUnknown && ( RMobilePhone::EPin1Verified == aEvent ) || ( RMobilePhone::EPin2Verified == aEvent ) ) { -TFLOGSTRING( "TSY: CMmSecurityTsy::CompleteNotifySecurityEvent - iLastPinRequested != EPinUnknown"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_COMPLETENOTIFYSECURITYEVENTL_2, "TSY: CMmSecurityTsy::CompleteNotifySecurityEvent - iLastPinRequested != EPinUnknown"); iLastPinRequested = EPinUnknown; } @@ -800,7 +804,7 @@ !iIsSecurityCodeRequestCachedInBoot ) { -TFLOGSTRING("TSY: CMmSecurityTsy::CompleteNotifySecurityEvent - Caching event"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_COMPLETENOTIFYSECURITYEVENTL_3, "TSY: CMmSecurityTsy::CompleteNotifySecurityEvent - Caching event"); iIsSecurityCodeRequestCachedInBoot = ETrue; } @@ -957,12 +961,12 @@ if ( RMobilePhone::ESecurityCodePin1 == *type ) { -TFLOGSTRING("TSY: CMmSecurityTsy::VerifySecurityCodeL - PIN VERIFY REQUESTED"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_VERIFYSECURITYCODEL_1, "TSY: CMmSecurityTsy::VerifySecurityCodeL - PIN VERIFY REQUESTED"); iLastPinRequested = EPin1Requested; } if ( RMobilePhone::ESecurityCodePin2 == *type ) { -TFLOGSTRING("TSY: CMmSecurityTsy::VerifySecurityCodeL - PIN2 VERIFY REQUESTED"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_VERIFYSECURITYCODEL_2, "TSY: CMmSecurityTsy::VerifySecurityCodeL - PIN2 VERIFY REQUESTED"); iLastPinRequested = EPin2Requested; } //This is to prevent unnecessary PIN1 request after PUK code @@ -971,14 +975,14 @@ ( RMobilePhone::ESecurityCodePuk2 == *type ) ) && ( 0 < codes->iUnblockCode.Length() ) ) { -TFLOGSTRING("TSY: CMmSecurityTsy::VerifySecurityCodeL - PUK VERIFY REQUESTED"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_VERIFYSECURITYCODEL_3, "TSY: CMmSecurityTsy::VerifySecurityCodeL - PUK VERIFY REQUESTED"); iPukCodeVerify = ETrue; } //This is to prevent unnecessary PIN1 request after phone password //request (PYRA-5UBCLC) if ( RMobilePhone::ESecurityCodePhonePassword == *type ) { -TFLOGSTRING("TSY: CMmSecurityTsy::VerifySecurityCodeL - PHONE PASSWORD VERIFY REQUESTED"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_VERIFYSECURITYCODEL_4, "TSY: CMmSecurityTsy::VerifySecurityCodeL - PHONE PASSWORD VERIFY REQUESTED"); iPhonePasswordVerify = ETrue; } iMmPhoneTsy->iMmPhoneExtInterface->DeliverCode( *codes ); @@ -1071,7 +1075,7 @@ void CMmSecurityTsy::CompleteVerifySecurityCodeL( TInt aErrorCode ) { -TFLOGSTRING2("TSY: CMmSecurityTsy::CompleteVerifySecurityCode - Error:%d", aErrorCode); +OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_COMPLETEVERIFYSECURITYCODEL_1, "TSY: CMmSecurityTsy::CompleteVerifySecurityCode - Error:%d", aErrorCode); TTsyReqHandle reqHandle = iMmPhoneTsy->iTsyReqHandleStore-> ResetTsyReqHandle( CMmPhoneTsy::EMultimodePhoneVerifySecurityCode ); @@ -1108,7 +1112,7 @@ // IF PIN1 REQUESTED LAST if ( iLastPinRequested == EPin1Requested ) { -TFLOGSTRING("TSY: CMmSecurityTsy::CompleteVerifySecurityCodeL - PIN VERIFICATION NEEDED"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_COMPLETEVERIFYSECURITYCODEL_2, "TSY: CMmSecurityTsy::CompleteVerifySecurityCodeL - PIN VERIFICATION NEEDED"); CompleteNotifySecurityEventL( RMobilePhone::EPin1Required, KErrNone ); iLastPinRequested = EPinUnknown; @@ -1116,7 +1120,7 @@ // IF PIN2 REQUESTED LAST if (iLastPinRequested == EPin2Requested) { -TFLOGSTRING("TSY: CMmSecurityTsy::CompleteVerifySecurityCodeL - PIN2"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_COMPLETEVERIFYSECURITYCODEL_3, "TSY: CMmSecurityTsy::CompleteVerifySecurityCodeL - PIN2"); iLastPinRequested = EPinUnknown; } } @@ -1124,7 +1128,7 @@ phoneSetLockSettingHandle && EActiveCodeToUpinAskUpin == iActiveCodeToUpinState ) { -TFLOGSTRING("TSY: CMmSecurityTsy::CompleteVerifySecurityCodeL - iActiveCodeToUpinState = EActiveCodeToUpinAskPin"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_COMPLETEVERIFYSECURITYCODEL_4, "TSY: CMmSecurityTsy::CompleteVerifySecurityCodeL - iActiveCodeToUpinState = EActiveCodeToUpinAskPin"); if ( KErrNone == aErrorCode ) { iActiveCodeToUpinState = EActiveCodeToUpinAskPin; @@ -1257,7 +1261,7 @@ void CMmSecurityTsy::CompleteAbortSecurityCode( TInt aErrorCode ) { -TFLOGSTRING2("TSY: CMmSecurityTsy::CompleteAbortSecurityCode - Error:%d", aErrorCode); +OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_COMPLETEABORTSECURITYCODE_1, "TSY: CMmSecurityTsy::CompleteAbortSecurityCode - Error:%d", aErrorCode); TTsyReqHandle reqHandle = iMmPhoneTsy->iTsyReqHandleStore-> ResetTsyReqHandle( CMmPhoneTsy::EMultimodePhoneAbortSecurityCode ); @@ -1290,7 +1294,7 @@ CMmDataPackage* aDataPackage, TInt aErrorCode ) { -TFLOGSTRING2("LTSY: CMmSecurityTsy::CompleteGetLockInfo - Error:%d", aErrorCode); +OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_COMPLETEGETLOCKINFO_1, "LTSY: CMmSecurityTsy::CompleteGetLockInfo - Error:%d", aErrorCode); TTsyReqHandle reqHandle = iMmPhoneTsy->iTsyReqHandleStore-> ResetTsyReqHandle( CMmPhoneTsy::EMultimodePhoneGetLockInfo ); @@ -1356,7 +1360,7 @@ RMobilePhone::TMobilePhoneSecurityCode* aSecurityCode, TDes8* aSecurityCodeInfo ) { -TFLOGSTRING("TSY: CMmSecurityTsy::GetSecurityCodeInfoL"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_GETSECURITYCODEINFOL_1, "TSY: CMmSecurityTsy::GetSecurityCodeInfoL"); TInt ret( KErrNone ); @@ -1473,7 +1477,7 @@ CMmDataPackage* aDataPackage, TInt aErrorCode ) { -TFLOGSTRING("TSY: CMmSecurityTsy::CompleteGetSecurityCodeInfo"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_COMPLETEGETSECURITYCODEINFO_1, "TSY: CMmSecurityTsy::CompleteGetSecurityCodeInfo"); RMobilePhone::TMobilePhoneSecurityCode* securityCode; RMobilePhone::TMobilePhoneSecurityCodeInfoV5* securityCodeInfoV5; @@ -1519,7 +1523,7 @@ TInt CMmSecurityTsy::GetSecurityCodeInfoCancel( TTsyReqHandle aTsyReqHandle ) { -TFLOGSTRING("TSY: CMmSecurityTsy::GetSecurityCodeInfoCancel"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_GETSECURITYCODEINFOCANCEL_1, "TSY: CMmSecurityTsy::GetSecurityCodeInfoCancel"); RMobilePhone::TMobilePhoneSecurityCode secCode = RMobilePhone::ESecurityCodePin1; TBool reqHandleExist = EFalse; @@ -1644,7 +1648,7 @@ RMobilePhone::TMobilePhoneSecurityCode* aSecurityCode, TDes8* aSecurityCodeInfo ) { -TFLOGSTRING("TSY: CMmSecurityTsy::NotifySecurityCodeInfoChange"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_NOTIFYSECURITYCODEINFOCHANGE_1, "TSY: CMmSecurityTsy::NotifySecurityCodeInfoChange"); TInt ret( KErrNone ); @@ -1674,7 +1678,7 @@ CMmDataPackage* aDataPackage, TInt aErrorCode ) { -TFLOGSTRING("TSY: CMmSecurityTsy::CompleteNotifySecurityCodeInfoChange"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_COMPLETENOTIFYSECURITYCODEINFOCHANGE_1, "TSY: CMmSecurityTsy::CompleteNotifySecurityCodeInfoChange"); TTsyReqHandle reqHandle = iMmPhoneTsy->iTsyReqHandleStore-> ResetTsyReqHandle( @@ -1718,7 +1722,7 @@ TInt CMmSecurityTsy::NotifySecurityCodeInfoChangeCancel( TTsyReqHandle aTsyReqHandle ) { -TFLOGSTRING("TSY: CMmSecurityTsy::NotifySecurityCodeInfoChangeCancel"); +OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMSECURITYTSY_NOTIFYSECURITYCODEINFOCHANGECANCEL_1, "TSY: CMmSecurityTsy::NotifySecurityCodeInfoChangeCancel"); iRetNotifySecurityCodeInfo = NULL; iRetNotifySecurityCode = NULL;