telephonyserverplugins/common_tsy/commontsy/src/mmcustomtsy/CMmCustomTsy.cpp
branchRCL_3
changeset 19 630d2f34d719
parent 9 2492a6e4aed7
child 20 07a122eea281
equal deleted inserted replaced
18:17af172ffa5f 19:630d2f34d719
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    14 //
    14 //
    15 
    15 
    16 
    16 
    17 
    17 
    18 //  INCLUDE FILES
    18 //  INCLUDE FILES
       
    19 
       
    20 #include "OstTraceDefinitions.h"
       
    21 #ifdef OST_TRACE_COMPILER_IN_USE
       
    22 #include "CMmCustomTsyTraces.h"
       
    23 #endif
       
    24 
    19 #include "CMmCustomTsy.h"
    25 #include "CMmCustomTsy.h"
    20 #include "CMmCustomGsmExt.h"
    26 #include "CMmCustomGsmExt.h"
    21 #include "cmmcalllist.h"
    27 #include "cmmcalllist.h"
    22 #include "cmmphoneextinterface.h"
    28 #include "cmmphoneextinterface.h"
    23 #include "CMmWimTsy.h"
    29 #include "CMmWimTsy.h"
    24 #include "cmmcalltsy.h"
    30 #include "cmmcalltsy.h"
    25 #include "CMmCommonStaticUtility.h"
    31 #include "CMmCommonStaticUtility.h"
    26 #include "CMmSimLockTsy.h"
    32 #include "CMmSimLockTsy.h"
    27 #include "MmTsy_conf.h"
    33 #include "MmTsy_conf.h"
    28 #include <ctsy/tflogger.h>
       
    29 #include "cmmpblist.h"
    34 #include "cmmpblist.h"
    30 #include "cmmphonebookstoretsy.h"
    35 #include "cmmphonebookstoretsy.h"
    31 #include "CMmPacketTsy.h"
    36 #include "CMmPacketTsy.h"
    32 #include "CMmSIMTsy.h"
    37 #include "CMmSIMTsy.h"
    33 #include "CMmCustomSecurityTsy.h"
    38 #include "CMmCustomSecurityTsy.h"
    53     }
    58     }
    54 
    59 
    55 void CMmCustomTsy::ConstructL(
    60 void CMmCustomTsy::ConstructL(
    56     CMmPhoneTsy* aMmPhoneTsy )
    61     CMmPhoneTsy* aMmPhoneTsy )
    57     {
    62     {
    58 TFLOGSTRING("TSY: CMmCustomTsy::ConstructL");
    63     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_CONSTRUCTL_1, "TSY: CMmCustomTsy::ConstructL");
    59     iMmPhoneTsy = aMmPhoneTsy;
    64     iMmPhoneTsy = aMmPhoneTsy;
    60 
    65 
    61     iMmCustomExtInterface = CMmCustomGsmExt::NewL( aMmPhoneTsy, this );
    66     iMmCustomExtInterface = CMmCustomGsmExt::NewL( aMmPhoneTsy, this );
    62     iMmSubTsy[ESubTsyIdxWIM] = CMmWimTsy::NewL( this );
    67     iMmSubTsy[ESubTsyIdxWIM] = CMmWimTsy::NewL( this );
    63     iMmSubTsy[ESubTsyIdxSimLock] = CMmSimLockTsy::NewL( this );
    68     iMmSubTsy[ESubTsyIdxSimLock] = CMmSimLockTsy::NewL( this );
    96 	iUsingFeatureManager = (err == KErrNone);
   101 	iUsingFeatureManager = (err == KErrNone);
    97     
   102     
    98     // update/receive Icc Call forward information
   103     // update/receive Icc Call forward information
    99     if( iMmPhoneTsy->NosBootState()->iSIMReady )
   104     if( iMmPhoneTsy->NosBootState()->iSIMReady )
   100         {
   105         {
   101 TFLOGSTRING("TSY: CMmCustomTsy::ConstructL -- GET ICC call forward indicators");       
   106 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_CONSTRUCTL_2, "TSY: CMmCustomTsy::ConstructL -- GET ICC call forward indicators");
   102         // Get Icc cfis values from LTSY
   107         // Get Icc cfis values from LTSY
   103         Phone()->MessageManager()->HandleRequestL( 
   108         Phone()->MessageManager()->HandleRequestL( 
   104             ECustomGetIccCallForwardingStatusIPC );
   109             ECustomGetIccCallForwardingStatusIPC );
   105         }
   110         }
   106         
   111         
   107     // check if HomeZoneParams has been already read in NotifySimStatusReady
   112     // check if HomeZoneParams has been already read in NotifySimStatusReady
   108  	// if not, query again
   113  	// if not, query again
   109     if ( !iMmPhoneTsy->GetHomeZoneParamsChecked() )
   114     if ( !iMmPhoneTsy->GetHomeZoneParamsChecked() )
   110     	{
   115     	{
   111 TFLOGSTRING("TSY: CMmCustomTsy::ConstructL - GetHomeZoneParamsChecked()");    	
   116 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_CONSTRUCTL_3, "TSY: CMmCustomTsy::ConstructL - GetHomeZoneParamsChecked()");
   112         CMmSIMTsy* simCustomTsy = NULL;
   117         CMmSIMTsy* simCustomTsy = NULL;
   113         simCustomTsy = ( CMmSIMTsy* )GetSIMTsyPtr();
   118         simCustomTsy = ( CMmSIMTsy* )GetSIMTsyPtr();
   114 TFLOGSTRING("TSY: CMmCustomTsy::ConstructL - pointer created");
   119 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_CONSTRUCTL_4, "TSY: CMmCustomTsy::ConstructL - pointer created");
   115 	
   120 	
   116         if ( simCustomTsy )
   121         if ( simCustomTsy )
   117             {
   122             {
   118 TFLOGSTRING("TSY: CMmCustomTsy::ConstructL - CheckViagHomeZoneParamsL()");
   123 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_CONSTRUCTL_5, "TSY: CMmCustomTsy::ConstructL - CheckViagHomeZoneParamsL()");
   119             simCustomTsy->CheckViagHomezoneParamsL();
   124             simCustomTsy->CheckViagHomezoneParamsL();
   120             iMmPhoneTsy->SetHomeZoneParamsChecked( ETrue );
   125             iMmPhoneTsy->SetHomeZoneParamsChecked( ETrue );
   121             }
   126             }
   122         else
   127         else
   123         	{
   128         	{
   124 TFLOGSTRING("TSY: CMmCustomTsy::ConstructL - CheckViagHomeZoneParamsL() False");        		
   129 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_CONSTRUCTL_6, "TSY: CMmCustomTsy::ConstructL - CheckViagHomeZoneParamsL() False");
   125 			iMmPhoneTsy->SetHomeZoneParamsChecked( EFalse );
   130 			iMmPhoneTsy->SetHomeZoneParamsChecked( EFalse );
   126         	}
   131         	}
   127     	}     
   132     	}     
   128     }
   133     }
   129 
   134 
   130 CMmCustomTsy* CMmCustomTsy::NewL(
   135 CMmCustomTsy* CMmCustomTsy::NewL(
   131     CMmPhoneTsy* aMmPhoneTsy )
   136     CMmPhoneTsy* aMmPhoneTsy )
   132     {
   137     {
   133 TFLOGSTRING("TSY: CMmCustomTsy::NewL");
   138 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_NEWL_1, "TSY: CMmCustomTsy::NewL");
   134     CMmCustomTsy* mmCustomTsy = new ( ELeave ) CMmCustomTsy();
   139     CMmCustomTsy* mmCustomTsy = new ( ELeave ) CMmCustomTsy();
   135     CleanupClosePushL( *mmCustomTsy );
   140     CleanupClosePushL( *mmCustomTsy );
   136     mmCustomTsy->ConstructL( aMmPhoneTsy );
   141     mmCustomTsy->ConstructL( aMmPhoneTsy );
   137     CleanupStack::Pop( mmCustomTsy );
   142     CleanupStack::Pop( mmCustomTsy );
   138 
   143 
   139     return mmCustomTsy;
   144     return mmCustomTsy;
   140     }
   145     }
   141 
   146 
   142 CMmCustomTsy::~CMmCustomTsy()
   147 CMmCustomTsy::~CMmCustomTsy()
   143     {
   148     {
   144 TFLOGSTRING("TSY: CMmCustomTsy::~CMmCustomTsy");
   149 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_DTOR_1, "TSY: CMmCustomTsy::~CMmCustomTsy");
   145 
   150 
   146 	iFeatureControl.Close();
   151 	iFeatureControl.Close();
   147 	
   152 	
   148     // Delete subsystems
   153     // Delete subsystems
   149     for ( TInt i = 0; ESubTsyIdxMaxNum > i; i++ )
   154     for ( TInt i = 0; ESubTsyIdxMaxNum > i; i++ )
   209     // before processing further the request, check if offline mode status
   214     // before processing further the request, check if offline mode status
   210     // is enabled and if the given request can be perfomed in that case.
   215     // is enabled and if the given request can be perfomed in that case.
   211     if ( ERfsStateInfoInactive == iMmPhoneTsy->GetRfStateInfo() &&
   216     if ( ERfsStateInfoInactive == iMmPhoneTsy->GetRfStateInfo() &&
   212         !IsRequestPossibleInOffline( aIpc ) )
   217         !IsRequestPossibleInOffline( aIpc ) )
   213         {
   218         {
   214 TFLOGSTRING2 ("TSY: Offline mode ON, request is not allowed: %d", aIpc );
   219 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_EXTFUNC_1, "TSY: Offline mode ON, request is not allowed: %d", aIpc );
   215         ret = CMmCommonStaticUtility::EpocErrorCode( KErrGeneral,
   220         ret = CMmCommonStaticUtility::EpocErrorCode( KErrGeneral,
   216                 KErrGsmOfflineOpNotAllowed );
   221                 KErrGsmOfflineOpNotAllowed );
   217 
   222 
   218         // Complete the request with appropiate error
   223         // Complete the request with appropiate error
   219         ReqCompleted ( aTsyReqHandle, ret );
   224         ReqCompleted ( aTsyReqHandle, ret );
   542                         RMmCustomAPI::TRemoteAlertingToneStatus*,
   547                         RMmCustomAPI::TRemoteAlertingToneStatus*,
   543                         aPackage.Ptr1() ) );
   548                         aPackage.Ptr1() ) );
   544                     break;
   549                     break;
   545                 default:
   550                 default:
   546                     // ret is already set as KErrNotSupported
   551                     // ret is already set as KErrNotSupported
   547 TFLOGSTRING2("TSY: CMmCustomTsy::DoExtFuncL unsupported ipc=%d", aIpc);
   552 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_DOEXTFUNCL_1, "TSY: CMmCustomTsy::DoExtFuncL unsupported ipc=%d", aIpc);
   548                     break;
   553                     break;
   549                 }
   554                 }
   550 
   555 
   551             // save request handle
   556             // save request handle
   552             if ( ECustomTsyReqHandleUnknown != iReqHandleType )
   557             if ( ECustomTsyReqHandleUnknown != iReqHandleType )
   798 // ---------------------------------------------------------------------------
   803 // ---------------------------------------------------------------------------
   799 //
   804 //
   800 TSecurityPolicy CMmCustomTsy::GetRequiredPlatSecCaps(
   805 TSecurityPolicy CMmCustomTsy::GetRequiredPlatSecCaps(
   801     const TInt aIpc )
   806     const TInt aIpc )
   802     {
   807     {
   803 TFLOGSTRING2( "TSY: CMmCustomTsy::GetRequiredPlatSecCaps ipc=%d", aIpc );
   808 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_1,  "TSY: CMmCustomTsy::GetRequiredPlatSecCaps ipc=%d", aIpc );
   804     // assume fail as default return value
   809     // assume fail as default return value
   805     TSecurityPolicy policy( TSecurityPolicy::EAlwaysFail );
   810     TSecurityPolicy policy( TSecurityPolicy::EAlwaysFail );
   806 
   811 
   807     // deal with cancellations
   812     // deal with cancellations
   808     TInt ipc ( aIpc );
   813     TInt ipc ( aIpc );
   809     if (ipc >= KIpcCustomExt + EMobileCancelOffset)
   814     if (ipc >= KIpcCustomExt + EMobileCancelOffset)
   810         {
   815         {
   811         ipc  -= EMobileCancelOffset;
   816         ipc  -= EMobileCancelOffset;
   812 TFLOGSTRING2("TSY: CMmCustomTsy::GetRequiredPlatSecCaps cancel for ipc=%d", ipc);
   817 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_2, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps cancel for ipc=%d", ipc);
   813         }
   818         }
   814 
   819 
   815     switch ( ipc )
   820     switch ( ipc )
   816         {
   821         {
   817         case ECustomNotifyRauEventIPC:
   822         case ECustomNotifyRauEventIPC:
   841         case ECustomNotifyHSxPAStatusIPC:
   846         case ECustomNotifyHSxPAStatusIPC:
   842         case ECustomNotifyIccCallForwardingStatusChangeIPC:
   847         case ECustomNotifyIccCallForwardingStatusChangeIPC:
   843         case ECustomNotifyCellInfoChangeIPC:
   848         case ECustomNotifyCellInfoChangeIPC:
   844         case ECustomGetBandSelectionIPC:
   849         case ECustomGetBandSelectionIPC:
   845         case ECustomNotifyRemoteAlertingToneStatusChangeIPC:
   850         case ECustomNotifyRemoteAlertingToneStatusChangeIPC:
   846 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=None");
   851 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_3, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=None");
   847             policy = TSecurityPolicy( TSecurityPolicy::EAlwaysPass );
   852             policy = TSecurityPolicy( TSecurityPolicy::EAlwaysPass );
   848             break;
   853             break;
   849 
   854 
   850         // NetworkControl
   855         // NetworkControl
   851         case ECustomResetNetServerIPC:
   856         case ECustomResetNetServerIPC:
   852         case ECustomSetSystemNetworkModeIPC:
   857         case ECustomSetSystemNetworkModeIPC:
   853         case ECustomSimWarmResetIPC:
   858         case ECustomSimWarmResetIPC:
   854         case ECustomSetBandSelectionIPC:
   859         case ECustomSetBandSelectionIPC:
   855 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=NetworkControl");
   860 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_4, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=NetworkControl");
   856             policy = TSecurityPolicy( ECapabilityNetworkControl );
   861             policy = TSecurityPolicy( ECapabilityNetworkControl );
   857             break;
   862             break;
   858 
   863 
   859         // NetworkControl, PowerMgmt
   864         // NetworkControl, PowerMgmt
   860         case ECustomPowerSimOnIPC:
   865         case ECustomPowerSimOnIPC:
   861         case ECustomPowerSimOffIPC:
   866         case ECustomPowerSimOffIPC:
   862 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=NetworkControl, PowerMgmt");
   867 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_5, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=NetworkControl, PowerMgmt");
   863             policy = TSecurityPolicy( ECapabilityNetworkControl,
   868             policy = TSecurityPolicy( ECapabilityNetworkControl,
   864                 ECapabilityPowerMgmt );
   869                 ECapabilityPowerMgmt );
   865             break;
   870             break;
   866 
   871 
   867         // NetworkControl, ReadDeviceData
   872         // NetworkControl, ReadDeviceData
   868         case ECustomReleaseFileIPC:
   873         case ECustomReleaseFileIPC:
   869         case ECustomRestartFileIPC:
   874         case ECustomRestartFileIPC:
   870 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=NetworkControl, ReadDeviceData");
   875 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_6, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=NetworkControl, ReadDeviceData");
   871             policy = TSecurityPolicy( ECapabilityNetworkControl,
   876             policy = TSecurityPolicy( ECapabilityNetworkControl,
   872                 ECapabilityReadDeviceData );
   877                 ECapabilityReadDeviceData );
   873             break;
   878             break;
   874 
   879 
   875         // NetworkServices
   880         // NetworkServices
   876         case ECustomTerminateCallIPC:
   881         case ECustomTerminateCallIPC:
   877         case ECustomCancelUssdSessionIPC:
   882         case ECustomCancelUssdSessionIPC:
   878 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=NetworkServices");
   883 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_7, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=NetworkServices");
   879             policy = TSecurityPolicy( ECapabilityNetworkServices );
   884             policy = TSecurityPolicy( ECapabilityNetworkServices );
   880             break;
   885             break;
   881 
   886 
   882         // NetworkServices, WriteDeviceData
   887         // NetworkServices, WriteDeviceData
   883         case ECustomSetDriveModeIPC:
   888         case ECustomSetDriveModeIPC:
   884 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=NetworkServices, WriteDeviceData");
   889 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_8, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=NetworkServices, WriteDeviceData");
   885             policy = TSecurityPolicy( ECapabilityNetworkServices,
   890             policy = TSecurityPolicy( ECapabilityNetworkServices,
   886                 ECapabilityWriteDeviceData );
   891                 ECapabilityWriteDeviceData );
   887             break;
   892             break;
   888 
   893 
   889         // ReadDeviceData
   894         // ReadDeviceData
   900         case ECustomGetEGprsInfo:
   905         case ECustomGetEGprsInfo:
   901         case EMobilePhoneIMSAuthenticate:
   906         case EMobilePhoneIMSAuthenticate:
   902         case ECustomReadHSxPAStatusIPC:
   907         case ECustomReadHSxPAStatusIPC:
   903         case ECustomGetIccCallForwardingStatusIPC:
   908         case ECustomGetIccCallForwardingStatusIPC:
   904         case ECustomGetCellInfoIPC:
   909         case ECustomGetCellInfoIPC:
   905 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadDeviceData");
   910 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_9, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadDeviceData");
   906             policy = TSecurityPolicy( ECapabilityReadDeviceData );
   911             policy = TSecurityPolicy( ECapabilityReadDeviceData );
   907             break;
   912             break;
   908 
   913 
   909         // ReadDeviceData, Location
   914         // ReadDeviceData, Location
   910         case EReadViagHomeZoneCacheIPC:
   915         case EReadViagHomeZoneCacheIPC:
   911 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadDeviceData, Location");
   916 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_10, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadDeviceData, Location");
   912             policy = TSecurityPolicy( ECapabilityReadDeviceData,
   917             policy = TSecurityPolicy( ECapabilityReadDeviceData,
   913                 ECapabilityLocation );
   918                 ECapabilityLocation );
   914             break;
   919             break;
   915 
   920 
   916         // ReadDeviceData, ReadUserData
   921         // ReadDeviceData, ReadUserData
   917         case ECustomNotifySsNetworkEventIPC:
   922         case ECustomNotifySsNetworkEventIPC:
   918 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy= ReadDeviceData, ReadUserData");
   923 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_11, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy= ReadDeviceData, ReadUserData");
   919             policy = TSecurityPolicy( ECapabilityReadDeviceData,
   924             policy = TSecurityPolicy( ECapabilityReadDeviceData,
   920                 ECapabilityReadUserData );
   925                 ECapabilityReadUserData );
   921             break;
   926             break;
   922 
   927 
   923         // ReadDeviceData, ReadUserData, Location
   928         // ReadDeviceData, ReadUserData, Location
   924         case ECustomReadSimFileIPC:
   929         case ECustomReadSimFileIPC:
   925 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadDeviceData, ReadUserData, Location");
   930 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_12, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadDeviceData, ReadUserData, Location");
   926             policy = TSecurityPolicy( ECapabilityReadDeviceData,
   931             policy = TSecurityPolicy( ECapabilityReadDeviceData,
   927                 ECapabilityReadUserData,
   932                 ECapabilityReadUserData,
   928                 ECapabilityLocation );
   933                 ECapabilityLocation );
   929             break;
   934             break;
   930 
   935 
   931         // ReadDeviceData, ReadUserData, WriteUserData, NetworkControl
   936         // ReadDeviceData, ReadUserData, WriteUserData, NetworkControl
   932         case ECustomGetSimAuthenticationDataIPC:
   937         case ECustomGetSimAuthenticationDataIPC:
   933 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadDeviceData, ReadUserData, WriteUserData, NetworkControl");
   938 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_13, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadDeviceData, ReadUserData, WriteUserData, NetworkControl");
   934             policy = TSecurityPolicy( ECapabilityReadDeviceData,
   939             policy = TSecurityPolicy( ECapabilityReadDeviceData,
   935                 ECapabilityReadUserData,
   940                 ECapabilityReadUserData,
   936                 ECapabilityWriteUserData,
   941                 ECapabilityWriteUserData,
   937                 ECapabilityNetworkControl );
   942                 ECapabilityNetworkControl );
   938             break;
   943             break;
   939 
   944 
   940        	case ECustomGetServiceTableSupportbyApplicationIPC:
   945        	case ECustomGetServiceTableSupportbyApplicationIPC:
   941 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadDeviceData");
   946 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_14, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadDeviceData");
   942             policy = TSecurityPolicy( ECapabilityReadDeviceData );
   947             policy = TSecurityPolicy( ECapabilityReadDeviceData );
   943             break;
   948             break;
   944         // ReadDeviceData, WriteDeviceData, ReadUserData, WriteUserData,
   949         // ReadDeviceData, WriteDeviceData, ReadUserData, WriteUserData,
   945         // Location, NetworkServices, NetworkControl
   950         // Location, NetworkServices, NetworkControl
   946         case ECustomSendAPDUReqIPC:
   951         case ECustomSendAPDUReqIPC:
   947         case ECustomSendAPDUReqV2IPC:
   952         case ECustomSendAPDUReqV2IPC:
   948 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadDeviceData, WriteDeviceData, ReadUserData, WriteUserData, Location, NetworkServices, NetworkControl");
   953 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_15, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadDeviceData, WriteDeviceData, ReadUserData, WriteUserData, Location, NetworkServices, NetworkControl");
   949             policy = TSecurityPolicy( ECapabilityReadDeviceData,
   954             policy = TSecurityPolicy( ECapabilityReadDeviceData,
   950                 ECapabilityWriteDeviceData,
   955                 ECapabilityWriteDeviceData,
   951                 ECapabilityReadUserData,
   956                 ECapabilityReadUserData,
   952                 ECapabilityWriteUserData,
   957                 ECapabilityWriteUserData,
   953                 ECapabilityLocation,
   958                 ECapabilityLocation,
   957 
   962 
   958         // ReadUserData
   963         // ReadUserData
   959         case ECustomStartSimCbTopicBrowsingIPC:
   964         case ECustomStartSimCbTopicBrowsingIPC:
   960         case ECustomGetNextSimCbTopicIPC:
   965         case ECustomGetNextSimCbTopicIPC:
   961         case ECustomGetAirTimeDurationIPC:
   966         case ECustomGetAirTimeDurationIPC:
   962 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadUserData");
   967 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_16, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=ReadUserData");
   963             policy = TSecurityPolicy( ECapabilityReadUserData );
   968             policy = TSecurityPolicy( ECapabilityReadUserData );
   964             break;
   969             break;
   965 
   970 
   966         // WriteDeviceData
   971         // WriteDeviceData
   967         case ECustomSetAlwaysOnMode:
   972         case ECustomSetAlwaysOnMode:
   972         case ECustomNetWakeupIPC:
   977         case ECustomNetWakeupIPC:
   973         case ECustomCheckSecurityCodeIPC:
   978         case ECustomCheckSecurityCodeIPC:
   974         case ECustomDisablePhoneLockIPC:
   979         case ECustomDisablePhoneLockIPC:
   975         case ECustomSetSimMessageStatusReadIPC:
   980         case ECustomSetSimMessageStatusReadIPC:
   976         case ECustomWriteHSxPAStatusIPC:
   981         case ECustomWriteHSxPAStatusIPC:
   977 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=WriteDeviceData");
   982 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_17, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=WriteDeviceData");
   978             policy = TSecurityPolicy( ECapabilityWriteDeviceData );
   983             policy = TSecurityPolicy( ECapabilityWriteDeviceData );
   979             break;
   984             break;
   980 
   985 
   981         // WriteDeviceData, Location
   986         // WriteDeviceData, Location
   982         case EWriteViagHomeZoneCacheIPC:
   987         case EWriteViagHomeZoneCacheIPC:
   983 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=WriteDeviceData, Location");
   988 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_18, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=WriteDeviceData, Location");
   984             policy = TSecurityPolicy( ECapabilityWriteDeviceData,
   989             policy = TSecurityPolicy( ECapabilityWriteDeviceData,
   985                 ECapabilityLocation );
   990                 ECapabilityLocation );
   986             break;
   991             break;
   987 
   992 
   988         // WriteUserData
   993         // WriteUserData
   989         case ECustomDeleteSimCbTopicIPC:
   994         case ECustomDeleteSimCbTopicIPC:
   990 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=WriteUserData");
   995 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_19, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=WriteUserData");
   991             policy = TSecurityPolicy( ECapabilityWriteUserData );
   996             policy = TSecurityPolicy( ECapabilityWriteUserData );
   992             break;
   997             break;
   993 
   998 
   994         // WriteDeviceData
   999         // WriteDeviceData
   995         case EWriteViagHomeZoneUHZIUESettingsIPC:
  1000         case EWriteViagHomeZoneUHZIUESettingsIPC:
   996 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=WriteDeviceData");
  1001 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_20, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=WriteDeviceData");
   997             policy = TSecurityPolicy( ECapabilityWriteDeviceData );
  1002             policy = TSecurityPolicy( ECapabilityWriteDeviceData );
   998             break;
  1003             break;
   999         default:
  1004         default:
  1000             // if none of the above then we end up here,
  1005             // if none of the above then we end up here,
  1001             // as a default we already have caps as alwaysfail.
  1006             // as a default we already have caps as alwaysfail.
  1002 TFLOGSTRING("TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=AlwaysFail");
  1007 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREQUIREDPLATSECCAPS_21, "TSY: CMmCustomTsy::GetRequiredPlatSecCaps policy=AlwaysFail");
  1003             break;
  1008             break;
  1004         }
  1009         }
  1005 
  1010 
  1006     return policy;
  1011     return policy;
  1007     }
  1012     }
  1303     const TDataPackage& aAuthData )
  1308     const TDataPackage& aAuthData )
  1304     {
  1309     {
  1305     TInt ret ( KErrNone );
  1310     TInt ret ( KErrNone );
  1306     TInt rfStateInfo ( ERfsStateInfoNormal );
  1311     TInt rfStateInfo ( ERfsStateInfoNormal );
  1307 
  1312 
  1308 TFLOGSTRING( "CMmCustomTSY: CMmCustomTsy::SimAuthentication" );
  1313 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SIMAUTHENTICATIONL_1,  "CMmCustomTSY: CMmCustomTsy::SimAuthentication" );
  1309 
  1314 
  1310     TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(ECustomTsyGetSimAuthenticationData);
  1315     TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(ECustomTsyGetSimAuthenticationData);
  1311     if(0 < reqHandle)
  1316     if(0 < reqHandle)
  1312         {
  1317         {
  1313         return KErrServerBusy;
  1318         return KErrServerBusy;
  1347         authenticationDataPackage.PackData( iEapAka, &rfStateInfo );
  1352         authenticationDataPackage.PackData( iEapAka, &rfStateInfo );
  1348         }
  1353         }
  1349     else if ( RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrap ==
  1354     else if ( RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrap ==
  1350         basePtr->ExtensionId() )
  1355         basePtr->ExtensionId() )
  1351         {
  1356         {
  1352 TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::in EGbaBootstrap" );
  1357 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SIMAUTHENTICATIONL_2,  "CMmCustomTSY: SimAuthenticationL::in EGbaBootstrap" );
  1353         iGbaBootstrap = REINTERPRET_CAST( 
  1358         iGbaBootstrap = REINTERPRET_CAST( 
  1354 	        RMmCustomAPI::TSimAuthenticationGbaBootstrap*, basePtr );
  1359 	        RMmCustomAPI::TSimAuthenticationGbaBootstrap*, basePtr );
  1355 
  1360 
  1356         rand.Append( iGbaBootstrap->iRandomParameters );
  1361         rand.Append( iGbaBootstrap->iRandomParameters );
  1357 
  1362 
  1358         authenticationDataPackage.PackData( iGbaBootstrap, &rfStateInfo  ); 
  1363         authenticationDataPackage.PackData( iGbaBootstrap, &rfStateInfo  ); 
  1359 TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::out EGbaBootstrap" ); 
  1364 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SIMAUTHENTICATIONL_3,  "CMmCustomTSY: SimAuthenticationL::out EGbaBootstrap" );
  1360         }
  1365         }
  1361     else if ( RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrapUpdate ==
  1366     else if ( RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrapUpdate ==
  1362         basePtr->ExtensionId() )
  1367         basePtr->ExtensionId() )
  1363         {
  1368         {
  1364 TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::in EGbaBootstrapUpdate" );
  1369 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SIMAUTHENTICATIONL_4,  "CMmCustomTSY: SimAuthenticationL::in EGbaBootstrapUpdate" );
  1365         iGbaBootstrapUpdate = REINTERPRET_CAST( 
  1370         iGbaBootstrapUpdate = REINTERPRET_CAST( 
  1366         	RMmCustomAPI::TSimAuthenticationGbaBootstrapUpdate*, basePtr );
  1371         	RMmCustomAPI::TSimAuthenticationGbaBootstrapUpdate*, basePtr );
  1367 
  1372 
  1368         authenticationDataPackage.PackData( iGbaBootstrapUpdate, &rfStateInfo  ); 
  1373         authenticationDataPackage.PackData( iGbaBootstrapUpdate, &rfStateInfo  ); 
  1369 TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::out EGbaBootstrapUpdate" ); 
  1374 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SIMAUTHENTICATIONL_5,  "CMmCustomTSY: SimAuthenticationL::out EGbaBootstrapUpdate" );
  1370         }
  1375         }
  1371     else if ( 
  1376     else if ( 
  1372         RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrapNafDerivation ==
  1377         RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrapNafDerivation ==
  1373         basePtr->ExtensionId() )
  1378         basePtr->ExtensionId() )
  1374         {
  1379         {
  1375 TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::in EGbaBootstrapNafDerivation" );
  1380 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SIMAUTHENTICATIONL_6,  "CMmCustomTSY: SimAuthenticationL::in EGbaBootstrapNafDerivation" );
  1376         iGbaNafDerivation = REINTERPRET_CAST( 
  1381         iGbaNafDerivation = REINTERPRET_CAST( 
  1377         	RMmCustomAPI::TSimAuthenticationGbaNafDerivation*, basePtr );
  1382         	RMmCustomAPI::TSimAuthenticationGbaNafDerivation*, basePtr );
  1378 
  1383 
  1379         authenticationDataPackage.PackData( iGbaNafDerivation, &rfStateInfo  ); 
  1384         authenticationDataPackage.PackData( iGbaNafDerivation, &rfStateInfo  ); 
  1380 TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::out EGbaBootstrapNafDerivation" );
  1385 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SIMAUTHENTICATIONL_7,  "CMmCustomTSY: SimAuthenticationL::out EGbaBootstrapNafDerivation" );
  1381         }
  1386         }
  1382     else if ( RMmCustomAPI::TSimAuthenticationBase::EMgvMskUpdate ==
  1387     else if ( RMmCustomAPI::TSimAuthenticationBase::EMgvMskUpdate ==
  1383         basePtr->ExtensionId() )
  1388         basePtr->ExtensionId() )
  1384         {
  1389         {
  1385 TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::in EMgvMskUpdate" );  
  1390 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SIMAUTHENTICATIONL_8,  "CMmCustomTSY: SimAuthenticationL::in EMgvMskUpdate" );
  1386         iMgvMskUpdate = REINTERPRET_CAST( 
  1391         iMgvMskUpdate = REINTERPRET_CAST( 
  1387         	RMmCustomAPI::TSimAuthenticationMgvMskUpdate*, basePtr );
  1392         	RMmCustomAPI::TSimAuthenticationMgvMskUpdate*, basePtr );
  1388 
  1393 
  1389         authenticationDataPackage.PackData( iMgvMskUpdate, &rfStateInfo  ); 
  1394         authenticationDataPackage.PackData( iMgvMskUpdate, &rfStateInfo  ); 
  1390 TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::out EMgvMskUpdate" );
  1395 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SIMAUTHENTICATIONL_9,  "CMmCustomTSY: SimAuthenticationL::out EMgvMskUpdate" );
  1391         }
  1396         }
  1392     else if ( RMmCustomAPI::TSimAuthenticationBase::EMgvMtkGeneration ==
  1397     else if ( RMmCustomAPI::TSimAuthenticationBase::EMgvMtkGeneration ==
  1393         basePtr->ExtensionId() )
  1398         basePtr->ExtensionId() )
  1394         {
  1399         {
  1395 TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::in EMgvMtkGeneration" );
  1400 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SIMAUTHENTICATIONL_10,  "CMmCustomTSY: SimAuthenticationL::in EMgvMtkGeneration" );
  1396         iMgvMtkGeneration = REINTERPRET_CAST( 
  1401         iMgvMtkGeneration = REINTERPRET_CAST( 
  1397         	RMmCustomAPI::TSimAuthenticationMgvMtkGeneration*, basePtr );
  1402         	RMmCustomAPI::TSimAuthenticationMgvMtkGeneration*, basePtr );
  1398 
  1403 
  1399         authenticationDataPackage.PackData( iMgvMtkGeneration, &rfStateInfo  ); 
  1404         authenticationDataPackage.PackData( iMgvMtkGeneration, &rfStateInfo  ); 
  1400 TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::out EMgvMtkGeneration" );
  1405 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SIMAUTHENTICATIONL_11,  "CMmCustomTSY: SimAuthenticationL::out EMgvMtkGeneration" );
  1401         }
  1406         }
  1402     else if ( RMmCustomAPI::TSimAuthenticationBase::EMgvMskDeletion ==
  1407     else if ( RMmCustomAPI::TSimAuthenticationBase::EMgvMskDeletion ==
  1403         basePtr->ExtensionId() )
  1408         basePtr->ExtensionId() )
  1404         {
  1409         {
  1405 TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::in EMgvMskDeletion" );
  1410 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SIMAUTHENTICATIONL_12,  "CMmCustomTSY: SimAuthenticationL::in EMgvMskDeletion" );
  1406         iMgvMskDeletion = REINTERPRET_CAST( 
  1411         iMgvMskDeletion = REINTERPRET_CAST( 
  1407         	RMmCustomAPI::TSimAuthenticationMgvMskDeletion*, basePtr );
  1412         	RMmCustomAPI::TSimAuthenticationMgvMskDeletion*, basePtr );
  1408 
  1413 
  1409         authenticationDataPackage.PackData( iMgvMskDeletion, &rfStateInfo  ); 
  1414         authenticationDataPackage.PackData( iMgvMskDeletion, &rfStateInfo  ); 
  1410 TFLOGSTRING( "CMmCustomTSY: SimAuthenticationL::out EMgvMskDeletion" ); 
  1415 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SIMAUTHENTICATIONL_13,  "CMmCustomTSY: SimAuthenticationL::out EMgvMskDeletion" );
  1411         }
  1416         }
  1412     else
  1417     else
  1413         {
  1418         {
  1414 TFLOGSTRING2( "CMmCustomTSY: Invalid authentication type specified: %d", basePtr->ExtensionId() );
  1419 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SIMAUTHENTICATIONL_14,  "CMmCustomTSY: Invalid authentication type specified: %d", basePtr->ExtensionId() );
  1415         ret = KErrNotSupported;
  1420         ret = KErrNotSupported;
  1416 
  1421 
  1417         iEapSim = NULL;
  1422         iEapSim = NULL;
  1418         iEapAka = NULL;
  1423         iEapAka = NULL;
  1419 		iGbaBootstrap = NULL;
  1424 		iGbaBootstrap = NULL;
  1486 //
  1491 //
  1487 void CMmCustomTsy::CompleteSimAuthentication(
  1492 void CMmCustomTsy::CompleteSimAuthentication(
  1488     CMmDataPackage* aDataPackage,
  1493     CMmDataPackage* aDataPackage,
  1489     TInt aResult )
  1494     TInt aResult )
  1490     {
  1495     {
  1491 TFLOGSTRING( "TSY: CMmCustomTsy::CompleteSimAuthentication" );
  1496 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETESIMAUTHENTICATION_1,  "TSY: CMmCustomTsy::CompleteSimAuthentication" );
  1492     // reset req handle. Returns the deleted req handle
  1497     // reset req handle. Returns the deleted req handle
  1493     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  1498     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  1494         ECustomTsyGetSimAuthenticationData );
  1499         ECustomTsyGetSimAuthenticationData );
  1495 
  1500 
  1496     if ( KErrNone == aResult )
  1501     if ( KErrNone == aResult )
  1534                 ReqCompleted( reqHandle, aResult );
  1539                 ReqCompleted( reqHandle, aResult );
  1535                 }
  1540                 }
  1536             else if ( RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrap ==
  1541             else if ( RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrap ==
  1537                 basePtr->ExtensionId() )
  1542                 basePtr->ExtensionId() )
  1538                 {
  1543                 {
  1539 TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::in EGbaBootstrap" );
  1544 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETESIMAUTHENTICATION_2,  "CMmCustomTSY: CompleteSimAuthentication::in EGbaBootstrap" );
  1540                 RMmCustomAPI::TSimAuthenticationGbaBootstrap* gbaBootstrap;
  1545                 RMmCustomAPI::TSimAuthenticationGbaBootstrap* gbaBootstrap;
  1541 
  1546 
  1542                 aDataPackage->UnPackData( &gbaBootstrap );
  1547                 aDataPackage->UnPackData( &gbaBootstrap );
  1543 
  1548 
  1544                 // Copy data to client
  1549                 // Copy data to client
  1546                 iGbaBootstrap->iAUTS.Copy( gbaBootstrap->iAUTS );
  1551                 iGbaBootstrap->iAUTS.Copy( gbaBootstrap->iAUTS );
  1547 
  1552 
  1548                 iGbaBootstrap = NULL;
  1553                 iGbaBootstrap = NULL;
  1549 
  1554 
  1550                 ReqCompleted( reqHandle, aResult );
  1555                 ReqCompleted( reqHandle, aResult );
  1551 TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::out EGbaBootstrap" );
  1556 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETESIMAUTHENTICATION_3,  "CMmCustomTSY: CompleteSimAuthentication::out EGbaBootstrap" );
  1552                 }
  1557                 }
  1553             else if ( 
  1558             else if ( 
  1554                 RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrapUpdate ==
  1559                 RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrapUpdate ==
  1555                 basePtr->ExtensionId() )
  1560                 basePtr->ExtensionId() )
  1556                 {
  1561                 {
  1557 TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::in EGbaBootstrapUpdate" );                
  1562 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETESIMAUTHENTICATION_4,  "CMmCustomTSY: CompleteSimAuthentication::in EGbaBootstrapUpdate" );
  1558                 RMmCustomAPI::TSimAuthenticationGbaBootstrapUpdate* 
  1563                 RMmCustomAPI::TSimAuthenticationGbaBootstrapUpdate* 
  1559                     gbaBootstrapUpdate;
  1564                     gbaBootstrapUpdate;
  1560 
  1565 
  1561                 aDataPackage->UnPackData( &gbaBootstrapUpdate );
  1566                 aDataPackage->UnPackData( &gbaBootstrapUpdate );
  1562 
  1567 
  1565                     gbaBootstrapUpdate->iRandomParameters );
  1570                     gbaBootstrapUpdate->iRandomParameters );
  1566 
  1571 
  1567                 iGbaBootstrapUpdate = NULL;
  1572                 iGbaBootstrapUpdate = NULL;
  1568 
  1573 
  1569                 ReqCompleted( reqHandle, aResult );
  1574                 ReqCompleted( reqHandle, aResult );
  1570 TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::out EGbaBootstrapUpdate" );
  1575 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETESIMAUTHENTICATION_5,  "CMmCustomTSY: CompleteSimAuthentication::out EGbaBootstrapUpdate" );
  1571                 }
  1576                 }
  1572             else if ( 
  1577             else if ( 
  1573                 RMmCustomAPI::TSimAuthenticationBase::
  1578                 RMmCustomAPI::TSimAuthenticationBase::
  1574                     EGbaBootstrapNafDerivation == basePtr->ExtensionId() )
  1579                     EGbaBootstrapNafDerivation == basePtr->ExtensionId() )
  1575                 {
  1580                 {
  1576 TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::in EGbaBootstrapNafDerivation" );                
  1581 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETESIMAUTHENTICATION_6,  "CMmCustomTSY: CompleteSimAuthentication::in EGbaBootstrapNafDerivation" );
  1577                 RMmCustomAPI::TSimAuthenticationGbaNafDerivation* 
  1582                 RMmCustomAPI::TSimAuthenticationGbaNafDerivation* 
  1578                     gbaNafDerivation;
  1583                     gbaNafDerivation;
  1579 
  1584 
  1580                 aDataPackage->UnPackData( &gbaNafDerivation );
  1585                 aDataPackage->UnPackData( &gbaNafDerivation );
  1581 
  1586 
  1584                     gbaNafDerivation->iKsExtNaf );
  1589                     gbaNafDerivation->iKsExtNaf );
  1585 
  1590 
  1586                 iGbaNafDerivation = NULL;
  1591                 iGbaNafDerivation = NULL;
  1587 
  1592 
  1588                 ReqCompleted( reqHandle, aResult );
  1593                 ReqCompleted( reqHandle, aResult );
  1589 TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::out EGbaBootstrapNafDerivation" );                
  1594 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETESIMAUTHENTICATION_7,  "CMmCustomTSY: CompleteSimAuthentication::out EGbaBootstrapNafDerivation" );
  1590                 }
  1595                 }
  1591             else if ( RMmCustomAPI::TSimAuthenticationBase::EMgvMskUpdate ==
  1596             else if ( RMmCustomAPI::TSimAuthenticationBase::EMgvMskUpdate ==
  1592                     basePtr->ExtensionId() )
  1597                     basePtr->ExtensionId() )
  1593                 {
  1598                 {
  1594 TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::in EMgvMskUpdate" );                
  1599 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETESIMAUTHENTICATION_8,  "CMmCustomTSY: CompleteSimAuthentication::in EMgvMskUpdate" );
  1595                 RMmCustomAPI::TSimAuthenticationMgvMskUpdate* mgvMskUpdate;
  1600                 RMmCustomAPI::TSimAuthenticationMgvMskUpdate* mgvMskUpdate;
  1596 
  1601 
  1597                 aDataPackage->UnPackData( &mgvMskUpdate );
  1602                 aDataPackage->UnPackData( &mgvMskUpdate );
  1598 
  1603 
  1599                 // Copy data to client
  1604                 // Copy data to client
  1604                 iMgvMskUpdate->iSecurityPolicyExt.Copy( mgvMskUpdate->iSecurityPolicyExt );
  1609                 iMgvMskUpdate->iSecurityPolicyExt.Copy( mgvMskUpdate->iSecurityPolicyExt );
  1605                                
  1610                                
  1606                 iMgvMskUpdate = NULL;
  1611                 iMgvMskUpdate = NULL;
  1607 
  1612 
  1608                 ReqCompleted( reqHandle, aResult );
  1613                 ReqCompleted( reqHandle, aResult );
  1609 TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::out EMgvMskUpdate" );
  1614 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETESIMAUTHENTICATION_9,  "CMmCustomTSY: CompleteSimAuthentication::out EMgvMskUpdate" );
  1610                 }
  1615                 }
  1611             else if ( RMmCustomAPI::TSimAuthenticationBase::
  1616             else if ( RMmCustomAPI::TSimAuthenticationBase::
  1612                     EMgvMtkGeneration == basePtr->ExtensionId() )
  1617                     EMgvMtkGeneration == basePtr->ExtensionId() )
  1613                 {
  1618                 {
  1614 TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::in EMgvMtkGeneration" );                
  1619 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETESIMAUTHENTICATION_10,  "CMmCustomTSY: CompleteSimAuthentication::in EMgvMtkGeneration" );
  1615                 RMmCustomAPI::TSimAuthenticationMgvMtkGeneration* 
  1620                 RMmCustomAPI::TSimAuthenticationMgvMtkGeneration* 
  1616                     mgvMtkGeneration;
  1621                     mgvMtkGeneration;
  1617 
  1622 
  1618                 aDataPackage->UnPackData( &mgvMtkGeneration );
  1623                 aDataPackage->UnPackData( &mgvMtkGeneration );
  1619 
  1624 
  1624                 iMgvMtkGeneration->iParentalControl.Copy( mgvMtkGeneration->iParentalControl );
  1629                 iMgvMtkGeneration->iParentalControl.Copy( mgvMtkGeneration->iParentalControl );
  1625                 iMgvMtkGeneration->iTrafficEncryptionKey.Copy( mgvMtkGeneration->iTrafficEncryptionKey );
  1630                 iMgvMtkGeneration->iTrafficEncryptionKey.Copy( mgvMtkGeneration->iTrafficEncryptionKey );
  1626                 iMgvMtkGeneration = NULL;
  1631                 iMgvMtkGeneration = NULL;
  1627 
  1632 
  1628                 ReqCompleted( reqHandle, aResult );
  1633                 ReqCompleted( reqHandle, aResult );
  1629 TFLOGSTRING( "CMmCustomTSY: CompleteSimAuthentication::out EMgvMtkGeneration" ); 
  1634 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETESIMAUTHENTICATION_11,  "CMmCustomTSY: CompleteSimAuthentication::out EMgvMtkGeneration" );
  1630                 }
  1635                 }
  1631             else if ( RMmCustomAPI::TSimAuthenticationBase::
  1636             else if ( RMmCustomAPI::TSimAuthenticationBase::
  1632                     EMgvMskDeletion == basePtr->ExtensionId() )
  1637                     EMgvMskDeletion == basePtr->ExtensionId() )
  1633                 {
  1638                 {
  1634                 ReqCompleted( reqHandle, aResult );
  1639                 ReqCompleted( reqHandle, aResult );
  1635                 }
  1640                 }
  1636             else
  1641             else
  1637                 {
  1642                 {
  1638 TFLOGSTRING2( "CMmCustomTSY: Invalid authentication type specified: %d", basePtr->ExtensionId() );
  1643 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETESIMAUTHENTICATION_12,  "CMmCustomTSY: Invalid authentication type specified: %d", basePtr->ExtensionId() );
  1639                 aResult = KErrArgument;
  1644                 aResult = KErrArgument;
  1640                 ReqCompleted( reqHandle, aResult );
  1645                 ReqCompleted( reqHandle, aResult );
  1641                 }
  1646                 }
  1642             }
  1647             }
  1643         }
  1648         }
  1675                     }
  1680                     }
  1676                 
  1681                 
  1677                 else if( RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrap ==
  1682                 else if( RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrap ==
  1678                         basePtr->ExtensionId() )
  1683                         basePtr->ExtensionId() )
  1679                     {
  1684                     {
  1680 TFLOGSTRING( "TSYMH: CompleteSimAuthentication RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrap" );
  1685 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETESIMAUTHENTICATION_13,  "TSYMH: CompleteSimAuthentication RMmCustomAPI::TSimAuthenticationBase::EGbaBootstrap" );
  1681                     RMmCustomAPI::TSimAuthenticationGbaBootstrap* gbabootstrap;
  1686                     RMmCustomAPI::TSimAuthenticationGbaBootstrap* gbabootstrap;
  1682                     aDataPackage->UnPackData( &gbabootstrap );
  1687                     aDataPackage->UnPackData( &gbabootstrap );
  1683 
  1688 
  1684                     iGbaBootstrap->iAUTS.Copy( gbabootstrap->iAUTS );
  1689                     iGbaBootstrap->iAUTS.Copy( gbabootstrap->iAUTS );
  1685                     }
  1690                     }
  1760     delete sha1;
  1765     delete sha1;
  1761     sha1 = NULL;
  1766     sha1 = NULL;
  1762 
  1767 
  1763     if ( KErrArgument == ret && 0 == iFreshBitCounter )
  1768     if ( KErrArgument == ret && 0 == iFreshBitCounter )
  1764        {
  1769        {
  1765 TFLOGSTRING( "CMmCustomTsy: RAND rejected" );
  1770 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_CHECKRANDVALIDITYL_1,  "CMmCustomTsy: RAND rejected" );
  1766        }
  1771        }
  1767 
  1772 
  1768     return ret;
  1773     return ret;
  1769     }
  1774     }
  1770 
  1775 
  1799         {
  1804         {
  1800         ret = file.Create( fs, KRandDb, EFileShareAny );
  1805         ret = file.Create( fs, KRandDb, EFileShareAny );
  1801 
  1806 
  1802         if ( KErrNone != ret )
  1807         if ( KErrNone != ret )
  1803             {
  1808             {
  1804 TFLOGSTRING( "TSY: CMmCustomTsy: 'rand_db.cur' creation failed!" );
  1809 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_CREATERANDDB_1,  "TSY: CMmCustomTsy: 'rand_db.cur' creation failed!" );
  1805             }
  1810             }
  1806         else if ( KErrNone == ret )
  1811         else if ( KErrNone == ret )
  1807             {
  1812             {
  1808             ret = file.Open( fs, KRandDb, EFileShareAny | EFileWrite );
  1813             ret = file.Open( fs, KRandDb, EFileShareAny | EFileWrite );
  1809 
  1814 
  1839                     ret = file.Write( counter, empty, writeSize );
  1844                     ret = file.Write( counter, empty, writeSize );
  1840                     }
  1845                     }
  1841 
  1846 
  1842                 if ( KErrNone != ret )
  1847                 if ( KErrNone != ret )
  1843                     {
  1848                     {
  1844 TFLOGSTRING( "TSY: CMmCustomTsy: 'rand_db.cur' initialization failed!" );
  1849 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_CREATERANDDB_2,  "TSY: CMmCustomTsy: 'rand_db.cur' initialization failed!" );
  1845                     file.Close();
  1850                     file.Close();
  1846                     }
  1851                     }
  1847                 }
  1852                 }
  1848             else
  1853             else
  1849                 {
  1854                 {
  1850 TFLOGSTRING( "TSY: CMmCustomTsy: 'rand_db.cur' open failed!" );
  1855 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_CREATERANDDB_3,  "TSY: CMmCustomTsy: 'rand_db.cur' open failed!" );
  1851                 }
  1856                 }
  1852             }
  1857             }
  1853 
  1858 
  1854         if ( KErrNone == ret )
  1859         if ( KErrNone == ret )
  1855             {
  1860             {
  1861             fs.Close();
  1866             fs.Close();
  1862             }
  1867             }
  1863         }
  1868         }
  1864     else
  1869     else
  1865         {
  1870         {
  1866 TFLOGSTRING( "TSY: CMmCustomTsy: Could not connect to file server!" );
  1871 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_CREATERANDDB_4,  "TSY: CMmCustomTsy: Could not connect to file server!" );
  1867         }
  1872         }
  1868 
  1873 
  1869     // Give some time for file.Close() and fs.Close() to complete
  1874     // Give some time for file.Close() and fs.Close() to complete
  1870     User::After( 200000 );
  1875     User::After( 200000 );
  1871 
  1876 
  1918                 {
  1923                 {
  1919                 ret = file.Open( fs, KRandDb, EFileShareExclusive |
  1924                 ret = file.Open( fs, KRandDb, EFileShareExclusive |
  1920                     EFileWrite );
  1925                     EFileWrite );
  1921                 if( KErrNone != ret )
  1926                 if( KErrNone != ret )
  1922                     {
  1927                     {
  1923 TFLOGSTRING( "TSY: CMmCustomTsy: rand_db open failed" );
  1928 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_INSERTBLOBSTORANDDB_1,  "TSY: CMmCustomTsy: rand_db open failed" );
  1924                     }
  1929                     }
  1925                 }
  1930                 }
  1926             if ( KErrNone != ret )
  1931             if ( KErrNone != ret )
  1927                 {
  1932                 {
  1928                 fs.Close();
  1933                 fs.Close();
  1983         file.Close();
  1988         file.Close();
  1984         fs.Close();
  1989         fs.Close();
  1985         }
  1990         }
  1986     else
  1991     else
  1987         {
  1992         {
  1988 TFLOGSTRING( "TSY: CMmCustomTsy: Could not connect to file server!" );
  1993 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_INSERTBLOBSTORANDDB_2,  "TSY: CMmCustomTsy: Could not connect to file server!" );
  1989         return ret;
  1994         return ret;
  1990         }
  1995         }
  1991 
  1996 
  1992     // if no new bits were found e.g. RAND will be rejected
  1997     // if no new bits were found e.g. RAND will be rejected
  1993     if ( 0 == iFreshBitCounter )
  1998     if ( 0 == iFreshBitCounter )
  2081 
  2086 
  2082         fs.Close();
  2087         fs.Close();
  2083         }
  2088         }
  2084     else
  2089     else
  2085         {
  2090         {
  2086 TFLOGSTRING( "TSY: CMmCustomTsy: Could not connect to file server!" );
  2091 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_UPDATEBITCOUNTER_1,  "TSY: CMmCustomTsy: Could not connect to file server!" );
  2087         }
  2092         }
  2088 
  2093 
  2089     return ret;
  2094     return ret;
  2090     }
  2095     }
  2091 
  2096 
  2329 // ---------------------------------------------------------------------------
  2334 // ---------------------------------------------------------------------------
  2330 //
  2335 //
  2331 void CMmCustomTsy::CompleteTerminateCall(
  2336 void CMmCustomTsy::CompleteTerminateCall(
  2332     TInt aError )
  2337     TInt aError )
  2333     {
  2338     {
  2334 TFLOGSTRING2( "TSY: CMmCustomTsy::CompleteTerminateCall - aError: %d", aError );
  2339 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETETERMINATECALL_1,  "TSY: CMmCustomTsy::CompleteTerminateCall - aError: %d", aError );
  2335 
  2340 
  2336     // reset req handle. Returns the deleted req handle
  2341     // reset req handle. Returns the deleted req handle
  2337     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  2342     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  2338         ECustomTsyTerminateCall );
  2343         ECustomTsyTerminateCall );
  2339 
  2344 
  2354 // ---------------------------------------------------------------------------
  2359 // ---------------------------------------------------------------------------
  2355 //
  2360 //
  2356 TInt CMmCustomTsy::NotifyDtmfEvent(
  2361 TInt CMmCustomTsy::NotifyDtmfEvent(
  2357         RMmCustomAPI::TDtmfInfo* aInfo )
  2362         RMmCustomAPI::TDtmfInfo* aInfo )
  2358     {
  2363     {
  2359 TFLOGSTRING("TSY: CMmCustomTsy::NotifyDtmfEvent");
  2364 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_NOTIFYDTMFEVENT_1, "TSY: CMmCustomTsy::NotifyDtmfEvent");
  2360     // save pointer to client data
  2365     // save pointer to client data
  2361     iNotifyInfo = aInfo;
  2366     iNotifyInfo = aInfo;
  2362 
  2367 
  2363     // save handle type
  2368     // save handle type
  2364     iReqHandleType = ECustomTsyNotifyDtmfEvent;
  2369     iReqHandleType = ECustomTsyNotifyDtmfEvent;
  2374 //
  2379 //
  2375 void CMmCustomTsy::CompleteNotifyDtmfEvent(
  2380 void CMmCustomTsy::CompleteNotifyDtmfEvent(
  2376     RMmCustomAPI::TDtmfInfo aInfo,
  2381     RMmCustomAPI::TDtmfInfo aInfo,
  2377     TInt aErrorCode )
  2382     TInt aErrorCode )
  2378     {
  2383     {
  2379 TFLOGSTRING("TSY: CMmCustomTsy::CompleteNotifyDtmfEvent");
  2384 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETENOTIFYDTMFEVENT_1, "TSY: CMmCustomTsy::CompleteNotifyDtmfEvent");
  2380     // reset request handle. Returns the deleted req handle.
  2385     // reset request handle. Returns the deleted req handle.
  2381     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  2386     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  2382         ECustomTsyNotifyDtmfEvent );
  2387         ECustomTsyNotifyDtmfEvent );
  2383 
  2388 
  2384     // check if request was called
  2389     // check if request was called
  2441         TUint8 diags = mmCall->GetDiagnostics();
  2446         TUint8 diags = mmCall->GetDiagnostics();
  2442         //gets diagnostic value - check value -  return error code
  2447         //gets diagnostic value - check value -  return error code
  2443 
  2448 
  2444         if ( 0 != diags )
  2449         if ( 0 != diags )
  2445             {
  2450             {
  2446 TFLOGSTRING3( "TSY:CMmCustomTsy::GetDiagnosticInfo: Diagnostic info=%d asked for call id=%d", diags, mmCall->CallId() );
  2451 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETDIAGNOSTICINFO_1,  "TSY:CMmCustomTsy::GetDiagnosticInfo: Diagnostic info=%d asked for call id=%d", diags, mmCall->CallId() );
  2447             switch ( diags )
  2452             switch ( diags )
  2448                 {                
  2453                 {                
  2449                 case KDiagnosticInfoBarredWithCUG:
  2454                 case KDiagnosticInfoBarredWithCUG:
  2450                     errorValue = KErrDiagnosticInfoBarredWithCUG;
  2455                     errorValue = KErrDiagnosticInfoBarredWithCUG;
  2451                     break;
  2456                     break;
  2473                 default:
  2478                 default:
  2474                     errorValue = KErrNone;
  2479                     errorValue = KErrNone;
  2475                     break;
  2480                     break;
  2476                 }
  2481                 }
  2477             }
  2482             }
  2478 TFLOGSTRING2( "TSY: CMmCustomTsy::GetDiagnosticInfo - ReqCompleted - Error code: %d", errorValue );
  2483 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETDIAGNOSTICINFO_2,  "TSY: CMmCustomTsy::GetDiagnosticInfo - ReqCompleted - Error code: %d", errorValue );
  2479         // complete errorvalue to client  - inform change  
  2484         // complete errorvalue to client  - inform change  
  2480         ReqCompleted( aTsyReqHandle, errorValue ); 
  2485         ReqCompleted( aTsyReqHandle, errorValue ); 
  2481         }
  2486         }
  2482     else
  2487     else
  2483         {
  2488         {
  2484          // call is not found
  2489          // call is not found
  2485 TFLOGSTRING("TSY: CMmCustomTsy::GetDiagnosticInfo - Call is not found");
  2490 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETDIAGNOSTICINFO_3, "TSY: CMmCustomTsy::GetDiagnosticInfo - Call is not found");
  2486         ReqCompleted( aTsyReqHandle, KErrNotFound );
  2491         ReqCompleted( aTsyReqHandle, KErrNotFound );
  2487         }
  2492         }
  2488 TFLOGSTRING2( "TSY: CMmCustomTsy::GetDiagnosticInfo - Error code: %d", errorValue );
  2493 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETDIAGNOSTICINFO_4,  "TSY: CMmCustomTsy::GetDiagnosticInfo - Error code: %d", errorValue );
  2489    
  2494    
  2490     return KErrNone;
  2495     return KErrNone;
  2491     }
  2496     }
  2492 
  2497 
  2493 // ---------------------------------------------------------------------------
  2498 // ---------------------------------------------------------------------------
  2519 //
  2524 //
  2520 TInt CMmCustomTsy::GetRemoteAlertingToneStatus(
  2525 TInt CMmCustomTsy::GetRemoteAlertingToneStatus(
  2521     const TTsyReqHandle aTsyReqHandle,
  2526     const TTsyReqHandle aTsyReqHandle,
  2522     RMmCustomAPI::TRemoteAlertingToneStatus* aToneStatus )
  2527     RMmCustomAPI::TRemoteAlertingToneStatus* aToneStatus )
  2523     {
  2528     {
  2524 TFLOGSTRING("TSY: CMmCustomTsy::GetRemoteAlertingToneStatus");
  2529 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETREMOTEALERTINGTONESTATUS_1, "TSY: CMmCustomTsy::GetRemoteAlertingToneStatus");
  2525     TInt ret = iMmCustomExtInterface->GetRemoteAlertingToneStatus(
  2530     TInt ret = iMmCustomExtInterface->GetRemoteAlertingToneStatus(
  2526         aToneStatus );
  2531         aToneStatus );
  2527 
  2532 
  2528     ReqCompleted( aTsyReqHandle, ret );
  2533     ReqCompleted( aTsyReqHandle, ret );
  2529 
  2534 
  2578 //
  2583 //
  2579 TInt CMmCustomTsy::GetAlsBlockedL(
  2584 TInt CMmCustomTsy::GetAlsBlockedL(
  2580     const TTsyReqHandle aTsyReqHandle,
  2585     const TTsyReqHandle aTsyReqHandle,
  2581     RMmCustomAPI::TGetAlsBlockStatus* aBlockStatus )
  2586     RMmCustomAPI::TGetAlsBlockStatus* aBlockStatus )
  2582     {
  2587     {
  2583 TFLOGSTRING3( "TSY: CMmCustomTsy::GetAlsBlockedL - Req handle: %d, Block status: %d", aTsyReqHandle, *aBlockStatus );
  2588 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETALSBLOCKEDL_1,  "TSY: CMmCustomTsy::GetAlsBlockedL - Req handle: %d, Block status: %d", aTsyReqHandle, *aBlockStatus );
  2584     TTsyReqHandle getAlsBlockedHandle =
  2589     TTsyReqHandle getAlsBlockedHandle =
  2585         iTsyReqHandleStore->GetTsyReqHandle( ECustomTsyGetAlsBlocked );
  2590         iTsyReqHandleStore->GetTsyReqHandle( ECustomTsyGetAlsBlocked );
  2586 
  2591 
  2587     if ( 0 < getAlsBlockedHandle )
  2592     if ( 0 < getAlsBlockedHandle )
  2588         {
  2593         {
  2623 //
  2628 //
  2624 void CMmCustomTsy::CompleteGetAlsBlocked(
  2629 void CMmCustomTsy::CompleteGetAlsBlocked(
  2625     RMmCustomAPI::TGetAlsBlockStatus  aBlockStatus,
  2630     RMmCustomAPI::TGetAlsBlockStatus  aBlockStatus,
  2626     TInt aErrorCode )
  2631     TInt aErrorCode )
  2627     {
  2632     {
  2628 TFLOGSTRING3( "TSY: CMmCustomTsy::CompleteGetAlsBlocked - Block status: %d, Error code: %d", aBlockStatus, aErrorCode );
  2633 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETEGETALSBLOCKED_1,  "TSY: CMmCustomTsy::CompleteGetAlsBlocked - Block status: %d, Error code: %d", aBlockStatus, aErrorCode );
  2629     //reset req handle. Returns the deleted req handle
  2634     //reset req handle. Returns the deleted req handle
  2630     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  2635     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  2631         ECustomTsyGetAlsBlocked );
  2636         ECustomTsyGetAlsBlocked );
  2632 
  2637 
  2633     // check if request was called
  2638     // check if request was called
  2725 //
  2730 //
  2726 TInt CMmCustomTsy::SetAlsBlockedL(
  2731 TInt CMmCustomTsy::SetAlsBlockedL(
  2727     const TTsyReqHandle aTsyReqHandle,
  2732     const TTsyReqHandle aTsyReqHandle,
  2728     RMmCustomAPI::TSetAlsBlock* aBlockStatus )
  2733     RMmCustomAPI::TSetAlsBlock* aBlockStatus )
  2729     {
  2734     {
  2730 TFLOGSTRING3( "TSY: CMmCustomTsy::SetAlsBlockedL - Req handle: %d, Block status: %d", aTsyReqHandle, *aBlockStatus );
  2735 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SETALSBLOCKEDL_1,  "TSY: CMmCustomTsy::SetAlsBlockedL - Req handle: %d, Block status: %d", aTsyReqHandle, *aBlockStatus );
  2731     // get the handle
  2736     // get the handle
  2732     TTsyReqHandle setAlsBlockedHandle =
  2737     TTsyReqHandle setAlsBlockedHandle =
  2733         iTsyReqHandleStore->GetTsyReqHandle( ECustomTsySetAlsBlocked );
  2738         iTsyReqHandleStore->GetTsyReqHandle( ECustomTsySetAlsBlocked );
  2734 
  2739 
  2735     if ( setAlsBlockedHandle > 0 )
  2740     if ( setAlsBlockedHandle > 0 )
  2775 // ---------------------------------------------------------------------------
  2780 // ---------------------------------------------------------------------------
  2776 //
  2781 //
  2777 void CMmCustomTsy::CompleteSetAlsBlocked(
  2782 void CMmCustomTsy::CompleteSetAlsBlocked(
  2778     TInt aErrorCode )
  2783     TInt aErrorCode )
  2779     {
  2784     {
  2780 TFLOGSTRING2( "TSY: CMmCustomTsy::CompleteSetAlsBlocked - Error code: %d", aErrorCode );
  2785 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETESETALSBLOCKED_1,  "TSY: CMmCustomTsy::CompleteSetAlsBlocked - Error code: %d", aErrorCode );
  2781     // get reaq handle for NotifyAlsBlockedChanged
  2786     // get reaq handle for NotifyAlsBlockedChanged
  2782     TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
  2787     TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
  2783         ECustomTsyNotifyAlsBlockedChanged );
  2788         ECustomTsyNotifyAlsBlockedChanged );
  2784 
  2789 
  2785     // check if notification was requested and Set was ok
  2790     // check if notification was requested and Set was ok
  2847             }
  2852             }
  2848         else // EDeactivateBlock == *iSetBlockStatus
  2853         else // EDeactivateBlock == *iSetBlockStatus
  2849             {
  2854             {
  2850             *iRetNotifyAlsBlockStatus = RMmCustomAPI::EBlockStatusInactive;
  2855             *iRetNotifyAlsBlockStatus = RMmCustomAPI::EBlockStatusInactive;
  2851             }
  2856             }
  2852 TFLOGSTRING2( "TSY: CMmCustomTsy::CompleteNotifyAlsBlockedChanged - Block status: %d", *iSetBlockStatus );
  2857 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETENOTIFYALSBLOCKEDCHANGED_1,  "TSY: CMmCustomTsy::CompleteNotifyAlsBlockedChanged - Block status: %d", *iSetBlockStatus );
  2853 
  2858 
  2854         // reset the varible
  2859         // reset the varible
  2855         iRetNotifyAlsBlockStatus = NULL;
  2860         iRetNotifyAlsBlockStatus = NULL;
  2856 
  2861 
  2857         // complete
  2862         // complete
  2889 //
  2894 //
  2890 TInt CMmCustomTsy::GetAlsPpSupportL(
  2895 TInt CMmCustomTsy::GetAlsPpSupportL(
  2891     const TTsyReqHandle aTsyReqHandle,
  2896     const TTsyReqHandle aTsyReqHandle,
  2892     RMmCustomAPI::TAlsSupport* aSupport )
  2897     RMmCustomAPI::TAlsSupport* aSupport )
  2893     {
  2898     {
  2894 TFLOGSTRING( "TSY: CMmCustomTsy::GetAlsPpSupportL");
  2899 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETALSPPSUPPORTL_1,  "TSY: CMmCustomTsy::GetAlsPpSupportL");
  2895     // save pointer to client space
  2900     // save pointer to client space
  2896     iAlsSupport = aSupport;
  2901     iAlsSupport = aSupport;
  2897     
  2902     
  2898     TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
  2903     TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
  2899         ECustomTsyGetAlsPpSupport );
  2904         ECustomTsyGetAlsPpSupport );
  2900 
  2905 
  2901     if ( 0 < reqHandle )
  2906     if ( 0 < reqHandle )
  2902         {
  2907         {
  2903 TFLOGSTRING( "TSY: CMmCustomTsy::GetAlsPpSupportL - Already processing, save handle");
  2908 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETALSPPSUPPORTL_2,  "TSY: CMmCustomTsy::GetAlsPpSupportL - Already processing, save handle");
  2904         //The request is already in processing because of previous request
  2909         //The request is already in processing because of previous request
  2905         //Complete request with status value informing the client about
  2910         //Complete request with status value informing the client about
  2906 		TCheckAlsPpSupportRequest* req = 
  2911 		TCheckAlsPpSupportRequest* req = 
  2907                               new (ELeave) TCheckAlsPpSupportRequest();
  2912                               new (ELeave) TCheckAlsPpSupportRequest();
  2908 		req->iReqHandle = aTsyReqHandle;
  2913 		req->iReqHandle = aTsyReqHandle;
  2919         {
  2924         {
  2920         ReqCompleted( aTsyReqHandle, ret );
  2925         ReqCompleted( aTsyReqHandle, ret );
  2921         }
  2926         }
  2922     else
  2927     else
  2923         {
  2928         {
  2924 TFLOGSTRING( "TSY: CMmCustomTsy::GetAlsPpSupportL - Save handle");
  2929 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETALSPPSUPPORTL_3,  "TSY: CMmCustomTsy::GetAlsPpSupportL - Save handle");
  2925         // Save the req handle type
  2930         // Save the req handle type
  2926         iReqHandleType = ECustomTsyGetAlsPpSupport;
  2931         iReqHandleType = ECustomTsyGetAlsPpSupport;
  2927 			// save request in queue for completion
  2932 			// save request in queue for completion
  2928 			TCheckAlsPpSupportRequest* req = 
  2933 			TCheckAlsPpSupportRequest* req = 
  2929                               new (ELeave) TCheckAlsPpSupportRequest();
  2934                               new (ELeave) TCheckAlsPpSupportRequest();
  2942 // (other items were commented in a header).
  2947 // (other items were commented in a header).
  2943 // ---------------------------------------------------------------------------
  2948 // ---------------------------------------------------------------------------
  2944 //
  2949 //
  2945 TInt CMmCustomTsy::GetAlsPpSupportCancel()
  2950 TInt CMmCustomTsy::GetAlsPpSupportCancel()
  2946     {
  2951     {
  2947 TFLOGSTRING( "TSY: CMmCustomTsy::GetAlsPpSupportCancel");
  2952 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETALSPPSUPPORTCANCEL_1,  "TSY: CMmCustomTsy::GetAlsPpSupportCancel");
  2948     // reset the pointer to client data
  2953     // reset the pointer to client data
  2949     iAlsSupport = NULL;
  2954     iAlsSupport = NULL;
  2950 
  2955 
  2951     // reset the reqhandle
  2956     // reset the reqhandle
  2952     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  2957     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  2953         ECustomTsyGetAlsPpSupport );
  2958         ECustomTsyGetAlsPpSupport );
  2954 
  2959 
  2955     // complete
  2960     // complete
  2956     TInt checkAlsPpSupportRequestsCount = 
  2961     TInt checkAlsPpSupportRequestsCount = 
  2957         iCheckAlsPpSupportRequests.Count();
  2962         iCheckAlsPpSupportRequests.Count();
  2958 TFLOGSTRING2( "TSY: CMmCustomTsy::GetAlsPpSupportCancel - Cancel %d requests", checkAlsPpSupportRequestsCount );
  2963 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETALSPPSUPPORTCANCEL_2,  "TSY: CMmCustomTsy::GetAlsPpSupportCancel - Cancel %d requests", checkAlsPpSupportRequestsCount );
  2959 
  2964 
  2960 	for ( TInt i=0; i < checkAlsPpSupportRequestsCount ; i++ )
  2965 	for ( TInt i=0; i < checkAlsPpSupportRequestsCount ; i++ )
  2961 		{
  2966 		{
  2962         TCheckAlsPpSupportRequest* req = 
  2967         TCheckAlsPpSupportRequest* req = 
  2963             iCheckAlsPpSupportRequests[ i ];
  2968             iCheckAlsPpSupportRequests[ i ];
  2979 //
  2984 //
  2980 void CMmCustomTsy::CompleteGetAlsPpSupport(
  2985 void CMmCustomTsy::CompleteGetAlsPpSupport(
  2981     RMmCustomAPI::TAlsSupport aAlsSupport,
  2986     RMmCustomAPI::TAlsSupport aAlsSupport,
  2982     TInt aErrorCode )
  2987     TInt aErrorCode )
  2983     {
  2988     {
  2984 TFLOGSTRING3( "TSY: CMmCustomTsy::CompleteGetAlsPpSupport - ALS support: %d, Error: %d", aAlsSupport, aErrorCode );
  2989 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETEGETALSPPSUPPORT_1,  "TSY: CMmCustomTsy::CompleteGetAlsPpSupport - ALS support: %d, Error: %d", aAlsSupport, aErrorCode );
  2985     TBool status = EFalse;
  2990     TBool status = EFalse;
  2986     
  2991     
  2987     // Check if the get was called internally during boot
  2992     // Check if the get was called internally during boot
  2988     if( iMmPhoneTsy->GetAlsQueryInBoot() )
  2993     if( iMmPhoneTsy->GetAlsQueryInBoot() )
  2989         {
  2994         {
  2990     	if( RMmCustomAPI::EAlsSupportOn == aAlsSupport )
  2995     	if( RMmCustomAPI::EAlsSupportOn == aAlsSupport )
  2991             {
  2996             {
  2992 TFLOGSTRING( "TSY: CMmCustomTsy::CompleteGetAlsPpSupport - ALS supported by SIM" );
  2997 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETEGETALSPPSUPPORT_2,  "TSY: CMmCustomTsy::CompleteGetAlsPpSupport - ALS supported by SIM" );
  2993             status = ETrue;
  2998             status = ETrue;
  2994             }
  2999             }
  2995         //Update ALS status from sim
  3000         //Update ALS status from sim
  2996         iMmPhoneTsy->SetAlsState( status );
  3001         iMmPhoneTsy->SetAlsState( status );
  2997     	iMmPhoneTsy->SetAlsQueryInBoot( EFalse );
  3002     	iMmPhoneTsy->SetAlsQueryInBoot( EFalse );
  3010             // set the information for the client
  3015             // set the information for the client
  3011             *iAlsSupport = aAlsSupport;
  3016             *iAlsSupport = aAlsSupport;
  3012 
  3017 
  3013             if( RMmCustomAPI::EAlsSupportOn == aAlsSupport )
  3018             if( RMmCustomAPI::EAlsSupportOn == aAlsSupport )
  3014             	{
  3019             	{
  3015 TFLOGSTRING( "TSY: CMmCustomTsy::CompleteGetAlsPpSupport - ALS supported by SIM" );
  3020 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETEGETALSPPSUPPORT_3,  "TSY: CMmCustomTsy::CompleteGetAlsPpSupport - ALS supported by SIM" );
  3016             	status = ETrue;
  3021             	status = ETrue;
  3017             	}
  3022             	}
  3018             //Update ALS status from sim
  3023             //Update ALS status from sim
  3019             iMmPhoneTsy->SetAlsState( status );
  3024             iMmPhoneTsy->SetAlsState( status );
  3020             }
  3025             }
  3022         // reset the internal variable
  3027         // reset the internal variable
  3023         iAlsSupport = NULL;
  3028         iAlsSupport = NULL;
  3024         // complete
  3029         // complete
  3025         TInt checkAlsPpSupportRequestsCount = 
  3030         TInt checkAlsPpSupportRequestsCount = 
  3026             iCheckAlsPpSupportRequests.Count();
  3031             iCheckAlsPpSupportRequests.Count();
  3027 TFLOGSTRING2( "TSY: CMmCustomTsy::CompleteGetAlsPpSupport - Complete %d requests", checkAlsPpSupportRequestsCount );
  3032 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETEGETALSPPSUPPORT_4,  "TSY: CMmCustomTsy::CompleteGetAlsPpSupport - Complete %d requests", checkAlsPpSupportRequestsCount );
  3028 
  3033 
  3029 		for ( TInt i=0; i < checkAlsPpSupportRequestsCount ; i++ )
  3034 		for ( TInt i=0; i < checkAlsPpSupportRequestsCount ; i++ )
  3030 			{
  3035 			{
  3031             TCheckAlsPpSupportRequest* req = 
  3036             TCheckAlsPpSupportRequest* req = 
  3032                 iCheckAlsPpSupportRequests[ i ];
  3037                 iCheckAlsPpSupportRequests[ i ];
  3204 void CMmCustomTsy::CompleteNotifyCipheringInfoChange(
  3209 void CMmCustomTsy::CompleteNotifyCipheringInfoChange(
  3205     TBool aCipherIndStatus,
  3210     TBool aCipherIndStatus,
  3206     TBool aCipherStatus,
  3211     TBool aCipherStatus,
  3207     TInt aErrorCode )
  3212     TInt aErrorCode )
  3208     {
  3213     {
  3209 TFLOGSTRING("TSY:CMmCustomTsy::CompleteNotifyCipheringInfoChange entered");
  3214 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETENOTIFYCIPHERINGINFOCHANGE_1, "TSY:CMmCustomTsy::CompleteNotifyCipheringInfoChange entered");
  3210     // this is special case, only called when Ciphering indicator
  3215     // this is special case, only called when Ciphering indicator
  3211     // is forced off for some operators
  3216     // is forced off for some operators
  3212     if ( iMmPhoneTsy->GetNetTsy()->CipheringIndicatorForcedOff() )
  3217     if ( iMmPhoneTsy->GetNetTsy()->CipheringIndicatorForcedOff() )
  3213         {
  3218         {
  3214 TFLOGSTRING("TSY:CMmCustomTsy::CompleteNotifyCipheringInfoChange: Ciphering forced off");
  3219 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETENOTIFYCIPHERINGINFOCHANGE_2, "TSY:CMmCustomTsy::CompleteNotifyCipheringInfoChange: Ciphering forced off");
  3215         TTsyReqHandle handle = iTsyReqHandleStore->ResetTsyReqHandle(
  3220         TTsyReqHandle handle = iTsyReqHandleStore->ResetTsyReqHandle(
  3216             ECustomTsyNotifyCipheringInfoChange );
  3221             ECustomTsyNotifyCipheringInfoChange );
  3217 
  3222 
  3218         if ( ECustomTsyReqHandleUnknown != handle )
  3223         if ( ECustomTsyReqHandleUnknown != handle )
  3219             {
  3224             {
  3220 TFLOGSTRING("TSY:CMmCustomTsy::CompleteNotifyCipheringInfoChange: Ciphering forced off, request completed");
  3225 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETENOTIFYCIPHERINGINFOCHANGE_3, "TSY:CMmCustomTsy::CompleteNotifyCipheringInfoChange: Ciphering forced off, request completed");
  3221             iRetNotifyCipheringInfoChange->iIndStatus = EFalse;
  3226             iRetNotifyCipheringInfoChange->iIndStatus = EFalse;
  3222             iRetNotifyCipheringInfoChange->iCiphStatus = ETrue;
  3227             iRetNotifyCipheringInfoChange->iCiphStatus = ETrue;
  3223 
  3228 
  3224             iRetNotifyCipheringInfoChange = NULL;
  3229             iRetNotifyCipheringInfoChange = NULL;
  3225 
  3230 
  3515 void CMmCustomTsy::Complete(
  3520 void CMmCustomTsy::Complete(
  3516     TInt aReqHandleType,
  3521     TInt aReqHandleType,
  3517     TInt aError,
  3522     TInt aError,
  3518     TInt aIPC )
  3523     TInt aIPC )
  3519     {
  3524     {
  3520 TFLOGSTRING3( "TSY: CMmCustomTsy::Complete - ReqHandleType: %d Error: %d", aReqHandleType, aError );
  3525 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETE_1,  "TSY: CMmCustomTsy::Complete - ReqHandleType: %d Error: %d", aReqHandleType, aError );
  3521     TBool subTsyReqFound = EFalse;
  3526     TBool subTsyReqFound = EFalse;
  3522     TInt max = GetMaxNumberOfSubsystems();
  3527     TInt max = GetMaxNumberOfSubsystems();
  3523     CMmSubTsyBase** subTsyPtr = GetSubsystemArrayPtr();
  3528     CMmSubTsyBase** subTsyPtr = GetSubsystemArrayPtr();
  3524 
  3529 
  3525     // Check Custom TSY's subsystems' req handles first
  3530     // Check Custom TSY's subsystems' req handles first
  3740 TInt CMmCustomTsy::CheckEmergencyNumberL(
  3745 TInt CMmCustomTsy::CheckEmergencyNumberL(
  3741     const TTsyReqHandle aTsyReqHandle,
  3746     const TTsyReqHandle aTsyReqHandle,
  3742     RMmCustomAPI::TEmerNumberCheckMode* aNumberMode,
  3747     RMmCustomAPI::TEmerNumberCheckMode* aNumberMode,
  3743     TBool* aResult )
  3748     TBool* aResult )
  3744     {
  3749     {
  3745 TFLOGSTRING2("TSY: CMmCustomTsy::CheckEmergencyNumberL number=%S", &(aNumberMode->iNumber) );
  3750 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_CHECKEMERGENCYNUMBERL_1, "TSY: CMmCustomTsy::CheckEmergencyNumberL number=%S", (aNumberMode->iNumber) );
  3746 
  3751 
  3747     TInt ret(KErrGeneral);
  3752     TInt ret(KErrGeneral);
  3748 
  3753 
  3749     TTsyReqHandle requestHandle =
  3754     TTsyReqHandle requestHandle =
  3750         iTsyReqHandleStore->GetTsyReqHandle( ECustomTsyCheckEmergencyNumber );
  3755         iTsyReqHandleStore->GetTsyReqHandle( ECustomTsyCheckEmergencyNumber );
  3751 
  3756 
  3752     // 3rd Dial check number
  3757     // 3rd Dial check number
  3753     if( iISVDialNumberCheck && 0 == requestHandle )
  3758     if( iISVDialNumberCheck && 0 == requestHandle )
  3754         {
  3759         {
  3755 TFLOGSTRING2("TSY: CMmCustomTsy::CheckEmergencyNumberL - 3rd party client nbr check aResult  = %d" , aResult );
  3760 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_CHECKEMERGENCYNUMBERL_2, "TSY: CMmCustomTsy::CheckEmergencyNumberL - 3rd party client nbr check aResult  = %d" , aResult );
  3756         iEmergencyNumberCheckMode   = aNumberMode;
  3761         iEmergencyNumberCheckMode   = aNumberMode;
  3757         iEmergencyNumberCheckResult = aResult;
  3762         iEmergencyNumberCheckResult = aResult;
  3758 
  3763 
  3759         // parameter for DOS call: a TEmerNumberCheckMode
  3764         // parameter for DOS call: a TEmerNumberCheckMode
  3760         CMmDataPackage dataPackage;
  3765         CMmDataPackage dataPackage;
  3764         }
  3769         }
  3765 
  3770 
  3766     //Normal case
  3771     //Normal case
  3767     else
  3772     else
  3768         {
  3773         {
  3769 TFLOGSTRING2("TSY: CMmCustomTsy::CheckEmergencyNumberL - aResult  = %d" , aResult );
  3774 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_CHECKEMERGENCYNUMBERL_3, "TSY: CMmCustomTsy::CheckEmergencyNumberL - aResult  = %d" , aResult );
  3770 
  3775 
  3771         if ( ( 0 < requestHandle || iISVDialNumberCheck ) && 0 != aTsyReqHandle )
  3776         if ( ( 0 < requestHandle || iISVDialNumberCheck ) && 0 != aTsyReqHandle )
  3772             {
  3777             {
  3773             // The request is already in processing because of previous request
  3778             // The request is already in processing because of previous request
  3774             ret = KErrServerBusy;
  3779             ret = KErrServerBusy;
  3812 void CMmCustomTsy::CompleteCheckEmergencyNumber(
  3817 void CMmCustomTsy::CompleteCheckEmergencyNumber(
  3813     RMmCustomAPI::TMobileTelNumber* aTelNumber,
  3818     RMmCustomAPI::TMobileTelNumber* aTelNumber,
  3814     TInt aErrorValue )
  3819     TInt aErrorValue )
  3815     {
  3820     {
  3816 
  3821 
  3817 TFLOGSTRING("TSY: CMmCustomTsy::CompleteCheckEmergencyNumber" );
  3822 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETECHECKEMERGENCYNUMBER_1, "TSY: CMmCustomTsy::CompleteCheckEmergencyNumber" );
  3818 
  3823 
  3819     // 3rd party number check completion0
  3824     // 3rd party number check completion0
  3820     if( iISVDialNumberCheck )
  3825     if( iISVDialNumberCheck )
  3821         {
  3826         {
  3822         //Reset
  3827         //Reset
  3834             }
  3839             }
  3835 
  3840 
  3836     // check is the Dial cancel NULL
  3841     // check is the Dial cancel NULL
  3837     if( iISVDialNumberCheckObject )
  3842     if( iISVDialNumberCheckObject )
  3838       {
  3843       {
  3839 TFLOGSTRING2("TSY: CMmCustomTsy::CompleteCheckEmergencyNumber - Complete3rdPartyCallNbrCheck isEmergencyNbr = %d",isEmergencyNbr );
  3844 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETECHECKEMERGENCYNUMBER_2, "TSY: CMmCustomTsy::CompleteCheckEmergencyNumber - Complete3rdPartyCallNbrCheck isEmergencyNbr = %d",isEmergencyNbr );
  3840       iISVDialNumberCheckObject->Complete3rdPartyCallNbrCheck(
  3845       iISVDialNumberCheckObject->Complete3rdPartyCallNbrCheck(
  3841         isEmergencyNbr );
  3846         isEmergencyNbr );
  3842       }
  3847       }
  3843 
  3848 
  3844       //reset pointer
  3849       //reset pointer
  3868         else
  3873         else
  3869             {
  3874             {
  3870             *iEmergencyNumberCheckResult = EFalse;
  3875             *iEmergencyNumberCheckResult = EFalse;
  3871             }
  3876             }
  3872         }
  3877         }
  3873 TFLOGSTRING2("TSY: CMmCustomTsy::CompleteCheckEmergencyNumber number=%S", &(iEmergencyNumberCheckMode->iNumber) );
  3878 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETECHECKEMERGENCYNUMBER_3, "TSY: CMmCustomTsy::CompleteCheckEmergencyNumber number=%S", (iEmergencyNumberCheckMode->iNumber) );
  3874 
  3879 
  3875         // reset the internal variable
  3880         // reset the internal variable
  3876         iEmergencyNumberCheckResult = NULL;
  3881         iEmergencyNumberCheckResult = NULL;
  3877         iEmergencyNumberCheckMode   = NULL;
  3882         iEmergencyNumberCheckMode   = NULL;
  3878         // complete
  3883         // complete
  3985     
  3990     
  3986     TInt error = KErrNone;
  3991     TInt error = KErrNone;
  3987     // used phonebook is Adn
  3992     // used phonebook is Adn
  3988     if ( 0 == aPndName->CompareF( KETelIccAdnPhoneBook ) )
  3993     if ( 0 == aPndName->CompareF( KETelIccAdnPhoneBook ) )
  3989         {
  3994         {
  3990 TFLOGSTRING2("TSY: CMmCustomTsy::GetPndCacheStatus - ADN phonebook status: %d", iAdnCacheStatus);
  3995 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETPNDCACHESTATUS_1, "TSY: CMmCustomTsy::GetPndCacheStatus - ADN phonebook status: %d", iAdnCacheStatus);
  3991         *aPndStatus = iAdnCacheStatus;
  3996         *aPndStatus = iAdnCacheStatus;
  3992         }
  3997         }
  3993     // used phonebook is Fdn
  3998     // used phonebook is Fdn
  3994     else if ( 0 == aPndName->CompareF( KETelIccFdnPhoneBook ) )
  3999     else if ( 0 == aPndName->CompareF( KETelIccFdnPhoneBook ) )
  3995         {
  4000         {
  3996 TFLOGSTRING2("TSY: CMmCustomTsy::GetPndCacheStatus - FDN phonebook status: %d", iFdnCacheStatus);
  4001 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETPNDCACHESTATUS_2, "TSY: CMmCustomTsy::GetPndCacheStatus - FDN phonebook status: %d", iFdnCacheStatus);
  3997         *aPndStatus = iFdnCacheStatus;
  4002         *aPndStatus = iFdnCacheStatus;
  3998         }
  4003         }
  3999     // used phonebook doesn't have cache
  4004     // used phonebook doesn't have cache
  4000     else if ( ( 0 == aPndName->CompareF( KETelIccBdnPhoneBook ) ) ||
  4005     else if ( ( 0 == aPndName->CompareF( KETelIccBdnPhoneBook ) ) ||
  4001               ( 0 == aPndName->CompareF( KETelIccSdnPhoneBook ) ) ||
  4006               ( 0 == aPndName->CompareF( KETelIccSdnPhoneBook ) ) ||
  4002               ( 0 == aPndName->CompareF( KETelIccVoiceMailBox ) ) )
  4007               ( 0 == aPndName->CompareF( KETelIccVoiceMailBox ) ) )
  4003         {
  4008         {
  4004 TFLOGSTRING2("TSY: CMmCustomTsy::GetPndCacheStatus - No cache for: %S ", aPndName);
  4009 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETPNDCACHESTATUS_3, "TSY: CMmCustomTsy::GetPndCacheStatus - No cache for: %S ", *aPndName);
  4005         *aPndStatus = RMmCustomAPI::ECacheNotUsed;
  4010         *aPndStatus = RMmCustomAPI::ECacheNotUsed;
  4006         }
  4011         }
  4007     else
  4012     else
  4008         {
  4013         {
  4009 TFLOGSTRING2("TSY: CMmCustomTsy::GetPndCacheStatus - No cache found for: %S ", aPndName);        
  4014 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETPNDCACHESTATUS_4, "TSY: CMmCustomTsy::GetPndCacheStatus - No cache found for: %S ", *aPndName);
  4010         error = KErrArgument;
  4015         error = KErrArgument;
  4011         }
  4016         }
  4012 
  4017 
  4013     ReqCompleted( aTsyReqHandle, error );
  4018     ReqCompleted( aTsyReqHandle, error );
  4014 
  4019 
  4023 //
  4028 //
  4024 void CMmCustomTsy::UpdateCacheStatus(
  4029 void CMmCustomTsy::UpdateCacheStatus(
  4025     RMmCustomAPI::TPndCacheStatus aPndStatus,
  4030     RMmCustomAPI::TPndCacheStatus aPndStatus,
  4026     TName& aPndName )
  4031     TName& aPndName )
  4027     {
  4032     {
  4028 TFLOGSTRING3("TSY: CMmCustomTsy::UpdateCacheStatus - Phonebook: %S status: %d", &aPndName, aPndStatus);
  4033 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_UPDATECACHESTATUS_1, "TSY: CMmCustomTsy::UpdateCacheStatus - Phonebook: %S status: %d", aPndName, aPndStatus);
  4029     // if used phonebook is Adn
  4034     // if used phonebook is Adn
  4030     if ( 0 == aPndName.CompareF( KETelIccAdnPhoneBook ) )
  4035     if ( 0 == aPndName.CompareF( KETelIccAdnPhoneBook ) )
  4031         {
  4036         {
  4032         iAdnCacheStatus = aPndStatus;
  4037         iAdnCacheStatus = aPndStatus;
  4033         }
  4038         }
  4131 // ---------------------------------------------------------------------------
  4136 // ---------------------------------------------------------------------------
  4132 //
  4137 //
  4133 TInt CMmCustomTsy::SsAdditionalInfoNotification(
  4138 TInt CMmCustomTsy::SsAdditionalInfoNotification(
  4134     RMmCustomAPI::TSsAdditionalInfo* aSsAdditionalInfo )
  4139     RMmCustomAPI::TSsAdditionalInfo* aSsAdditionalInfo )
  4135     {
  4140     {
  4136 TFLOGSTRING("TSY: CMmCustomTsy::SsAdditionalInfoNotification");
  4141 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SSADDITIONALINFONOTIFICATION_1, "TSY: CMmCustomTsy::SsAdditionalInfoNotification");
  4137     iRetSsAdditionalInfo = aSsAdditionalInfo;
  4142     iRetSsAdditionalInfo = aSsAdditionalInfo;
  4138     iReqHandleType = ECustomTsyNotifySsAdditionalInfo;
  4143     iReqHandleType = ECustomTsyNotifySsAdditionalInfo;
  4139 
  4144 
  4140     return KErrNone;
  4145     return KErrNone;
  4141     }
  4146     }
  4147 // ---------------------------------------------------------------------------
  4152 // ---------------------------------------------------------------------------
  4148 //
  4153 //
  4149 TInt CMmCustomTsy::SsAdditionalInfoNotificationCancel(
  4154 TInt CMmCustomTsy::SsAdditionalInfoNotificationCancel(
  4150     const TTsyReqHandle )
  4155     const TTsyReqHandle )
  4151     {
  4156     {
  4152 TFLOGSTRING("TSY: CMmCustomTsy::SsAdditionalInfoNotificationCancel");
  4157 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SSADDITIONALINFONOTIFICATIONCANCEL_1, "TSY: CMmCustomTsy::SsAdditionalInfoNotificationCancel");
  4153     iRetSsAdditionalInfo = NULL;
  4158     iRetSsAdditionalInfo = NULL;
  4154 
  4159 
  4155     // reset reqhandle
  4160     // reset reqhandle
  4156     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  4161     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  4157         ECustomTsyNotifySsAdditionalInfo );
  4162         ECustomTsyNotifySsAdditionalInfo );
  4172 //
  4177 //
  4173 void CMmCustomTsy::CompleteSsAdditionalInfoNotification(
  4178 void CMmCustomTsy::CompleteSsAdditionalInfoNotification(
  4174     RMmCustomAPI::TSsAdditionalInfo* aSsAdditionalInfo,
  4179     RMmCustomAPI::TSsAdditionalInfo* aSsAdditionalInfo,
  4175     TInt aError )
  4180     TInt aError )
  4176     {
  4181     {
  4177 TFLOGSTRING("TSY: CMmCustomTsy::CompleteSsAdditionalInfoNotification");
  4182 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETESSADDITIONALINFONOTIFICATION_1, "TSY: CMmCustomTsy::CompleteSsAdditionalInfoNotification");
  4178     // reset req handle. Returns the deleted req handle
  4183     // reset req handle. Returns the deleted req handle
  4179     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  4184     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  4180         ECustomTsyNotifySsAdditionalInfo );
  4185         ECustomTsyNotifySsAdditionalInfo );
  4181 
  4186 
  4182     if ( ECustomTsyReqHandleUnknown != reqHandle )
  4187     if ( ECustomTsyReqHandleUnknown != reqHandle )
  4203 //
  4208 //
  4204 TInt CMmCustomTsy::CheckTwoDigitDialSupportL(
  4209 TInt CMmCustomTsy::CheckTwoDigitDialSupportL(
  4205     const TTsyReqHandle aTsyReqHandle,
  4210     const TTsyReqHandle aTsyReqHandle,
  4206     RMmCustomAPI::TTwoDigitDialSupport* aSupport )
  4211     RMmCustomAPI::TTwoDigitDialSupport* aSupport )
  4207     {
  4212     {
  4208 TFLOGSTRING("TSY: CMmCustomTsy::CheckTwoDigitDialSupportL");
  4213 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_CHECKTWODIGITDIALSUPPORTL_1, "TSY: CMmCustomTsy::CheckTwoDigitDialSupportL");
  4209     // save pointer to client space
  4214     // save pointer to client space
  4210     iTwoDigitDialSupport = aSupport;
  4215     iTwoDigitDialSupport = aSupport;
  4211 
  4216 
  4212     // call DOS
  4217     // call DOS
  4213     TInt error = Phone()->MessageManager()->HandleRequestL(
  4218     TInt error = Phone()->MessageManager()->HandleRequestL(
  4644 // ---------------------------------------------------------------------------
  4649 // ---------------------------------------------------------------------------
  4645 //
  4650 //
  4646 TInt CMmCustomTsy::ResetNetServerL(
  4651 TInt CMmCustomTsy::ResetNetServerL(
  4647     const TTsyReqHandle aTsyReqHandle )
  4652     const TTsyReqHandle aTsyReqHandle )
  4648     {
  4653     {
  4649 TFLOGSTRING("TSY: CMmCustomTsy::ResetNetServerL");
  4654 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_RESETNETSERVERL_1, "TSY: CMmCustomTsy::ResetNetServerL");
  4650     // call DOS (no packed parameters)
  4655     // call DOS (no packed parameters)
  4651     TInt ret = Phone()->MessageManager()->HandleRequestL(
  4656     TInt ret = Phone()->MessageManager()->HandleRequestL(
  4652         ECustomResetNetServerIPC );
  4657         ECustomResetNetServerIPC );
  4653 
  4658 
  4654     if ( KErrNone != ret )
  4659     if ( KErrNone != ret )
  4671 // ---------------------------------------------------------------------------
  4676 // ---------------------------------------------------------------------------
  4672 //
  4677 //
  4673 void CMmCustomTsy::CompleteResetNetServer(
  4678 void CMmCustomTsy::CompleteResetNetServer(
  4674     TInt aErrorValue )
  4679     TInt aErrorValue )
  4675     {
  4680     {
  4676 TFLOGSTRING2("TSY: CMmCustomTsy::CompleteResetNetServer - Error: %d", aErrorValue );
  4681 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETERESETNETSERVER_1, "TSY: CMmCustomTsy::CompleteResetNetServer - Error: %d", aErrorValue );
  4677     // reset the reqhandle
  4682     // reset the reqhandle
  4678     TTsyReqHandle tsyReqHandle =
  4683     TTsyReqHandle tsyReqHandle =
  4679         iTsyReqHandleStore->ResetTsyReqHandle( ECustomTsyResetNetServer );
  4684         iTsyReqHandleStore->ResetTsyReqHandle( ECustomTsyResetNetServer );
  4680 
  4685 
  4681     // Check the reqHandle
  4686     // Check the reqHandle
  4687             {
  4692             {
  4688             // Convert the error value from KErrCancel to KErrNotReady
  4693             // Convert the error value from KErrCancel to KErrNotReady
  4689             aErrorValue = KErrNotReady; 
  4694             aErrorValue = KErrNotReady; 
  4690             }
  4695             }
  4691             
  4696             
  4692 TFLOGSTRING2("TSY: CMmCustomTsy::CompleteResetNetServer - complete with error value: %d", aErrorValue );
  4697 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETERESETNETSERVER_2, "TSY: CMmCustomTsy::CompleteResetNetServer - complete with error value: %d", aErrorValue );
  4693         ReqCompleted( tsyReqHandle, aErrorValue );
  4698         ReqCompleted( tsyReqHandle, aErrorValue );
  4694         }
  4699         }
  4695     }
  4700     }
  4696 
  4701 
  4697 // ---------------------------------------------------------------------------
  4702 // ---------------------------------------------------------------------------
  4739 void CMmCustomTsy::CompleteNotifyNetworkConnectionFailure()
  4744 void CMmCustomTsy::CompleteNotifyNetworkConnectionFailure()
  4740     {
  4745     {
  4741     // If SIM is inserted complete network connection failure
  4746     // If SIM is inserted complete network connection failure
  4742     if ( iMmPhoneTsy->NosBootState()->iSIMReady )
  4747     if ( iMmPhoneTsy->NosBootState()->iSIMReady )
  4743         {
  4748         {
  4744 TFLOGSTRING("TSY: CMmCustomTsy::CompleteNotifyNetworkConnectionFailure");
  4749 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETENOTIFYNETWORKCONNECTIONFAILURE_1, "TSY: CMmCustomTsy::CompleteNotifyNetworkConnectionFailure");
  4745         // reset the reqhandle
  4750         // reset the reqhandle
  4746         TTsyReqHandle tsyReqHandle =
  4751         TTsyReqHandle tsyReqHandle =
  4747             iTsyReqHandleStore->ResetTsyReqHandle(
  4752             iTsyReqHandleStore->ResetTsyReqHandle(
  4748             ECustomTsyNotifyNetworkConnectionFailure );
  4753             ECustomTsyNotifyNetworkConnectionFailure );
  4749 
  4754 
  5005 //
  5010 //
  5006 TInt CMmCustomTsy::GetCurrentSystemNetworkModeL(
  5011 TInt CMmCustomTsy::GetCurrentSystemNetworkModeL(
  5007     const TTsyReqHandle aTsyReqHandle,
  5012     const TTsyReqHandle aTsyReqHandle,
  5008     TUint32* aNetworkMode )
  5013     TUint32* aNetworkMode )
  5009     {
  5014     {
  5010 TFLOGSTRING("CMmCustomTsy::GetCurrentSystemNetworkModeL");
  5015 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETCURRENTSYSTEMNETWORKMODEL_1, "CMmCustomTsy::GetCurrentSystemNetworkModeL");
  5011     TTsyReqHandle reqhandle = iTsyReqHandleStore->GetTsyReqHandle(
  5016     TTsyReqHandle reqhandle = iTsyReqHandleStore->GetTsyReqHandle(
  5012         ECustomTsyGetCurrentSystemNetworkMode );
  5017         ECustomTsyGetCurrentSystemNetworkMode );
  5013 
  5018 
  5014     if ( 0 < reqhandle )
  5019     if ( 0 < reqhandle )
  5015         {
  5020         {
  5045 // ---------------------------------------------------------------------------
  5050 // ---------------------------------------------------------------------------
  5046 //
  5051 //
  5047 TInt CMmCustomTsy::GetCurrentSystemNetworkModeCancel(
  5052 TInt CMmCustomTsy::GetCurrentSystemNetworkModeCancel(
  5048     const TTsyReqHandle aTsyReqHandle )
  5053     const TTsyReqHandle aTsyReqHandle )
  5049     {
  5054     {
  5050 TFLOGSTRING("CMmCustomTsy::GetCurrentSystemNetworkModeCancel");
  5055 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETCURRENTSYSTEMNETWORKMODECANCEL_1, "CMmCustomTsy::GetCurrentSystemNetworkModeCancel");
  5051 
  5056 
  5052     // reset pointer to client data
  5057     // reset pointer to client data
  5053     iCurrentNetworkMode = NULL;
  5058     iCurrentNetworkMode = NULL;
  5054 
  5059 
  5055     // reset reqhandle
  5060     // reset reqhandle
  5073 TInt CMmCustomTsy::GetSimFileInfoL(
  5078 TInt CMmCustomTsy::GetSimFileInfoL(
  5074     const TTsyReqHandle aTsyReqHandle,
  5079     const TTsyReqHandle aTsyReqHandle,
  5075     TDes8* aSimFileInfoPckg,
  5080     TDes8* aSimFileInfoPckg,
  5076     TDes8* aSimResponseBuffer )
  5081     TDes8* aSimResponseBuffer )
  5077     {
  5082     {
  5078 TFLOGSTRING( "TSY: CMmCustomTsy::GetSimFileInfoL" );
  5083 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETSIMFILEINFOL_1,  "TSY: CMmCustomTsy::GetSimFileInfoL" );
  5079     TTsyReqHandle reqHandle =
  5084     TTsyReqHandle reqHandle =
  5080         iTsyReqHandleStore->GetTsyReqHandle( ECustomTsyGetSimFileInfo );
  5085         iTsyReqHandleStore->GetTsyReqHandle( ECustomTsyGetSimFileInfo );
  5081 
  5086 
  5082     // Unpack the TSimFileInfo data
  5087     // Unpack the TSimFileInfo data
  5083     RMmCustomAPI::TSimFileInfoPckg* simFileInfoPckg =
  5088     RMmCustomAPI::TSimFileInfoPckg* simFileInfoPckg =
  5094         //beginning of the file and amount of data to read
  5099         //beginning of the file and amount of data to read
  5095         if ( ( KErrNotFound != simFileInfo.iPath.Match( iGetSimFileInfoReq.iPath ) ) 
  5100         if ( ( KErrNotFound != simFileInfo.iPath.Match( iGetSimFileInfoReq.iPath ) ) 
  5096         	&& ( iGetSimFileInfoReq.iOffSet == simFileInfo.iOffSet )
  5101         	&& ( iGetSimFileInfoReq.iOffSet == simFileInfo.iOffSet )
  5097         	&& ( iGetSimFileInfoReq.iSize == simFileInfo.iSize ) )
  5102         	&& ( iGetSimFileInfoReq.iSize == simFileInfo.iSize ) )
  5098         	{
  5103         	{
  5099 TFLOGSTRING( "TSY: CMmCustomTsy::GetSimFileInfoL - Same info already requested" );
  5104 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETSIMFILEINFOL_2,  "TSY: CMmCustomTsy::GetSimFileInfoL - Same info already requested" );
  5100 
  5105 
  5101 			TGetSimFileInfoRequest* req = new ( ELeave ) TGetSimFileInfoRequest();
  5106 			TGetSimFileInfoRequest* req = new ( ELeave ) TGetSimFileInfoRequest();
  5102 			req->iReqHandle = aTsyReqHandle;
  5107 			req->iReqHandle = aTsyReqHandle;
  5103 			req->iSimFileInfo = aSimResponseBuffer;
  5108 			req->iSimFileInfo = aSimResponseBuffer;
  5104 			iGetSimFileInfoRequests.AppendL( req );
  5109 			iGetSimFileInfoRequests.AppendL( req );
  5124             {
  5129             {
  5125             ReqCompleted( aTsyReqHandle, ret );
  5130             ReqCompleted( aTsyReqHandle, ret );
  5126             }
  5131             }
  5127         else
  5132         else
  5128             {
  5133             {
  5129 TFLOGSTRING( "TSY: CMmCustomTsy::GetSimFileInfoL - Save handle" );
  5134 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETSIMFILEINFOL_3,  "TSY: CMmCustomTsy::GetSimFileInfoL - Save handle" );
  5130 	        // Save the req handle type
  5135 	        // Save the req handle type
  5131 	        iReqHandleType = ECustomTsyGetSimFileInfo;
  5136 	        iReqHandleType = ECustomTsyGetSimFileInfo;
  5132 			// Save request in queue for completion
  5137 			// Save request in queue for completion
  5133 	        TGetSimFileInfoRequest* req = new ( ELeave ) TGetSimFileInfoRequest();
  5138 	        TGetSimFileInfoRequest* req = new ( ELeave ) TGetSimFileInfoRequest();
  5134 			req->iReqHandle = aTsyReqHandle;
  5139 			req->iReqHandle = aTsyReqHandle;
  5146 // (other items were commented in a header).
  5151 // (other items were commented in a header).
  5147 // ---------------------------------------------------------------------------
  5152 // ---------------------------------------------------------------------------
  5148 //
  5153 //
  5149 TInt CMmCustomTsy::GetSimFileInfoCancel( TTsyReqHandle aTsyReqHandle )
  5154 TInt CMmCustomTsy::GetSimFileInfoCancel( TTsyReqHandle aTsyReqHandle )
  5150     {
  5155     {
  5151 TFLOGSTRING( "TSY: CMmCustomTsy::GetSimFileInfoCancel" );
  5156 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETSIMFILEINFOCANCEL_1,  "TSY: CMmCustomTsy::GetSimFileInfoCancel" );
  5152     
  5157     
  5153 	for ( TInt i = 0; i < iGetSimFileInfoRequests.Count(); i++ )
  5158 	for ( TInt i = 0; i < iGetSimFileInfoRequests.Count(); i++ )
  5154 		{
  5159 		{
  5155 		TGetSimFileInfoRequest* req = iGetSimFileInfoRequests[ i ];
  5160 		TGetSimFileInfoRequest* req = iGetSimFileInfoRequests[ i ];
  5156 		if ( aTsyReqHandle == req->iReqHandle )
  5161 		if ( aTsyReqHandle == req->iReqHandle )
  5187 //
  5192 //
  5188 void CMmCustomTsy::CompleteGetSimFileInfo(
  5193 void CMmCustomTsy::CompleteGetSimFileInfo(
  5189     TDesC8* aData,
  5194     TDesC8* aData,
  5190     TInt aError )
  5195     TInt aError )
  5191     {
  5196     {
  5192 TFLOGSTRING( "TSY: CMmCustomTsy::CompleteGetSimFileInfo" );
  5197 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETEGETSIMFILEINFO_1,  "TSY: CMmCustomTsy::CompleteGetSimFileInfo" );
  5193     
  5198     
  5194     // reset the reqhandle
  5199     // reset the reqhandle
  5195     TTsyReqHandle tsyReqHandle =
  5200     TTsyReqHandle tsyReqHandle =
  5196         iTsyReqHandleStore->ResetTsyReqHandle( ECustomTsyGetSimFileInfo );
  5201         iTsyReqHandleStore->ResetTsyReqHandle( ECustomTsyGetSimFileInfo );
  5197     
  5202     
  5198     // Check the reqHandle
  5203     // Check the reqHandle
  5199     if ( ECustomTsyReqHandleUnknown != tsyReqHandle )
  5204     if ( ECustomTsyReqHandleUnknown != tsyReqHandle )
  5200         {
  5205         {
  5201         // complete
  5206         // complete
  5202         TInt getSimFileInfoRequestsCount = iGetSimFileInfoRequests.Count();
  5207         TInt getSimFileInfoRequestsCount = iGetSimFileInfoRequests.Count();
  5203 TFLOGSTRING2( "TSY: CMmCustomTsy::CompleteGetSimFileInfo - Complete %d requests", getSimFileInfoRequestsCount );
  5208 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETEGETSIMFILEINFO_2,  "TSY: CMmCustomTsy::CompleteGetSimFileInfo - Complete %d requests", getSimFileInfoRequestsCount );
  5204         
  5209         
  5205 		for ( TInt i = 0; i < getSimFileInfoRequestsCount; i++ )
  5210 		for ( TInt i = 0; i < getSimFileInfoRequestsCount; i++ )
  5206 		    {
  5211 		    {
  5207 		    TGetSimFileInfoRequest* req = iGetSimFileInfoRequests[ i ];
  5212 		    TGetSimFileInfoRequest* req = iGetSimFileInfoRequests[ i ];
  5208 		
  5213 		
  5242     const TTsyReqHandle aTsyReqHandle,
  5247     const TTsyReqHandle aTsyReqHandle,
  5243     TDes8* aLifeTimerInfoPckg )
  5248     TDes8* aLifeTimerInfoPckg )
  5244     {
  5249     {
  5245     
  5250     
  5246     TInt ret( KErrNone );
  5251     TInt ret( KErrNone );
  5247     TFLOGSTRING ("TSY: CMmCustomTsy::GetLifeTimeL");
  5252     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETLIFETIMEL_1, "TSY: CMmCustomTsy::GetLifeTimeL");
  5248     if ( sizeof(RMmCustomAPI::TLifeTimeData) != aLifeTimerInfoPckg->MaxLength() )
  5253     if ( sizeof(RMmCustomAPI::TLifeTimeData) != aLifeTimerInfoPckg->MaxLength() )
  5249         {
  5254         {
  5250         TFLOGSTRING ("TSY: CMmCustomTsy::GetLifeTimeL bad size argument");
  5255         OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETLIFETIMEL_2, "TSY: CMmCustomTsy::GetLifeTimeL bad size argument");
  5251         // Complete the request with appropiate error        
  5256         // Complete the request with appropiate error        
  5252         return KErrArgument;
  5257         return KErrArgument;
  5253         }
  5258         }
  5254     TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
  5259     TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
  5255             ECustomTsyGetLifeTimerInfo  );
  5260             ECustomTsyGetLifeTimerInfo  );
  5256     if ( ECustomTsyReqHandleUnknown != reqHandle ) 
  5261     if ( ECustomTsyReqHandleUnknown != reqHandle ) 
  5257         {
  5262         {
  5258 TFLOGSTRING( "TSY: CMmCustomTsy::GetLifeTimeL - ECustomTsyReqHandleUnknown" );
  5263 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETLIFETIMEL_3,  "TSY: CMmCustomTsy::GetLifeTimeL - ECustomTsyReqHandleUnknown" );
  5259         // The request is already in processing because of previous request.
  5264         // The request is already in processing because of previous request.
  5260         // Complete request with status value informing the client about 
  5265         // Complete request with status value informing the client about 
  5261         // the situation.
  5266         // the situation.
  5262         ReqCompleted( aTsyReqHandle, KErrServerBusy );
  5267         ReqCompleted( aTsyReqHandle, KErrServerBusy );
  5263         }
  5268         }
  5264     else
  5269     else
  5265         {
  5270         {
  5266         // save pointer to the packaged life timer info
  5271         // save pointer to the packaged life timer info
  5267         iLifeTimerInfoPckg = aLifeTimerInfoPckg;
  5272         iLifeTimerInfoPckg = aLifeTimerInfoPckg;
  5268         TFLOGSTRING( "TSY: CMmCustomTsy::GetLifeTimeL - send request" );
  5273         OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETLIFETIMEL_4,  "TSY: CMmCustomTsy::GetLifeTimeL - send request" );
  5269         iTsyReqHandleStore->SetTsyReqHandle( 
  5274         iTsyReqHandleStore->SetTsyReqHandle( 
  5270                         ECustomTsyGetLifeTimerInfo, aTsyReqHandle );
  5275                         ECustomTsyGetLifeTimerInfo, aTsyReqHandle );
  5271         ret = Phone()->MessageManager()->HandleRequestL(
  5276         ret = Phone()->MessageManager()->HandleRequestL(
  5272                 ECustomGetLifeTimeIPC);
  5277                 ECustomGetLifeTimeIPC);
  5273         // Check response of the extension
  5278         // Check response of the extension
  5274         if ( KErrNone != ret )
  5279         if ( KErrNone != ret )
  5275             {
  5280             {
  5276             TFLOGSTRING( "TSY: CMmCustomTsy::GetLifeTimeL - DOS layer returned error " );
  5281             OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETLIFETIMEL_5,  "TSY: CMmCustomTsy::GetLifeTimeL - DOS layer returned error " );
  5277             TTsyReqHandle tsyReqHandle =
  5282             TTsyReqHandle tsyReqHandle =
  5278                 iTsyReqHandleStore->ResetTsyReqHandle( 
  5283                 iTsyReqHandleStore->ResetTsyReqHandle( 
  5279                                     ECustomTsyGetLifeTimerInfo );
  5284                                     ECustomTsyGetLifeTimerInfo );
  5280             if ( ECustomTsyReqHandleUnknown != tsyReqHandle )
  5285             if ( ECustomTsyReqHandleUnknown != tsyReqHandle )
  5281                 {
  5286                 {
  5282                 TFLOGSTRING( "TSY: CMmCustomTsy::GetLifeTimeL - DOS error - unknown handle" );
  5287                 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETLIFETIMEL_6,  "TSY: CMmCustomTsy::GetLifeTimeL - DOS error - unknown handle" );
  5283                 }
  5288                 }
  5284             ReqCompleted( aTsyReqHandle, ret );
  5289             ReqCompleted( aTsyReqHandle, ret );
  5285             }
  5290             }
  5286         }
  5291         }
  5287     return KErrNone;
  5292     return KErrNone;
  5363 //
  5368 //
  5364 TInt CMmCustomTsy::SetDriveModeL(
  5369 TInt CMmCustomTsy::SetDriveModeL(
  5365     const TTsyReqHandle aTsyReqHandle,
  5370     const TTsyReqHandle aTsyReqHandle,
  5366     RMmCustomAPI::TSetDriveMode* aModeStatus )
  5371     RMmCustomAPI::TSetDriveMode* aModeStatus )
  5367     {
  5372     {
  5368 TFLOGSTRING3("TSY: CMmCustomTsy::SetDriveModeL - Req handle: %d, Mode status: %d", aTsyReqHandle, *aModeStatus );
  5373 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SETDRIVEMODEL_1, "TSY: CMmCustomTsy::SetDriveModeL - Req handle: %d, Mode status: %d", aTsyReqHandle, *aModeStatus );
  5369 	if ( (iUsingFeatureManager) && (iFeatureControl.FeatureSupported(NFeature::KDriveModeCanRestrictMtCalls) == KFeatureSupported) )
  5374 	if ( (iUsingFeatureManager) && (iFeatureControl.FeatureSupported(NFeature::KDriveModeCanRestrictMtCalls) == KFeatureSupported) )
  5370         {
  5375         {
  5371         // get the handle
  5376         // get the handle
  5372         TTsyReqHandle setDriveModeHandle =
  5377         TTsyReqHandle setDriveModeHandle =
  5373             iTsyReqHandleStore->GetTsyReqHandle( ECustomTsySetDriveMode );
  5378             iTsyReqHandleStore->GetTsyReqHandle( ECustomTsySetDriveMode );
  5418 // ---------------------------------------------------------------------------
  5423 // ---------------------------------------------------------------------------
  5419 //
  5424 //
  5420 void CMmCustomTsy::CompleteSetDriveMode(
  5425 void CMmCustomTsy::CompleteSetDriveMode(
  5421     TInt aErrorCode )
  5426     TInt aErrorCode )
  5422     {
  5427     {
  5423 TFLOGSTRING2( "TSY: CMmCustomTsy::CompleteSetDriveMode - Error code: %d", aErrorCode );
  5428 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETESETDRIVEMODE_1,  "TSY: CMmCustomTsy::CompleteSetDriveMode - Error code: %d", aErrorCode );
  5424 	if ( (iUsingFeatureManager) && (iFeatureControl.FeatureSupported(NFeature::KDriveModeCanRestrictMtCalls) == KFeatureSupported) )
  5429 	if ( (iUsingFeatureManager) && (iFeatureControl.FeatureSupported(NFeature::KDriveModeCanRestrictMtCalls) == KFeatureSupported) )
  5425         {
  5430         {
  5426         //Reset req handle, returns the deleted req handle
  5431         //Reset req handle, returns the deleted req handle
  5427         TTsyReqHandle reqHandle =
  5432         TTsyReqHandle reqHandle =
  5428             iTsyReqHandleStore->ResetTsyReqHandle( ECustomTsySetDriveMode );
  5433             iTsyReqHandleStore->ResetTsyReqHandle( ECustomTsySetDriveMode );
  5591 // ---------------------------------------------------------------------------
  5596 // ---------------------------------------------------------------------------
  5592 //
  5597 //
  5593 void CMmCustomTsy::SetObjectForISVDialNumberCheck(
  5598 void CMmCustomTsy::SetObjectForISVDialNumberCheck(
  5594     CMmVoiceCallTsy* aCallObject )
  5599     CMmVoiceCallTsy* aCallObject )
  5595     {
  5600     {
  5596 TFLOGSTRING2("TSY: CMmCustomTsy::SetObjectForISVDialNumberCheck aCallObject=%x", aCallObject );
  5601 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SETOBJECTFORISVDIALNUMBERCHECK_1, "TSY: CMmCustomTsy::SetObjectForISVDialNumberCheck aCallObject=0x%08x", aCallObject );
  5597     //Save pointer for completion of check emergency number
  5602     //Save pointer for completion of check emergency number
  5598     iISVDialNumberCheckObject = aCallObject;
  5603     iISVDialNumberCheckObject = aCallObject;
  5599     //ISV dial has been requested
  5604     //ISV dial has been requested
  5600     iISVDialNumberCheck = ETrue;
  5605     iISVDialNumberCheck = ETrue;
  5601     }
  5606     }
  5607 // ---------------------------------------------------------------------------
  5612 // ---------------------------------------------------------------------------
  5608 //
  5613 //
  5609 TInt CMmCustomTsy::NotifyRauEvent(
  5614 TInt CMmCustomTsy::NotifyRauEvent(
  5610     RMmCustomAPI::TRauEventStatus* aEventStatus )
  5615     RMmCustomAPI::TRauEventStatus* aEventStatus )
  5611     {
  5616     {
  5612 TFLOGSTRING("TSY: CMmCustomTsy::NotifyRauEvent");
  5617 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_NOTIFYRAUEVENT_1, "TSY: CMmCustomTsy::NotifyRauEvent");
  5613 
  5618 
  5614     // save pointer to client data
  5619     // save pointer to client data
  5615     iRauEventStatus = aEventStatus;
  5620     iRauEventStatus = aEventStatus;
  5616 
  5621 
  5617     // save handle type
  5622     // save handle type
  5628 //
  5633 //
  5629 void CMmCustomTsy::CompleteNotifyRauEvent(
  5634 void CMmCustomTsy::CompleteNotifyRauEvent(
  5630     RMmCustomAPI::TRauEventStatus aEventStatus,
  5635     RMmCustomAPI::TRauEventStatus aEventStatus,
  5631     TInt aErrorCode )
  5636     TInt aErrorCode )
  5632     {
  5637     {
  5633 TFLOGSTRING("TSY: CMmCustomTsy::CompleteNotifyRauEvent");
  5638 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETENOTIFYRAUEVENT_1, "TSY: CMmCustomTsy::CompleteNotifyRauEvent");
  5634 
  5639 
  5635     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  5640     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  5636         ECustomTsyNotifyRauEvent );
  5641         ECustomTsyNotifyRauEvent );
  5637 
  5642 
  5638     // check if request was called
  5643     // check if request was called
  5684 //
  5689 //
  5685 TInt CMmCustomTsy::ReadHSxPAStatusL(
  5690 TInt CMmCustomTsy::ReadHSxPAStatusL(
  5686     const TTsyReqHandle aTsyReqHandle,
  5691     const TTsyReqHandle aTsyReqHandle,
  5687     RMmCustomAPI::THSxPAStatus* aHSxPAStatus )
  5692     RMmCustomAPI::THSxPAStatus* aHSxPAStatus )
  5688     {
  5693     {
  5689 TFLOGSTRING("TSY: CMmCustomTsy::ReadHSxPAStatusL");
  5694 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_READHSXPASTATUSL_1, "TSY: CMmCustomTsy::ReadHSxPAStatusL");
  5690 
  5695 
  5691     TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
  5696     TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
  5692         ECustomTsyReadHSxPAStatus );
  5697         ECustomTsyReadHSxPAStatus );
  5693 
  5698 
  5694     if ( ECustomTsyReqHandleUnknown != reqHandle )
  5699     if ( ECustomTsyReqHandleUnknown != reqHandle )
  5727 //
  5732 //
  5728 void CMmCustomTsy::CompleteReadHSxPAStatus(
  5733 void CMmCustomTsy::CompleteReadHSxPAStatus(
  5729     CMmDataPackage* aDataPackage,
  5734     CMmDataPackage* aDataPackage,
  5730     TInt aErrorCode )
  5735     TInt aErrorCode )
  5731     {
  5736     {
  5732 TFLOGSTRING("TSY: CMmCustomTsy::CompleteReadHSxPAStatus");
  5737 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETEREADHSXPASTATUS_1, "TSY: CMmCustomTsy::CompleteReadHSxPAStatus");
  5733 
  5738 
  5734     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  5739     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  5735         ECustomTsyReadHSxPAStatus );
  5740         ECustomTsyReadHSxPAStatus );
  5736 
  5741 
  5737     if( ECustomTsyReqHandleUnknown != reqHandle )
  5742     if( ECustomTsyReqHandleUnknown != reqHandle )
  5739         if ( KErrNone == aErrorCode )
  5744         if ( KErrNone == aErrorCode )
  5740             {
  5745             {
  5741             RMmCustomAPI::THSxPAStatus status;
  5746             RMmCustomAPI::THSxPAStatus status;
  5742             aDataPackage->UnPackData( status );
  5747             aDataPackage->UnPackData( status );
  5743 
  5748 
  5744 TFLOGSTRING2("TSY: CMmCustomTsy::CompleteReadHSxPAStatus, status = %d", status);
  5749 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETEREADHSXPASTATUS_2, "TSY: CMmCustomTsy::CompleteReadHSxPAStatus, status = %d", status);
  5745 
  5750 
  5746             // Save the status.
  5751             // Save the status.
  5747             iHSxPAStatus = status;
  5752             iHSxPAStatus = status;
  5748 
  5753 
  5749             // set the information for the client
  5754             // set the information for the client
  5768 // (other items were commented in a header).
  5773 // (other items were commented in a header).
  5769 // ---------------------------------------------------------------------------
  5774 // ---------------------------------------------------------------------------
  5770 //
  5775 //
  5771 TInt CMmCustomTsy::ReadHSxPAStatusCancel()
  5776 TInt CMmCustomTsy::ReadHSxPAStatusCancel()
  5772     {
  5777     {
  5773 TFLOGSTRING("TSY: CMmCustomTsy::ReadHSxPAStatusCancel");
  5778 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_READHSXPASTATUSCANCEL_1, "TSY: CMmCustomTsy::ReadHSxPAStatusCancel");
  5774 
  5779 
  5775     // reset the reqhandle
  5780     // reset the reqhandle
  5776     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  5781     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  5777         ECustomTsyReadHSxPAStatus );
  5782         ECustomTsyReadHSxPAStatus );
  5778 
  5783 
  5795 //
  5800 //
  5796 TInt CMmCustomTsy::WriteHSxPAStatusL(
  5801 TInt CMmCustomTsy::WriteHSxPAStatusL(
  5797     const TTsyReqHandle aTsyReqHandle,
  5802     const TTsyReqHandle aTsyReqHandle,
  5798     RMmCustomAPI::THSxPAStatus* aHSxPAStatus )
  5803     RMmCustomAPI::THSxPAStatus* aHSxPAStatus )
  5799     {
  5804     {
  5800 TFLOGSTRING2("TSY: CMmCustomTsy::WriteHSxPAStatusL. New status: %d", *aHSxPAStatus);
  5805 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_WRITEHSXPASTATUSL_1, "TSY: CMmCustomTsy::WriteHSxPAStatusL. New status: %d", *aHSxPAStatus);
  5801 
  5806 
  5802     iSetHSxPAStatus = aHSxPAStatus;
  5807     iSetHSxPAStatus = aHSxPAStatus;
  5803 
  5808 
  5804     // get the handle
  5809     // get the handle
  5805     TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
  5810     TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
  5838 // ---------------------------------------------------------------------------
  5843 // ---------------------------------------------------------------------------
  5839 //
  5844 //
  5840 void CMmCustomTsy::CompleteWriteHSxPAStatus(
  5845 void CMmCustomTsy::CompleteWriteHSxPAStatus(
  5841     TInt aErrorCode )
  5846     TInt aErrorCode )
  5842     {
  5847     {
  5843 TFLOGSTRING("TSY: CMmCustomTsy::CompleteWriteHSxPAStatus");
  5848 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETEWRITEHSXPASTATUS_1, "TSY: CMmCustomTsy::CompleteWriteHSxPAStatus");
  5844 
  5849 
  5845     //reset req handle.
  5850     //reset req handle.
  5846     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  5851     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  5847         ECustomTsyWriteHSxPAStatus );
  5852         ECustomTsyWriteHSxPAStatus );
  5848 
  5853 
  5867 // (other items were commented in a header).
  5872 // (other items were commented in a header).
  5868 // ---------------------------------------------------------------------------
  5873 // ---------------------------------------------------------------------------
  5869 //
  5874 //
  5870 TInt CMmCustomTsy::WriteHSxPAStatusCancel()
  5875 TInt CMmCustomTsy::WriteHSxPAStatusCancel()
  5871     {
  5876     {
  5872 TFLOGSTRING("TSY: CMmCustomTsy::WriteHSxPAStatusCancel");
  5877 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_WRITEHSXPASTATUSCANCEL_1, "TSY: CMmCustomTsy::WriteHSxPAStatusCancel");
  5873 
  5878 
  5874     // reset the reqhandle
  5879     // reset the reqhandle
  5875     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  5880     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  5876         ECustomTsyWriteHSxPAStatus );
  5881         ECustomTsyWriteHSxPAStatus );
  5877 
  5882 
  5893 // ---------------------------------------------------------------------------
  5898 // ---------------------------------------------------------------------------
  5894 //
  5899 //
  5895 TInt CMmCustomTsy::NotifyHSxPAStatus(
  5900 TInt CMmCustomTsy::NotifyHSxPAStatus(
  5896     RMmCustomAPI::THSxPAStatus* aHSxPAStatus )
  5901     RMmCustomAPI::THSxPAStatus* aHSxPAStatus )
  5897     {
  5902     {
  5898 TFLOGSTRING("TSY: CMmCustomTsy::NotifyHSxPAStatus");
  5903 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_NOTIFYHSXPASTATUS_1, "TSY: CMmCustomTsy::NotifyHSxPAStatus");
  5899 
  5904 
  5900     // save pointer to client data
  5905     // save pointer to client data
  5901     iRetNotifyHSxPAStatus = aHSxPAStatus;
  5906     iRetNotifyHSxPAStatus = aHSxPAStatus;
  5902 
  5907 
  5903     // set the reqhandle type
  5908     // set the reqhandle type
  5914 //
  5919 //
  5915 void CMmCustomTsy::CompleteNotifyHSxPAStatus(
  5920 void CMmCustomTsy::CompleteNotifyHSxPAStatus(
  5916     CMmDataPackage* aDataPackage,
  5921     CMmDataPackage* aDataPackage,
  5917     TInt aErrorCode )
  5922     TInt aErrorCode )
  5918     {
  5923     {
  5919 TFLOGSTRING2("TSY: CMmCustomTsy::CompleteNotifyHSxPAStatus, Error: %d", aErrorCode);
  5924 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETENOTIFYHSXPASTATUS_1, "TSY: CMmCustomTsy::CompleteNotifyHSxPAStatus, Error: %d", aErrorCode);
  5920 
  5925 
  5921     RMmCustomAPI::THSxPAStatus status;
  5926     RMmCustomAPI::THSxPAStatus status;
  5922     aDataPackage->UnPackData( status );
  5927     aDataPackage->UnPackData( status );
  5923 
  5928 
  5924 TFLOGSTRING2("TSY: CMmCustomTsy::CompleteNotifyHSxPAStatus, old status: %d", iHSxPAStatus);
  5929 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETENOTIFYHSXPASTATUS_2, "TSY: CMmCustomTsy::CompleteNotifyHSxPAStatus, old status: %d", iHSxPAStatus);
  5925 TFLOGSTRING2("TSY: CMmCustomTsy::CompleteNotifyHSxPAStatus, new status: %d", status);
  5930 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETENOTIFYHSXPASTATUS_3, "TSY: CMmCustomTsy::CompleteNotifyHSxPAStatus, new status: %d", status);
  5926 
  5931 
  5927     // check if status was changed
  5932     // check if status was changed
  5928     if ( iHSxPAStatus != status )
  5933     if ( iHSxPAStatus != status )
  5929         {
  5934         {
  5930         // Check if notification was requested
  5935         // Check if notification was requested
  5963 // (other items were commented in a header).
  5968 // (other items were commented in a header).
  5964 // ---------------------------------------------------------------------------
  5969 // ---------------------------------------------------------------------------
  5965 //
  5970 //
  5966 TInt CMmCustomTsy::NotifyHSxPAStatusCancel()
  5971 TInt CMmCustomTsy::NotifyHSxPAStatusCancel()
  5967     {
  5972     {
  5968 TFLOGSTRING("TSY: CMmCustomTsy::NotifyHSxPAStatusCancel");
  5973 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_NOTIFYHSXPASTATUSCANCEL_1, "TSY: CMmCustomTsy::NotifyHSxPAStatusCancel");
  5969 
  5974 
  5970     // reset the reqhandle
  5975     // reset the reqhandle
  5971     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  5976     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  5972         ECustomTsyNotifyHSxPAStatus );
  5977         ECustomTsyNotifyHSxPAStatus );
  5973 
  5978 
  5990 //
  5995 //
  5991 TInt CMmCustomTsy::GetIccCallForwardingStatusL(
  5996 TInt CMmCustomTsy::GetIccCallForwardingStatusL(
  5992     TTsyReqHandle /*aTsyReqHandle*/,
  5997     TTsyReqHandle /*aTsyReqHandle*/,
  5993     TDes8* aCFIndicators )
  5998     TDes8* aCFIndicators )
  5994     {
  5999     {
  5995 TFLOGSTRING("TSY: CMmCustomTsy::GetIccCallForwardingStatusL");
  6000 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETICCCALLFORWARDINGSTATUSL_1, "TSY: CMmCustomTsy::GetIccCallForwardingStatusL");
  5996 
  6001 
  5997     TInt ret( KErrGeneral );
  6002     TInt ret( KErrGeneral );
  5998 
  6003 
  5999     //Get reqhandle
  6004     //Get reqhandle
  6000     TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
  6005     TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
  6036 //
  6041 //
  6037 void CMmCustomTsy::CompleteGetIccCallForwardingStatus(
  6042 void CMmCustomTsy::CompleteGetIccCallForwardingStatus(
  6038     CMmDataPackage* aDataPackage,
  6043     CMmDataPackage* aDataPackage,
  6039     TInt aErrorCode )
  6044     TInt aErrorCode )
  6040     {
  6045     {
  6041 TFLOGSTRING2("TSY: CMmCustomTsy::CompleteGetIccCallForwardingStatus, aErrorCode=%d", aErrorCode );
  6046 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETEGETICCCALLFORWARDINGSTATUS_1, "TSY: CMmCustomTsy::CompleteGetIccCallForwardingStatus, aErrorCode=%d", aErrorCode );
  6042 
  6047 
  6043     //reset req handle.
  6048     //reset req handle.
  6044     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6049     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6045         ECustomTsyGetIccCallForwardingStatus );
  6050         ECustomTsyGetIccCallForwardingStatus );
  6046 
  6051 
  6051             RMmCustomAPI::TCFIndicatorsPckg* tcfIndicatorPckg = REINTERPRET_CAST(
  6056             RMmCustomAPI::TCFIndicatorsPckg* tcfIndicatorPckg = REINTERPRET_CAST(
  6052                     	RMmCustomAPI::TCFIndicatorsPckg*, iRetCFIndicators );
  6057                     	RMmCustomAPI::TCFIndicatorsPckg*, iRetCFIndicators );
  6053             RMmCustomAPI::TCFIndicators& tcfIndicator = ( *tcfIndicatorPckg )();
  6058             RMmCustomAPI::TCFIndicators& tcfIndicator = ( *tcfIndicatorPckg )();
  6054 
  6059 
  6055             aDataPackage->UnPackData( iCurrentTCFIndicator );
  6060             aDataPackage->UnPackData( iCurrentTCFIndicator );
  6056 TFLOGSTRING2("TSY: CMmCustomTsy::CompleteGetIccCallForwardingStatus, indicator=%u", iCurrentTCFIndicator.iIndicator );
  6061 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETEGETICCCALLFORWARDINGSTATUS_2, "TSY: CMmCustomTsy::CompleteGetIccCallForwardingStatus, indicator=%u", iCurrentTCFIndicator.iIndicator );
  6057 
  6062 
  6058             tcfIndicator.iIndicator = iCurrentTCFIndicator.iIndicator;
  6063             tcfIndicator.iIndicator = iCurrentTCFIndicator.iIndicator;
  6059                 tcfIndicator.iCFNumber.iTypeOfNumber =
  6064                 tcfIndicator.iCFNumber.iTypeOfNumber =
  6060             iCurrentTCFIndicator.iCFNumber.iTypeOfNumber;
  6065             iCurrentTCFIndicator.iCFNumber.iTypeOfNumber;
  6061             tcfIndicator.iCFNumber.iNumberPlan =
  6066             tcfIndicator.iCFNumber.iNumberPlan =
  6064                iCurrentTCFIndicator.iCFNumber.iTelNumber );
  6069                iCurrentTCFIndicator.iCFNumber.iTelNumber );
  6065 
  6070 
  6066 	        // Update CenRep with latest valid data
  6071 	        // Update CenRep with latest valid data
  6067 	        if( &iCurrentTCFIndicator )
  6072 	        if( &iCurrentTCFIndicator )
  6068 	            {
  6073 	            {
  6069 TFLOGSTRING("TSY: CMmCustomTsy::CompleteGetIccCallForwardingStatus : Update Central Repository");
  6074 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETEGETICCCALLFORWARDINGSTATUS_3, "TSY: CMmCustomTsy::CompleteGetIccCallForwardingStatus : Update Central Repository");
  6070 	            TPckg<TUint32> tempPckg( iCurrentTCFIndicator.iIndicator );
  6075 	            TPckg<TUint32> tempPckg( iCurrentTCFIndicator.iIndicator );
  6071 	            iCFISCentRep->Set( KCtsyCallForwardingIndicator, tempPckg );
  6076 	            iCFISCentRep->Set( KCtsyCallForwardingIndicator, tempPckg );
  6072 	
  6077 	
  6073 	            iCFISPrivateCentRep->Set( KCtsyCallForwardingNumberPlan,
  6078 	            iCFISPrivateCentRep->Set( KCtsyCallForwardingNumberPlan,
  6074 	                iCurrentTCFIndicator.iCFNumber.iNumberPlan );
  6079 	                iCurrentTCFIndicator.iCFNumber.iNumberPlan );
  6089         {
  6094         {
  6090         if( KErrNone == aErrorCode )
  6095         if( KErrNone == aErrorCode )
  6091             {
  6096             {
  6092             iGetIccCfStatusBootUp = EFalse;
  6097             iGetIccCfStatusBootUp = EFalse;
  6093             aDataPackage->UnPackData( iCurrentTCFIndicator );
  6098             aDataPackage->UnPackData( iCurrentTCFIndicator );
  6094 TFLOGSTRING("TSY: CMmCustomTsy::CompleteGetIccCallForwardingStatus CenRep key UnconditionalCFStatus not RESETED.");     
  6099 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETEGETICCCALLFORWARDINGSTATUS_4, "TSY: CMmCustomTsy::CompleteGetIccCallForwardingStatus CenRep key UnconditionalCFStatus not RESETED.");
  6095 
  6100 
  6096 TFLOGSTRING2("TSY: CMmCustomTsy::CompleteGetIccCallForwardingStatus : Bootup case, KCtsyCallForwardingIndicator indicator=%u", iCurrentTCFIndicator.iIndicator );
  6101 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETEGETICCCALLFORWARDINGSTATUS_5, "TSY: CMmCustomTsy::CompleteGetIccCallForwardingStatus : Bootup case, KCtsyCallForwardingIndicator indicator=%u", iCurrentTCFIndicator.iIndicator );
  6097 
  6102 
  6098             TPckg<TUint32> tempPckg( iCurrentTCFIndicator.iIndicator );
  6103             TPckg<TUint32> tempPckg( iCurrentTCFIndicator.iIndicator );
  6099             iCFISCentRep->Set( KCtsyCallForwardingIndicator, tempPckg );
  6104             iCFISCentRep->Set( KCtsyCallForwardingIndicator, tempPckg );
  6100             iCFISPrivateCentRep->Set( KCtsyCallForwardingNumberPlan,
  6105             iCFISPrivateCentRep->Set( KCtsyCallForwardingNumberPlan,
  6101             iCurrentTCFIndicator.iCFNumber.iNumberPlan );
  6106             iCurrentTCFIndicator.iCFNumber.iNumberPlan );
  6102             iCFISCentRep->Set( KCtsyCallForwardingNumber,
  6107             iCFISCentRep->Set( KCtsyCallForwardingNumber,
  6103             iCurrentTCFIndicator.iCFNumber.iTelNumber );
  6108             iCurrentTCFIndicator.iCFNumber.iTelNumber );
  6104             iCFISPrivateCentRep->Set( KCtsyCallForwardingMspId,
  6109             iCFISPrivateCentRep->Set( KCtsyCallForwardingMspId,
  6105             iCurrentTCFIndicator.iMultipleSubscriberProfileID );
  6110             iCurrentTCFIndicator.iMultipleSubscriberProfileID );
  6106 TFLOGSTRING("TSY: CMmCustomTsy::CompleteGetIccCallForwardingStatus CenRep updated."); 			
  6111 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETEGETICCCALLFORWARDINGSTATUS_6, "TSY: CMmCustomTsy::CompleteGetIccCallForwardingStatus CenRep updated.");
  6107             }
  6112             }
  6108         }
  6113         }
  6109     }
  6114     }
  6110 
  6115 
  6111 // ---------------------------------------------------------------------------
  6116 // ---------------------------------------------------------------------------
  6115 // ---------------------------------------------------------------------------
  6120 // ---------------------------------------------------------------------------
  6116 //
  6121 //
  6117 TInt CMmCustomTsy::GetIccCallForwardingStatusCancel(
  6122 TInt CMmCustomTsy::GetIccCallForwardingStatusCancel(
  6118 	const TTsyReqHandle aTsyReqHandle )
  6123 	const TTsyReqHandle aTsyReqHandle )
  6119     {
  6124     {
  6120 TFLOGSTRING("CMmCustomTsy::GetIccCallForwardingStatusCancel");
  6125 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETICCCALLFORWARDINGSTATUSCANCEL_1, "CMmCustomTsy::GetIccCallForwardingStatusCancel");
  6121 	// reset reqhandle
  6126 	// reset reqhandle
  6122 	iTsyReqHandleStore->ResetTsyReqHandle(
  6127 	iTsyReqHandleStore->ResetTsyReqHandle(
  6123 			ECustomTsyGetIccCallForwardingStatus );
  6128 			ECustomTsyGetIccCallForwardingStatus );
  6124 
  6129 
  6125 	// complete with KErrCancel
  6130 	// complete with KErrCancel
  6177 //
  6182 //
  6178 void CMmCustomTsy::CompleteNotifyIccCallForwardingStatusChange(
  6183 void CMmCustomTsy::CompleteNotifyIccCallForwardingStatusChange(
  6179     CMmDataPackage* aDataPackage,
  6184     CMmDataPackage* aDataPackage,
  6180     TInt aErrorCode )
  6185     TInt aErrorCode )
  6181     {
  6186     {
  6182 TFLOGSTRING2("TSY: CMmCustomTsy::CompleteNotifyIccCallForwardingStatusChange, Error: %d", aErrorCode);
  6187 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETENOTIFYICCCALLFORWARDINGSTATUSCHANGE_1, "TSY: CMmCustomTsy::CompleteNotifyIccCallForwardingStatusChange, Error: %d", aErrorCode);
  6183 
  6188 
  6184     RMmCustomAPI::TCFIndicators tempNotifyCFIndicator;
  6189     RMmCustomAPI::TCFIndicators tempNotifyCFIndicator;
  6185     aDataPackage->UnPackData( tempNotifyCFIndicator );
  6190     aDataPackage->UnPackData( tempNotifyCFIndicator );
  6186 
  6191 
  6187     TBool isChanged = IsIccCallForwardingStatusChanged(
  6192     TBool isChanged = IsIccCallForwardingStatusChanged(
  6197             {  
  6202             {  
  6198 			//Update CenRep
  6203 			//Update CenRep
  6199 
  6204 
  6200             TPckg<TUint32> tempPckg( iCurrentTCFIndicator.iIndicator );
  6205             TPckg<TUint32> tempPckg( iCurrentTCFIndicator.iIndicator );
  6201 			iCFISCentRep->Set( KCtsyCallForwardingIndicator, tempPckg );	
  6206 			iCFISCentRep->Set( KCtsyCallForwardingIndicator, tempPckg );	
  6202 TFLOGSTRING2("TSY: CMmCustomTsy::CompleteNotifyIccCallForwardingStatusChange : Update CenRep, KCtsyCallForwardingIndicator indicator=%u", iCurrentTCFIndicator.iIndicator );
  6207 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETENOTIFYICCCALLFORWARDINGSTATUSCHANGE_2, "TSY: CMmCustomTsy::CompleteNotifyIccCallForwardingStatusChange : Update CenRep, KCtsyCallForwardingIndicator indicator=%u", iCurrentTCFIndicator.iIndicator );
  6203 				
  6208 				
  6204         	iCFISPrivateCentRep->Set( KCtsyCallForwardingNumberPlan, 
  6209         	iCFISPrivateCentRep->Set( KCtsyCallForwardingNumberPlan, 
  6205         	    iCurrentTCFIndicator.iCFNumber.iNumberPlan );
  6210         	    iCurrentTCFIndicator.iCFNumber.iNumberPlan );
  6206 			
  6211 			
  6207         	iCFISCentRep->Set( KCtsyCallForwardingNumber,
  6212         	iCFISCentRep->Set( KCtsyCallForwardingNumber,
  6208         	    iCurrentTCFIndicator.iCFNumber.iTelNumber );        
  6213         	    iCurrentTCFIndicator.iCFNumber.iTelNumber );        
  6209 				        		    
  6214 				        		    
  6210         	iCFISPrivateCentRep->Set( KCtsyCallForwardingMspId, 
  6215         	iCFISPrivateCentRep->Set( KCtsyCallForwardingMspId, 
  6211         	    iCurrentTCFIndicator.iMultipleSubscriberProfileID );
  6216         	    iCurrentTCFIndicator.iMultipleSubscriberProfileID );
  6212             //CenRep updated
  6217             //CenRep updated
  6213 TFLOGSTRING("TSY: CMmCustomTsy::CompleteNotifyIccCallForwardingStatusChange CenRep updated."); 	            
  6218 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETENOTIFYICCCALLFORWARDINGSTATUSCHANGE_3, "TSY: CMmCustomTsy::CompleteNotifyIccCallForwardingStatusChange CenRep updated.");
  6214             }
  6219             }
  6215 
  6220 
  6216         // Check if notification was requested
  6221         // Check if notification was requested
  6217         TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6222         TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6218             ECustomTsyNotifyIccCallForwardingStatusChange );
  6223             ECustomTsyNotifyIccCallForwardingStatusChange );
  6307 // ---------------------------------------------------------------------------
  6312 // ---------------------------------------------------------------------------
  6308 //
  6313 //
  6309 TInt CMmCustomTsy::GetCellInfoL(
  6314 TInt CMmCustomTsy::GetCellInfoL(
  6310     TDes8* aCellInfoPckg )
  6315     TDes8* aCellInfoPckg )
  6311     {
  6316     {
  6312 TFLOGSTRING("TSY: CMmCustomTsy::GetCellInfo");
  6317 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETCELLINFOL_1, "TSY: CMmCustomTsy::GetCellInfo");
  6313 
  6318 
  6314     TInt ret = KErrServerBusy;
  6319     TInt ret = KErrServerBusy;
  6315 
  6320 
  6316     // Try to get request handle
  6321     // Try to get request handle
  6317     TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
  6322     TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
  6347 // (other items were commented in a header).
  6352 // (other items were commented in a header).
  6348 // ---------------------------------------------------------------------------
  6353 // ---------------------------------------------------------------------------
  6349 //
  6354 //
  6350 TInt CMmCustomTsy::GetCellInfoCancel()
  6355 TInt CMmCustomTsy::GetCellInfoCancel()
  6351     {
  6356     {
  6352 TFLOGSTRING("TSY: CMmCustomTsy::GetCellInfoCancel");
  6357 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETCELLINFOCANCEL_1, "TSY: CMmCustomTsy::GetCellInfoCancel");
  6353 
  6358 
  6354     // reset the req handle
  6359     // reset the req handle
  6355     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6360     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6356         ECustomTsyGetCellInfo );
  6361         ECustomTsyGetCellInfo );
  6357 
  6362 
  6375 //
  6380 //
  6376 void CMmCustomTsy::CompleteGetCellInfo(
  6381 void CMmCustomTsy::CompleteGetCellInfo(
  6377     RMmCustomAPI::TMmCellInfo* aCellInfo,
  6382     RMmCustomAPI::TMmCellInfo* aCellInfo,
  6378     TInt aErrorValue )
  6383     TInt aErrorValue )
  6379     {
  6384     {
  6380 TFLOGSTRING2("TSY: CMmCustomTsy::CompleteGetCellInfo - aErrorValue %d", aErrorValue);
  6385 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETEGETCELLINFO_1, "TSY: CMmCustomTsy::CompleteGetCellInfo - aErrorValue %d", aErrorValue);
  6381 
  6386 
  6382     // reset the req handle
  6387     // reset the req handle
  6383     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6388     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6384         ECustomTsyGetCellInfo );
  6389         ECustomTsyGetCellInfo );
  6385 
  6390 
  6406 // ---------------------------------------------------------------------------
  6411 // ---------------------------------------------------------------------------
  6407 //
  6412 //
  6408 TInt CMmCustomTsy::NotifyCellInfoChange(
  6413 TInt CMmCustomTsy::NotifyCellInfoChange(
  6409     TDes8* aCellInfoPckg )
  6414     TDes8* aCellInfoPckg )
  6410     {
  6415     {
  6411 TFLOGSTRING("TSY: CMmCustomTsy::NotifyCellInfoChange");
  6416 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_NOTIFYCELLINFOCHANGE_1, "TSY: CMmCustomTsy::NotifyCellInfoChange");
  6412    
  6417    
  6413     RMmCustomAPI::TMmCellInfo temp;
  6418     RMmCustomAPI::TMmCellInfo temp;
  6414 	RMmCustomAPI::TMmCellInfoPckg tempPckg(temp);
  6419 	RMmCustomAPI::TMmCellInfoPckg tempPckg(temp);
  6415 	
  6420 	
  6416 	TInt paramLength = aCellInfoPckg->MaxLength();
  6421 	TInt paramLength = aCellInfoPckg->MaxLength();
  6436 //
  6441 //
  6437 void CMmCustomTsy::CompleteNotifyCellInfoChange(
  6442 void CMmCustomTsy::CompleteNotifyCellInfoChange(
  6438     RMmCustomAPI::TMmCellInfo* aCellInfo,
  6443     RMmCustomAPI::TMmCellInfo* aCellInfo,
  6439     TInt aErrorCode )
  6444     TInt aErrorCode )
  6440     {
  6445     {
  6441 TFLOGSTRING2("TSY: CMmCustomTsy::CompleteNotifyCellInfoChange Error: %d", aErrorCode);
  6446 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETENOTIFYCELLINFOCHANGE_1, "TSY: CMmCustomTsy::CompleteNotifyCellInfoChange Error: %d", aErrorCode);
  6442 
  6447 
  6443     // Check if notification was requested
  6448     // Check if notification was requested
  6444 	TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6449 	TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6445         ECustomTsyNotifyCellInfoChange );
  6450         ECustomTsyNotifyCellInfoChange );
  6446 
  6451 
  6468 // (other items were commented in a header).
  6473 // (other items were commented in a header).
  6469 // ---------------------------------------------------------------------------
  6474 // ---------------------------------------------------------------------------
  6470 //
  6475 //
  6471 TInt CMmCustomTsy::NotifyCellInfoChangeCancel()
  6476 TInt CMmCustomTsy::NotifyCellInfoChangeCancel()
  6472     {
  6477     {
  6473 TFLOGSTRING("TSY: CMmCustomTsy::NotifyCellInfoChangeCancel");
  6478 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_NOTIFYCELLINFOCHANGECANCEL_1, "TSY: CMmCustomTsy::NotifyCellInfoChangeCancel");
  6474 
  6479 
  6475     // reset the reqhandle
  6480     // reset the reqhandle
  6476     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6481     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6477         ECustomTsyNotifyCellInfoChange );
  6482         ECustomTsyNotifyCellInfoChange );
  6478 
  6483 
  6494 // ---------------------------------------------------------------------------
  6499 // ---------------------------------------------------------------------------
  6495 //
  6500 //
  6496 RMmCustomAPI::TPndCacheStatus CMmCustomTsy::GetPhonebookCacheStatus( 
  6501 RMmCustomAPI::TPndCacheStatus CMmCustomTsy::GetPhonebookCacheStatus( 
  6497     TUint8 aPhoneBookType )
  6502     TUint8 aPhoneBookType )
  6498     {
  6503     {
  6499 TFLOGSTRING("TSY: CMmCustomTsy::GetPhonebookCacheStatus");
  6504 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETPHONEBOOKCACHESTATUS_1, "TSY: CMmCustomTsy::GetPhonebookCacheStatus");
  6500     RMmCustomAPI::TPndCacheStatus ret( RMmCustomAPI::ECacheNotUsed );
  6505     RMmCustomAPI::TPndCacheStatus ret( RMmCustomAPI::ECacheNotUsed );
  6501 
  6506 
  6502     switch ( aPhoneBookType )
  6507     switch ( aPhoneBookType )
  6503         {
  6508         {
  6504         case KADNPhoneBook:
  6509         case KADNPhoneBook:
  6524 // ---------------------------------------------------------------------------
  6529 // ---------------------------------------------------------------------------
  6525 //
  6530 //
  6526 void CMmCustomTsy::ReqCompleted( const TTsyReqHandle aTsyReqHandle,
  6531 void CMmCustomTsy::ReqCompleted( const TTsyReqHandle aTsyReqHandle,
  6527     const TInt aError )
  6532     const TInt aError )
  6528     {
  6533     {
  6529 TFLOGSTRING3("TSY: CMmCustomTsy::ReqCompleted, aTsyReqHandle=%d, aError=%d", aTsyReqHandle, aError );
  6534 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_REQCOMPLETED_1, "TSY: CMmCustomTsy::ReqCompleted, aTsyReqHandle=%d, aError=%d", aTsyReqHandle, aError );
  6530 
  6535 
  6531 	CTelObject::ReqCompleted ( aTsyReqHandle, aError );
  6536 	CTelObject::ReqCompleted ( aTsyReqHandle, aError );
  6532 	}
  6537 	}
  6533 
  6538 
  6534 // ---------------------------------------------------------------------------
  6539 // ---------------------------------------------------------------------------
  6540 TInt CMmCustomTsy::GetSystemNetworkBandL(
  6545 TInt CMmCustomTsy::GetSystemNetworkBandL(
  6541     const TTsyReqHandle aTsyReqHandle,
  6546     const TTsyReqHandle aTsyReqHandle,
  6542     RMmCustomAPI::TBandSelection* aSystemNetworkBand,
  6547     RMmCustomAPI::TBandSelection* aSystemNetworkBand,
  6543     RMmCustomAPI::TNetworkModeCaps* aSystemNetworkMode )
  6548     RMmCustomAPI::TNetworkModeCaps* aSystemNetworkMode )
  6544     {
  6549     {
  6545 TFLOGSTRING("TSY: CMmCustomTsy::GetSystemNetworkBandL");
  6550 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETSYSTEMNETWORKBANDL_1, "TSY: CMmCustomTsy::GetSystemNetworkBandL");
  6546     TTsyReqHandle reqhandle = iTsyReqHandleStore->GetTsyReqHandle(
  6551     TTsyReqHandle reqhandle = iTsyReqHandleStore->GetTsyReqHandle(
  6547         ECustomTsyGetSystemNetworkBand );
  6552         ECustomTsyGetSystemNetworkBand );
  6548 
  6553 
  6549     if ( ECustomTsyReqHandleUnknown < reqhandle )
  6554     if ( ECustomTsyReqHandleUnknown < reqhandle )
  6550         {
  6555         {
  6586 void CMmCustomTsy::CompleteGetSystemNetworkBand(
  6591 void CMmCustomTsy::CompleteGetSystemNetworkBand(
  6587     RMmCustomAPI::TBandSelection aSystemNetworkBand,
  6592     RMmCustomAPI::TBandSelection aSystemNetworkBand,
  6588     RMmCustomAPI::TNetworkModeCaps aSystemNetworkMode,
  6593     RMmCustomAPI::TNetworkModeCaps aSystemNetworkMode,
  6589     TInt aResult )
  6594     TInt aResult )
  6590     {
  6595     {
  6591 TFLOGSTRING2("TSY: CMmCustomTsy::CompleteGetSystemNetworkBand. Result: %d", aResult);
  6596 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETEGETSYSTEMNETWORKBAND_1, "TSY: CMmCustomTsy::CompleteGetSystemNetworkBand. Result: %d", aResult);
  6592     // reset req handle. Returns the deleted req handle
  6597     // reset req handle. Returns the deleted req handle
  6593     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6598     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6594         ECustomTsyGetSystemNetworkBand );
  6599         ECustomTsyGetSystemNetworkBand );
  6595 
  6600 
  6596     // check if handle exists
  6601     // check if handle exists
  6619 // ---------------------------------------------------------------------------
  6624 // ---------------------------------------------------------------------------
  6620 //
  6625 //
  6621 TInt CMmCustomTsy::GetSystemNetworkBandCancel(
  6626 TInt CMmCustomTsy::GetSystemNetworkBandCancel(
  6622     const TTsyReqHandle aTsyReqHandle )
  6627     const TTsyReqHandle aTsyReqHandle )
  6623     {
  6628     {
  6624 TFLOGSTRING("TSY: CMmCustomTsy::GetSystemNetworkBandCancel");
  6629 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETSYSTEMNETWORKBANDCANCEL_1, "TSY: CMmCustomTsy::GetSystemNetworkBandCancel");
  6625     // reset the pointer to client data
  6630     // reset the pointer to client data
  6626     iAvailableSystemNetworkBand = NULL;
  6631     iAvailableSystemNetworkBand = NULL;
  6627     iSystemNetworkModeCaps = NULL;
  6632     iSystemNetworkModeCaps = NULL;
  6628 
  6633 
  6629     // reset the reqhandle
  6634     // reset the reqhandle
  6645 TInt CMmCustomTsy::SetSystemNetworkBandL(
  6650 TInt CMmCustomTsy::SetSystemNetworkBandL(
  6646     const TTsyReqHandle aTsyReqHandle,
  6651     const TTsyReqHandle aTsyReqHandle,
  6647     RMmCustomAPI::TBandSelection* aSystemNetworkBand,
  6652     RMmCustomAPI::TBandSelection* aSystemNetworkBand,
  6648     RMmCustomAPI::TNetworkModeCaps* aSystemNetworkModeCaps )
  6653     RMmCustomAPI::TNetworkModeCaps* aSystemNetworkModeCaps )
  6649     {
  6654     {
  6650 TFLOGSTRING("TSY: CMmCustomTsy::SetSystemNetworkBandL");
  6655 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SETSYSTEMNETWORKBANDL_1, "TSY: CMmCustomTsy::SetSystemNetworkBandL");
  6651     TTsyReqHandle reqhandle = iTsyReqHandleStore->GetTsyReqHandle(
  6656     TTsyReqHandle reqhandle = iTsyReqHandleStore->GetTsyReqHandle(
  6652         ECustomTsySetSystemNetworkBand );
  6657         ECustomTsySetSystemNetworkBand );
  6653 
  6658 
  6654     if ( ECustomTsyReqHandleUnknown < reqhandle )
  6659     if ( ECustomTsyReqHandleUnknown < reqhandle )
  6655         {
  6660         {
  6695 // ---------------------------------------------------------------------------
  6700 // ---------------------------------------------------------------------------
  6696 //
  6701 //
  6697 void CMmCustomTsy::CompleteSetSystemNetworkBand(
  6702 void CMmCustomTsy::CompleteSetSystemNetworkBand(
  6698     TInt aResult )
  6703     TInt aResult )
  6699     {
  6704     {
  6700 TFLOGSTRING("TSY: CMmCustomTsy::CompleteSetSystemNetworkBand");
  6705 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETESETSYSTEMNETWORKBAND_1, "TSY: CMmCustomTsy::CompleteSetSystemNetworkBand");
  6701     // reset req handle. Returns the deleted req handle
  6706     // reset req handle. Returns the deleted req handle
  6702     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6707     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6703         ECustomTsySetSystemNetworkBand );
  6708         ECustomTsySetSystemNetworkBand );
  6704 
  6709 
  6705     // check if handle exists
  6710     // check if handle exists
  6716 // (other items were commented in a header).
  6721 // (other items were commented in a header).
  6717 // ---------------------------------------------------------------------------
  6722 // ---------------------------------------------------------------------------
  6718 //
  6723 //
  6719 void CMmCustomTsy::SetIccCfBootUpFlag( TBool aBootUp )
  6724 void CMmCustomTsy::SetIccCfBootUpFlag( TBool aBootUp )
  6720     {
  6725     {
  6721 TFLOGSTRING2("TSY: CMmCustomTsy::SetIccCfBootUpFlag, aBootUp=%d", aBootUp );
  6726 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_SETICCCFBOOTUPFLAG_1, "TSY: CMmCustomTsy::SetIccCfBootUpFlag, aBootUp=%d", aBootUp );
  6722 
  6727 
  6723     iGetIccCfStatusBootUp = aBootUp;
  6728     iGetIccCfStatusBootUp = aBootUp;
  6724     }
  6729     }
  6725     
  6730     
  6726 // ---------------------------------------------------------------------------
  6731 // ---------------------------------------------------------------------------
  6730 //
  6735 //
  6731 TInt CMmCustomTsy::GetUSIMServiceSupportL(
  6736 TInt CMmCustomTsy::GetUSIMServiceSupportL(
  6732     const TTsyReqHandle aTsyReqHandle,
  6737     const TTsyReqHandle aTsyReqHandle,
  6733     RMmCustomAPI::TAppSupport* aAppSupport )
  6738     RMmCustomAPI::TAppSupport* aAppSupport )
  6734     {
  6739     {
  6735 TFLOGSTRING("TSY: CMmCustomTsy::GetUSIMServiceSupportL");
  6740 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETUSIMSERVICESUPPORTL_1, "TSY: CMmCustomTsy::GetUSIMServiceSupportL");
  6736 
  6741 
  6737     TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
  6742     TTsyReqHandle reqHandle = iTsyReqHandleStore->GetTsyReqHandle(
  6738         ECustomTsyGetUSIMServiceSupport );
  6743         ECustomTsyGetUSIMServiceSupport );
  6739 
  6744 
  6740     if ( ECustomTsyReqHandleUnknown != reqHandle )
  6745     if ( ECustomTsyReqHandleUnknown != reqHandle )
  6777 //
  6782 //
  6778 void CMmCustomTsy::CompleteGetUSIMServiceSupport(
  6783 void CMmCustomTsy::CompleteGetUSIMServiceSupport(
  6779     CMmDataPackage* aDataPackage,
  6784     CMmDataPackage* aDataPackage,
  6780     TInt aErrorCode )
  6785     TInt aErrorCode )
  6781     {
  6786     {
  6782 TFLOGSTRING("TSY: CMmCustomTsy::CompleteGetUSIMServiceSupport");
  6787 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETEGETUSIMSERVICESUPPORT_1, "TSY: CMmCustomTsy::CompleteGetUSIMServiceSupport");
  6783 
  6788 
  6784     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6789     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6785         ECustomTsyGetUSIMServiceSupport );
  6790         ECustomTsyGetUSIMServiceSupport );
  6786 
  6791 
  6787     if( ECustomTsyReqHandleUnknown != reqHandle )
  6792     if( ECustomTsyReqHandleUnknown != reqHandle )
  6814 // (other items were commented in a header).
  6819 // (other items were commented in a header).
  6815 // ---------------------------------------------------------------------------
  6820 // ---------------------------------------------------------------------------
  6816 //
  6821 //
  6817 TInt CMmCustomTsy::GetUSIMServiceSupportCancel()
  6822 TInt CMmCustomTsy::GetUSIMServiceSupportCancel()
  6818     {
  6823     {
  6819 TFLOGSTRING("TSY: CMmCustomTsy::GetUSIMServiceSupportCancel");
  6824 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_GETUSIMSERVICESUPPORTCANCEL_1, "TSY: CMmCustomTsy::GetUSIMServiceSupportCancel");
  6820 
  6825 
  6821     // reset the reqhandle
  6826     // reset the reqhandle
  6822     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6827     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6823         ECustomTsyGetUSIMServiceSupport );
  6828         ECustomTsyGetUSIMServiceSupport );
  6824 
  6829 
  6840 // ---------------------------------------------------------------------------
  6845 // ---------------------------------------------------------------------------
  6841 //
  6846 //
  6842 TInt CMmCustomTsy::NotifyRemoteAlertingToneStatusChange(
  6847 TInt CMmCustomTsy::NotifyRemoteAlertingToneStatusChange(
  6843     RMmCustomAPI::TRemoteAlertingToneStatus* aToneStatus )
  6848     RMmCustomAPI::TRemoteAlertingToneStatus* aToneStatus )
  6844     {
  6849     {
  6845 TFLOGSTRING("TSY: CMmCustomTsy::NotifyRemoteAlertingToneStatusChange");
  6850 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_NOTIFYREMOTEALERTINGTONESTATUSCHANGE_1, "TSY: CMmCustomTsy::NotifyRemoteAlertingToneStatusChange");
  6846 
  6851 
  6847     // save pointer to client data
  6852     // save pointer to client data
  6848     iToneStatus = aToneStatus;
  6853     iToneStatus = aToneStatus;
  6849 
  6854 
  6850     // save handle type
  6855     // save handle type
  6861 //
  6866 //
  6862 void CMmCustomTsy::CompleteNotifyRemoteAlertingToneStatusChange(
  6867 void CMmCustomTsy::CompleteNotifyRemoteAlertingToneStatusChange(
  6863     RMmCustomAPI::TRemoteAlertingToneStatus aToneStatus,
  6868     RMmCustomAPI::TRemoteAlertingToneStatus aToneStatus,
  6864     TInt aErrorCode )
  6869     TInt aErrorCode )
  6865     {
  6870     {
  6866 TFLOGSTRING("TSY: CMmCustomTsy::CompleteNotifyRemoteAlertingToneStatusChange");
  6871 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMCUSTOMTSY_COMPLETENOTIFYREMOTEALERTINGTONESTATUSCHANGE_1, "TSY: CMmCustomTsy::CompleteNotifyRemoteAlertingToneStatusChange");
  6867 
  6872 
  6868     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6873     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  6869         ECustomTsyNotifyRemoteAlertingToneStatusChange );
  6874         ECustomTsyNotifyRemoteAlertingToneStatusChange );
  6870 
  6875 
  6871     // check if request was called
  6876     // check if request was called