diff -r 17af172ffa5f -r 630d2f34d719 telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmsecuritytsy.cpp --- a/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmsecuritytsy.cpp Thu Aug 19 11:03:36 2010 +0300 +++ b/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmsecuritytsy.cpp Tue Aug 31 16:23:08 2010 +0300 @@ -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 ); @@ -288,9 +294,9 @@ // (other items were commented in a header). // --------------------------------------------------------------------------- // -TInt CMmSecurityTsy::GetLockInfoL( const TTsyReqHandle aTsyReqHandle, const TDataPackage& aPackage ) +TInt CMmSecurityTsy::GetLockInfoL( const TTsyReqHandle aTsyReqHandle, 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 ); @@ -331,7 +337,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 ); @@ -362,7 +368,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; @@ -429,7 +435,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 ); @@ -501,8 +507,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. @@ -547,7 +552,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; @@ -608,7 +613,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 ); @@ -671,7 +676,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-> @@ -708,7 +713,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(); @@ -719,7 +724,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 ); @@ -762,14 +767,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; } @@ -805,7 +809,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; } @@ -962,12 +966,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 @@ -976,14 +980,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 ); @@ -1076,7 +1080,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 ); @@ -1113,7 +1117,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; @@ -1121,7 +1125,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; } } @@ -1129,7 +1133,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; @@ -1262,7 +1266,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 ); @@ -1295,7 +1299,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 ); @@ -1361,7 +1365,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 ); @@ -1478,7 +1482,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; @@ -1524,7 +1528,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; @@ -1649,7 +1653,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 ); @@ -1679,7 +1683,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( @@ -1723,7 +1727,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;