telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmnettsy.cpp
branchRCL_3
changeset 19 630d2f34d719
parent 18 17af172ffa5f
child 20 07a122eea281
--- a/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmnettsy.cpp	Thu Aug 19 11:03:36 2010 +0300
+++ b/telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmnettsy.cpp	Tue Aug 31 16:23:08 2010 +0300
@@ -16,6 +16,12 @@
 
 
 //INCLUDE FILES
+
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmmnettsyTraces.h"
+#endif
+
 #include "cmmnettsy.h"
 #include "cmmphonetsy.h"
 #include "cmmtsyreqhandlestore.h"
@@ -25,7 +31,6 @@
 #include "cmmcalllist.h"
 #include "cmmcalltsy.h"
 #include "CMmCommonStaticUtility.h"
-#include "mmtsy_ipcdefs.h"
 #include <ctsy/serviceapi/gsmerror.h>
 
 // ======== MEMBER FUNCTIONS ========
@@ -47,7 +52,7 @@
 
 void CMmNetTsy::ConstructL()
     {
-TFLOGSTRING("TSY: CMmNetTsy::ConstructL");
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_CONSTRUCTL_1, "TSY: CMmNetTsy::ConstructL");
 
     //set current NW mode
     iMode = RMobilePhone::ENetworkModeUnknown;
@@ -83,7 +88,7 @@
     
 CMmNetTsy::~CMmNetTsy()
     {
-TFLOGSTRING("TSY: CMmNetTsy::~CMmNetTsy");
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_DTOR_1, "TSY: CMmNetTsy::~CMmNetTsy");
 
     // Delete get detected networks list
     if ( iGetDetectedNetworks )
@@ -107,12 +112,6 @@
     
     // Destroy array        			
     iRegisterationStatusRequests.ResetAndDestroy();
-    
-    // delete buffers for PLMN List 
-	delete iClientIdGetPrefPLMN;
-	delete iGetPrefPLMNList;
-	delete iStorePrefPLMNList;
-	
     }
     
     
@@ -127,8 +126,7 @@
     const TInt aIpc, // IPC number of request          
     const TDataPackage& aPackage ) // Contains parameters for request
     {
-TFLOGSTRING3("TSY: CMmPhoneTsy::DoExtFuncL.\n  \t\t\t IPC:%d\n \t\t\t Handle:%d", 
-    aIpc, aTsyReqHandle);
+OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_DOEXTFUNCL_1, "TSY: CMmPhoneTsy::DoExtFuncL.\n  \t\t\t IPC:%d\n \t\t\t Handle:%d", aIpc, aTsyReqHandle);
 
     TInt ret ( KErrNone );
 
@@ -173,7 +171,7 @@
                 dataPtr2 ) );
             break;
         case EMobilePhoneGetNetworkName:
-TFLOGSTRING("TSY: CMmNetTsy::DoExtFuncL - EMobilePhoneGetNetworkName");
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_DOEXTFUNCL_2, "TSY: CMmNetTsy::DoExtFuncL - EMobilePhoneGetNetworkName");
             ret = GetNetworkName( 
                 aTsyReqHandle, aPackage.Des1n(), aPackage.Des2n() );
             break;
@@ -184,12 +182,12 @@
             break;
         // Get Cell information
         case EMobilePhoneGetCellInfo:
-        	TFLOGSTRING("TSY: CMmNetTsy::DoExtFuncL - EMobilePhoneGetCellInfo");
+        	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_DOEXTFUNCL_3, "TSY: CMmNetTsy::DoExtFuncL - EMobilePhoneGetCellInfo");
         	ret = GetCellInfoL(aTsyReqHandle, aPackage.Des1n());
         	break;
         // Notify cell information change
         case EMobilePhoneNotifyCellInfoChange:
-        	TFLOGSTRING("TSY: CMmNetTsy::DoExtFuncL - EMobilePhoneNotifyCellInfoChange");
+        	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_DOEXTFUNCL_4, "TSY: CMmNetTsy::DoExtFuncL - EMobilePhoneNotifyCellInfoChange");
         	ret = NotifyCellInfoChangeL(aTsyReqHandle, aPackage.Des1n());
         	break;
         // Notify Current Network Change, no location
@@ -290,23 +288,7 @@
         case EMobilePhoneGetCurrentActiveUSimApplication:
             ret = GetCurrentActiveUSimApplicationL( aTsyReqHandle,
                 reinterpret_cast<RMobilePhone::TAID*>( dataPtr ) );
-            break;
-		case EMobilePhoneGetPreferredNetworksPhase1:
-			ret = GetPreferredNetworksListPhase1L(aTsyReqHandle, 
-				                                  reinterpret_cast< RMobilePhone::TClientId*>( dataPtr ),
-                                                  reinterpret_cast< TInt* >( dataPtr2 ) );
-			break;
-        case EMobilePhoneGetPreferredNetworksPhase2:
-			ret = GetPreferredNetworksListPhase2
-				    (aTsyReqHandle, reinterpret_cast<RMobilePhone::TClientId*>(aPackage.Ptr1()),
-				     aPackage.Des2n());
-        	break;
-		case EMobilePhoneStorePreferredNetworksList:
-			ret = StorePreferredNetworksListL(aTsyReqHandle, aPackage.Des1n());
-			break;
-		case EMobilePhoneNotifyStorePreferredNetworksListChange:
-			ret = NotifyStorePreferredNetworksListChange();
-			break;
+            break;                        
         default:
             ret = KErrNotSupported;
             break;
@@ -326,7 +308,7 @@
     const TInt aIpc, // IPC number of request.
     const TTsyReqHandle aTsyReqHandle ) // Request handle of given request.
     {
-	TFLOGSTRING3("TSY: CMmNetTsy::CancelService IPC: %d ret: %d", aIpc, aTsyReqHandle);
+	OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_CANCELSERVICE_1, "TSY: CMmNetTsy::CancelService IPC: %d ret: %d", aIpc, aTsyReqHandle);
     TInt ret ( KErrNotSupported );
     
     //When the clients close their sub-sessions (eg. by calling RLine::Close), 
@@ -452,18 +434,7 @@
                 }
             break;
             }    
-		case EMobilePhoneGetPreferredNetworksPhase1:
-			ret = GetPreferredNetworksListCancel(aTsyReqHandle);
-			break;
-		case EMobilePhoneStorePreferredNetworksList:
-			// LTSY doesn't have transcation mechanism so that storing request cannot be cancelled.
-			// So this cancellation request is ignored. 
-            ret = KErrNone; 
-			break;
-		case EMobilePhoneNotifyStorePreferredNetworksListChange:
-			ret = NotifyStorePreferredNetworksListChangeCancel(aTsyReqHandle);
-			break;
-	        //Default case
+        //Default case
         default:
             ret = KErrNone; 
             break;
@@ -1129,7 +1100,7 @@
     const TTsyReqHandle aTsyReqHandle, 
     TDes8* aNetworkInfoPckg ) const 
     {
-TFLOGSTRING("TSY: CMmNetTsy::GetHomeNetwork" );
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETHOMENETWORK_1, "TSY: CMmNetTsy::GetHomeNetwork" );
 
     TInt ret ( KErrNotSupported );
     
@@ -1204,12 +1175,12 @@
     TDes8* aNetworkInfoPckg,
     RMobilePhone::TMobilePhoneLocationAreaV1* aArea ) const 
     {
-TFLOGSTRING("TSY: CMmNetTsy::GetCurrentNetwork");
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETCURRENTNETWORK_1, "TSY: CMmNetTsy::GetCurrentNetwork");
 
     TInt ret( KErrArgument );
     if ( ERfsStateInfoInactive == iMmPhoneTsy->GetRfStateInfo() )  
         {
-TFLOGSTRING ("TSY: CMmNetTsy::GetCurrentNetwork Offline mode ON, request is not allowed! ");
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETCURRENTNETWORK_2, "TSY: CMmNetTsy::GetCurrentNetwork Offline mode ON, request is not allowed! ");
         ret = CMmCommonStaticUtility::EpocErrorCode( KErrGeneral,
                 KErrGsmOfflineOpNotAllowed );
                 
@@ -1292,10 +1263,10 @@
 //
 TInt CMmNetTsy::GetCellInfoL(const TTsyReqHandle aTsyReqHandle, TDes8* aCellInfoPckg)
     {
-    TFLOGSTRING2("TSY: CMmNetTsy::GetCellInfoL; Handle : %d", aTsyReqHandle);
+    OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETCELLINFOL_1, "TSY: CMmNetTsy::GetCellInfoL; Handle : %d", aTsyReqHandle);
     if(sizeof(RMobilePhone::TMobilePhoneCellInfoV9) > aCellInfoPckg->MaxLength())
     	{
-        TFLOGSTRING ("TSY: CMmNetTsy::GetCellInfo Bad size argument");
+        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETCELLINFOL_2, "TSY: CMmNetTsy::GetCellInfo Bad size argument");
         // Complete the request with appropiate error        
         return KErrArgument;
     	}
@@ -1304,14 +1275,14 @@
     RMobilePhone::TMultimodeType& cellInfoTemp = ( *cellInfoTempPckg )();
 	if(cellInfoTemp.ExtensionId()!=KEtelExtMultimodeV9)
 		{
-        TFLOGSTRING ("TSY: CMmNetTsy::GetCellInfo Bad version argument");
+        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETCELLINFOL_3, "TSY: CMmNetTsy::GetCellInfo Bad version argument");
         // Complete the request with appropiate error        
         return KErrArgument;
 		}
     TInt ret( KErrNotSupported );
     if ( ERfsStateInfoInactive == iMmPhoneTsy->GetRfStateInfo() )  
         {
-        TFLOGSTRING ("TSY: CMmNetTsy::GetCellInfo Offline mode ON, request is not allowed! ");
+        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETCELLINFOL_4, "TSY: CMmNetTsy::GetCellInfo Offline mode ON, request is not allowed! ");
         ret = CMmCommonStaticUtility::EpocErrorCode( KErrGeneral, KErrGsmOfflineOpNotAllowed );
                 
         // Complete the request with appropiate error
@@ -1505,7 +1476,7 @@
         	}
 
         //Complete the client request
-        TFLOGSTRING3("TSY: CMmNetTsy::CompleteCellInfoReq client: %d; Handle: %d", i, req.iReqHandle );
+        OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_HANDLECELLINFOUPDATE_1, "TSY: CMmNetTsy::CompleteCellInfoReq client: %d; Handle: %d", i, req.iReqHandle );
         iMmPhoneTsy->ReqCompleted( req.iReqHandle, aError );
 		}
     // Destroy array   
@@ -1534,13 +1505,13 @@
     TDes8* aNetworkNamePckg,
     TDes8* aPlmnPckg ) const   
     {
-TFLOGSTRING("TSY: CMmNetTsy::GetNetworkName");
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETNETWORKNAME_1, "TSY: CMmNetTsy::GetNetworkName");
     TInt ret ( KErrGeneral );
 
     if( sizeof(RMobilePhone::TMobilePhoneNetworkNameV3) > aNetworkNamePckg->MaxLength() ||
         sizeof(RMobilePhone::TMobilePhoneOPlmnV3) > aPlmnPckg->MaxLength() )
 	  	{
-	  	TFLOGSTRING ("TSY: CMmNetTsy::GetNetworkName bad size argument");
+	  	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETNETWORKNAME_2, "TSY: CMmNetTsy::GetNetworkName bad size argument");
 	  	// Complete the request with appropiate error        
 	  	ret = KErrArgument;
 	  	}
@@ -1565,11 +1536,11 @@
         networkName.iShortName.Copy( networkInfo.iShortName );
         plmn.iCountryCode.Copy( networkInfo.iCountryCode );
         plmn.iNetworkId.Copy( networkInfo.iNetworkId );
-TFLOGSTRING2("TSY: CMmNetTsy::GetNetworkName, iLongName: %S", &networkName.iLongName);
+OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETNETWORKNAME_3, "TSY: CMmNetTsy::GetNetworkName, iLongName: %S", networkName.iLongName);
 
         if( KErrNone == ret )
             {
-TFLOGSTRING2("TSY: CMmNetTsy::GetNetworkName - completing, ret: %d", ret);
+OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETNETWORKNAME_4, "TSY: CMmNetTsy::GetNetworkName - completing, ret: %d", ret);
             iMmPhoneTsy->ReqCompleted( aTsyReqHandle, ret );
             }
         }
@@ -1588,7 +1559,7 @@
     const TTsyReqHandle aTsyReqHandle, 
     TDes8* aNetworkInfoPckg ) const 
     {
-TFLOGSTRING("TSY: CMmNetTsy::GetCurrentNetworkNoLocation"); 
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETCURRENTNETWORKNOLOCATION_1, "TSY: CMmNetTsy::GetCurrentNetworkNoLocation");
   
     TInt ret( KErrNotSupported );
     
@@ -1656,7 +1627,7 @@
     const TTsyReqHandle aTsyReqHandle,
     TDes8* aNetworkInfoPckg )
     {
-TFLOGSTRING("TSY: CMmNetTsy::NotifyCurrentNetworkNoLocationChangeL");
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_NOTIFYCURRENTNETWORKNOLOCATIONCHANGEL_1, "TSY: CMmNetTsy::NotifyCurrentNetworkNoLocationChangeL");
      
     // save the handle and the request type
     iMmPhoneTsy->iReqHandleType =
@@ -1681,7 +1652,7 @@
 TInt CMmNetTsy::NotifyCurrentNetworkNoLocationChangeCancel(
     const TTsyReqHandle aTsyReqHandle ) 
     {
-TFLOGSTRING("TSY: CMmNetTsy::NotifyCurrentNetworkNoLocationChangeCancel");
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_NOTIFYCURRENTNETWORKNOLOCATIONCHANGECANCEL_1, "TSY: CMmNetTsy::NotifyCurrentNetworkNoLocationChangeCancel");
     
     // find the correct ReqHandle...  
     for ( TInt i = 0; i < iNotifyCurrentNwNoLocationRequests.Count(); i++ )
@@ -1717,7 +1688,7 @@
     TDes8* aNetworkInfoPckg, 
     RMobilePhone::TMobilePhoneLocationAreaV1* aArea ) 
     {
-TFLOGSTRING("TSY: CMmNetTsy::NotifyCurrentNetworkChangeL");
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_NOTIFYCURRENTNETWORKCHANGEL_1, "TSY: CMmNetTsy::NotifyCurrentNetworkChangeL");
 
     TInt ret = KErrArgument;
     TInt length = aNetworkInfoPckg->MaxLength();
@@ -1755,7 +1726,7 @@
 TInt CMmNetTsy::NotifyCurrentNetworkChangeCancel(
     const TTsyReqHandle aTsyReqHandle ) 
     {
-TFLOGSTRING("TSY: CMmNetTsy::NotifyCurrentNetworkChangeCancel");
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_NOTIFYCURRENTNETWORKCHANGECANCEL_1, "TSY: CMmNetTsy::NotifyCurrentNetworkChangeCancel");
 
     // find the correct ReqHandle...  
     for ( TInt i = 0; i < iNotifyCurrentNwRequests.Count(); i++ )
@@ -1790,14 +1761,14 @@
     CMmDataPackage* aDataPackage, 
     TInt aResult ) 
     {
-TFLOGSTRING("TSY: CMmNetTsy::CompleteNotifyCurrentNetworkChange");
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_COMPLETENOTIFYCURRENTNETWORKCHANGE_1, "TSY: CMmNetTsy::CompleteNotifyCurrentNetworkChange");
     
     // create a copy of the NW info sended by the LTSY
     RMobilePhone::TMobilePhoneNetworkInfoV8 networkInfo;
     RMobilePhone::TMobilePhoneLocationAreaV1 locationArea;
     
     aDataPackage->UnPackData ( networkInfo, locationArea );
-TFLOGSTRING2("TSY: CMmNetTsy::CompleteNotifyCurrentNetworkChange, new extension ID: %d", networkInfo.ExtensionId() ); 
+OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_COMPLETENOTIFYCURRENTNETWORKCHANGE_2, "TSY: CMmNetTsy::CompleteNotifyCurrentNetworkChange, new extension ID: %d", networkInfo.ExtensionId() );
    
     // empty additional extension information...
     if ( KETelExtMultimodeV1 == networkInfo.ExtensionId() )
@@ -1839,17 +1810,17 @@
         TTsyReqHandle reqHandle =
             iMmPhoneTsy->iTsyReqHandleStore->ResetTsyReqHandle(
             CMmPhoneTsy::EMultimodePhoneNotifyCurrentNetworkChange );            
-TFLOGSTRING2("TSY: CMmNetTsy::CompleteNotifyCurrentNetworkChange, req handler =%u", reqHandle );
+OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_COMPLETENOTIFYCURRENTNETWORKCHANGE_3, "TSY: CMmNetTsy::CompleteNotifyCurrentNetworkChange, req handler =%u", reqHandle );
 
         if ( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
             {
             TInt requestCount = iNotifyCurrentNwRequests.Count();            
-TFLOGSTRING2("TSY: CMmNetTsy::CompleteNotifyCurrentNetworkChange, requestCount: %d ", requestCount ); 
+OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_COMPLETENOTIFYCURRENTNETWORKCHANGE_4, "TSY: CMmNetTsy::CompleteNotifyCurrentNetworkChange, requestCount: %d ", requestCount );
 
             // Complete all notification requests...
             for ( TInt i = 0; i < requestCount; i++ )
                 {
-TFLOGSTRING2("TSY: CMmNetTsy::CompleteNotifyCurrentNetworkChange, Loc; array: %d ", i );                 
+OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_COMPLETENOTIFYCURRENTNETWORKCHANGE_5, "TSY: CMmNetTsy::CompleteNotifyCurrentNetworkChange, Loc; array: %d ", i );
                
                 // copy the infromation to client, 0 = first index
                 switch ( ( *( iNotifyCurrentNwRequests[ 0 ].
@@ -1938,17 +1909,17 @@
         TTsyReqHandle reqHandle =
           iMmPhoneTsy->iTsyReqHandleStore->ResetTsyReqHandle(
           CMmPhoneTsy::EMultimodePhoneNotifyCurrentNetworkNoLocationChange );
-TFLOGSTRING2("TSY: CMmNetTsy::CompleteNotifyCurrentNetworkChange, req handler NoLoc =%u", reqHandle );
+OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_COMPLETENOTIFYCURRENTNETWORKCHANGE_6, "TSY: CMmNetTsy::CompleteNotifyCurrentNetworkChange, req handler NoLoc =%u", reqHandle );
 
         if ( CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
             {
             TInt requestCount = iNotifyCurrentNwNoLocationRequests.Count();            
-TFLOGSTRING2("TSY: CMmNetTsy::CompleteNotifyCurrentNetworkChange, requestCount NoLoc: %d ", requestCount );
+OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_COMPLETENOTIFYCURRENTNETWORKCHANGE_7, "TSY: CMmNetTsy::CompleteNotifyCurrentNetworkChange, requestCount NoLoc: %d ", requestCount );
             
             // Complete all requests...
             for ( TInt indx = 0; indx < requestCount; indx++ )
                 {
-TFLOGSTRING2("TSY: CMmNetTsy::CompleteNotifyCurrentNetworkChange, NoLoc; array: %d ", indx );                 
+OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_COMPLETENOTIFYCURRENTNETWORKCHANGE_8, "TSY: CMmNetTsy::CompleteNotifyCurrentNetworkChange, NoLoc; array: %d ", indx );
                 
                 // copy the infromation to client, 0 = first index
                 switch ( ( *( iNotifyCurrentNwNoLocationRequests[ 0 ].
@@ -2036,10 +2007,10 @@
     const TTsyReqHandle aTsyReqHandle,
     TDes8* aCellInfoPckg) 
     {
-    TFLOGSTRING2("TSY: CMmNetTsy::NotifyCellInfoChangeL; Handel: %d", aTsyReqHandle);
+    OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_NOTIFYCELLINFOCHANGEL_1, "TSY: CMmNetTsy::NotifyCellInfoChangeL; Handel: %d", aTsyReqHandle);
     if(sizeof(RMobilePhone::TMobilePhoneCellInfoV9) > aCellInfoPckg->MaxLength())
     	{
-        TFLOGSTRING ("TSY: CMmNetTsy::NotifyCellInfoChangeL Bad size argument");
+        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_NOTIFYCELLINFOCHANGEL_2, "TSY: CMmNetTsy::NotifyCellInfoChangeL Bad size argument");
         // Complete the request with appropiate error        
         return KErrArgument;
     	}
@@ -2048,7 +2019,7 @@
     RMobilePhone::TMultimodeType& cellInfoTemp = ( *cellInfoTempPckg )();
 	if(cellInfoTemp.ExtensionId()!=KEtelExtMultimodeV9)
 		{
-        TFLOGSTRING ("TSY: CMmNetTsy::GetCellInfo Bad version argument");
+        OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_NOTIFYCELLINFOCHANGEL_3, "TSY: CMmNetTsy::GetCellInfo Bad version argument");
         // Complete the request with appropiate error        
         return KErrArgument;
 		}
@@ -2081,7 +2052,7 @@
 TInt CMmNetTsy::GetCellInfoCancel(
     const TTsyReqHandle aTsyReqHandle ) 
     {
-    TFLOGSTRING2("TSY: CMmNetTsy::GetCellInfoCancel; Handle: %d", aTsyReqHandle);
+    OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETCELLINFOCANCEL_1, "TSY: CMmNetTsy::GetCellInfoCancel; Handle: %d", aTsyReqHandle);
     // find the correct ReqHandle...  
 	const TInt KReqCount = iCellInfoRequests.Count();
     for ( TInt i = 0; i < KReqCount; i++ )
@@ -2114,7 +2085,7 @@
 TInt CMmNetTsy::NotifyCellInfoChangeCancel(
     const TTsyReqHandle aTsyReqHandle ) 
     {
-    TFLOGSTRING2("TSY: CMmNetTsy::NotifyCellInfoChangeCancel; Handle: %d", aTsyReqHandle);
+    OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_NOTIFYCELLINFOCHANGECANCEL_1, "TSY: CMmNetTsy::NotifyCellInfoChangeCancel; Handle: %d", aTsyReqHandle);
 
     // find the correct ReqHandle...  
 	const TInt KReqCount = iNotifyCellInfoRequests.Count();
@@ -2149,7 +2120,7 @@
     const TTsyReqHandle aTsyReqHandle, 
     RMobilePhone::TMobilePhoneRegistrationStatus* aStatus ) 
     {
-TFLOGSTRING2("TSY: CMmNetTsy::GetNetworkRegistrationStatusL Handle: %d", aTsyReqHandle);
+OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETNETWORKREGISTRATIONSTATUSL_1, "TSY: CMmNetTsy::GetNetworkRegistrationStatusL Handle: %d", aTsyReqHandle);
     
 	// If the modem is not ready (Common TSY has not received EMmTsyBootNotifyModemStatusReadyIPC
 	// from LTSY), we don't need to ask. Update registration status and complete client immediately. 
@@ -2180,15 +2151,17 @@
 			//get mode specific information 
 			TInt ret ( iMmPhoneTsy->iMmPhoneExtInterface->
 					GetNetworkRegistrationStatusL() );
+                OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETNETWORKREGISTRATIONSTATUSL_2, "TSY: CMmNetTsy::GetNetworkRegistrationStatusL - Sending request to LTSY" );
+                OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETNETWORKREGISTRATIONSTATUSL_3, "TSY: CMmNetTsy::GetNetworkRegistrationStatusL - Modem not ready" );
 
             if ( KErrNone != ret )
                 {
-                TFLOGSTRING2("TSY: CMmNetTsy::GetNetworkRegistrationStatusL - Complete with error %d", ret );
+                OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETNETWORKREGISTRATIONSTATUSL_4, "TSY: CMmNetTsy::GetNetworkRegistrationStatusL - Complete with error %d", ret );
                 iMmPhoneTsy->ReqCompleted( aTsyReqHandle, ret );
                 }
             else
                 {
-TFLOGSTRING("TSY: CMmNetTsy::GetNetworkRegistrationStatusL - Client to buffer" );
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETNETWORKREGISTRATIONSTATUSL_5, "TSY: CMmNetTsy::GetNetworkRegistrationStatusL - Client to buffer" );
                 // save request handle in queue
     			TGetNetworkRegisterationRequest* req = 
     				new (ELeave) TGetNetworkRegisterationRequest();
@@ -2221,13 +2194,13 @@
 TInt CMmNetTsy::GetNetworkRegistrationStatusCancel( 
     const TTsyReqHandle aTsyReqHandle )
     {     
-TFLOGSTRING2("TSY: CMmNetTsy::GetNetworkRegistrationStatusCancel Handle: %d", aTsyReqHandle);      
+OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETNETWORKREGISTRATIONSTATUSCANCEL_1, "TSY: CMmNetTsy::GetNetworkRegistrationStatusCancel Handle: %d", aTsyReqHandle);
 
     TInt requestCount = iRegisterationStatusRequests.Count(); 
    
     if( 1 == requestCount )
     	{
-TFLOGSTRING("TSY: CMmNetTsy::GetNetworkRegistrationStatusCancel 1 == requestCount  ");     	
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETNETWORKREGISTRATIONSTATUSCANCEL_2, "TSY: CMmNetTsy::GetNetworkRegistrationStatusCancel 1 == requestCount  ");
         //reset the req handle
 		TTsyReqHandle reqHandle = iMmPhoneTsy->iTsyReqHandleStore->ResetTsyReqHandle(
         	CMmPhoneTsy::EMultimodePhoneGetNetworkRegistrationStatus );    	
@@ -2259,7 +2232,7 @@
 void CMmNetTsy::CompleteGetNetworkRegistrationStatus(
     TInt aErrorValue )
     {
-TFLOGSTRING("TSY: CMmNetTsy::CompleteGetNetworkRegistrationStatus");       
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_COMPLETEGETNETWORKREGISTRATIONSTATUS_1, "TSY: CMmNetTsy::CompleteGetNetworkRegistrationStatus");
      // Reset the req handle
     TTsyReqHandle reqHandle =
         iMmPhoneTsy->iTsyReqHandleStore->ResetTsyReqHandle(
@@ -2277,7 +2250,7 @@
             
             //set value in client side
             *(req->iRetGetNWRegistrationStatus) = iNWRegistrationStatus;
-TFLOGSTRING2("TSY: CMmNetTsy::CompleteGetNetworkRegistrationStatus client: %d", i );
+OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_COMPLETEGETNETWORKREGISTRATIONSTATUS_2, "TSY: CMmNetTsy::CompleteGetNetworkRegistrationStatus client: %d", i );
         
 			//Complete the client request
             iMmPhoneTsy->ReqCompleted( req->iReqHandle, aErrorValue );
@@ -2333,7 +2306,7 @@
     CMmDataPackage* aDataPackage, //Contains information for client side
     TInt aResult ) // result code 
     {
-TFLOGSTRING( "TSY: CMmNetTsy::CompleteNotifyNetworkRegistrationStatusChange" );
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_COMPLETENOTIFYNETWORKREGISTRATIONSTATUSCHANGE_1,  "TSY: CMmNetTsy::CompleteNotifyNetworkRegistrationStatusChange" );
 
     RMobilePhone::TMobilePhoneRegistrationStatus* regStatus = NULL;
     RMobilePhone::TMobilePhoneNetworkStatus* nwStatus = NULL;
@@ -2348,7 +2321,7 @@
 
         // Store NEW registration status
         iNWRegistrationStatus = *regStatus;
-TFLOGSTRING2("TSY: CMmNetTsy::CompleteNotifyNetworkRegistrationStatusChange, status: %d", iNWRegistrationStatus );
+OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_COMPLETENOTIFYNETWORKREGISTRATIONSTATUSCHANGE_2, "TSY: CMmNetTsy::CompleteNotifyNetworkRegistrationStatusChange, status: %d", iNWRegistrationStatus );
 
         //reset req handle. Returns the deleted req handle
         TTsyReqHandle reqHandle = iMmPhoneTsy->iTsyReqHandleStore->
@@ -2591,7 +2564,7 @@
 RMobilePhone::TMobilePhoneRegistrationStatus 
     CMmNetTsy::GetNetworkRegistrationStatus() const
     {
-TFLOGSTRING2("TSY: CMmNetTsy::GetNetworkRegistrationStatus: %d", iNWRegistrationStatus );
+OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETNETWORKMODE_1, "TSY: CMmNetTsy::GetNetworkRegistrationStatus: %d", iNWRegistrationStatus );
     return iNWRegistrationStatus;
     }
 
@@ -2607,7 +2580,7 @@
         aNetworkSecurityLevel ) const //Network security level
         
     {
-    TFLOGSTRING("TSY: CMmNetTsy::GetNetworkSecurityLevel");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETNETWORKSECURITYLEVEL_1, "TSY: CMmNetTsy::GetNetworkSecurityLevel");
     iMmPhoneTsy->PhoneExtInterface()->GetNetworkSecurityLevel (
         *aNetworkSecurityLevel );
 
@@ -2625,7 +2598,7 @@
     RMobilePhone::TMobilePhoneNetworkSecurity*
         aNetworkSecurityLevel ) 
     {
-    TFLOGSTRING("TSY: CMmNetTsy::NotifyNetworkSecurityLevelChange");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_NOTIFYNETWORKSECURITYLEVELCHANGE_1, "TSY: CMmNetTsy::NotifyNetworkSecurityLevelChange");
     iMmPhoneTsy->iReqHandleType = 
         CMmPhoneTsy::EMultimodePhoneNotifyNetworkSecurityLevelChange;
     iRetNetworkSecurityLevel = aNetworkSecurityLevel;
@@ -2638,7 +2611,7 @@
 //
 TInt CMmNetTsy::NotifyNetworkSecurityLevelChangeCancel()
     {
-    TFLOGSTRING("TSY: CMmNetTsy::NotifyNetworkSecurityLevelChangeCancel");
+    OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_NOTIFYNETWORKSECURITYLEVELCHANGECANCEL_1, "TSY: CMmNetTsy::NotifyNetworkSecurityLevelChangeCancel");
     iRetNetworkSecurityLevel = NULL;
     TTsyReqHandle reqHandle =
         iMmPhoneTsy->iTsyReqHandleStore->ResetTsyReqHandle(
@@ -2822,7 +2795,7 @@
     const RMobilePhone::TMobilePhoneNetworkInfoV8& previousNetInfo, 
     const RMobilePhone::TMobilePhoneNetworkInfoV8& newNetInfo ) 
     {
-TFLOGSTRING("TSY: CMmNetTsy::IsNetworkInfoChanged" );
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_ISNETWORKINFOCHANGED_1, "TSY: CMmNetTsy::IsNetworkInfoChanged" );
 
     TBool ret ( ETrue );
 
@@ -2911,11 +2884,11 @@
                 }    
             //close the file
             file.Close();
-TFLOGSTRING("TSY:CMmNetTsy::ReadVariantOptions:File successfully read.");
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_READVARIANTOPTIONS_1, "TSY:CMmNetTsy::ReadVariantOptions:File successfully read.");
             }
         else
             {
-TFLOGSTRING2("TSY:CMmNetTsy::ReadVariantOptions:Could not open file Z:\\private\\101f7989\\operatorVariants.ini, error=%d",err);
+OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_READVARIANTOPTIONS_2, "TSY:CMmNetTsy::ReadVariantOptions:Could not open file Z:\\private\\101f7989\\operatorVariants.ini, error=%d",err);
             }
 
         // close connection to file server
@@ -2923,9 +2896,9 @@
         }
     else
         {
-TFLOGSTRING("TSY:CMmNetTsy::ReadVariantOptions:Could not connect to file server.");
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_READVARIANTOPTIONS_3, "TSY:CMmNetTsy::ReadVariantOptions:Could not connect to file server.");
         }
-TFLOGSTRING2("TSY:CMmNetTsy::ReadVariantOptions:iCipheringIndicatorForcedOff=%d",iCipheringIndicatorForcedOff);
+OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_READVARIANTOPTIONS_4, "TSY:CMmNetTsy::ReadVariantOptions:iCipheringIndicatorForcedOff=%d",iCipheringIndicatorForcedOff);
     }
 
 // ---------------------------------------------------------------------------
@@ -2936,7 +2909,7 @@
 //
 TBool CMmNetTsy::CipheringIndicatorForcedOff()
     {
-    TFLOGSTRING2("TSY:CMmNetTsy::CipheringIndicatorForcedOff:iCipheringIndicatorForcedOff=%d",iCipheringIndicatorForcedOff);
+    OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_CIPHERINGINDICATORFORCEDOFF_1, "TSY:CMmNetTsy::CipheringIndicatorForcedOff:iCipheringIndicatorForcedOff=%d",iCipheringIndicatorForcedOff);
     return iCipheringIndicatorForcedOff;
     }
 
@@ -2951,7 +2924,7 @@
 	RMobilePhone::TClientId* aClient,
 	TInt* aBufSize )
     {
-TFLOGSTRING("TSY: CMmNetTsy::AuthorizationInfoPhase1L");
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETAUTHORIZATIONINFOPHASE1L_1, "TSY: CMmNetTsy::AuthorizationInfoPhase1L");
 
     TTsyReqHandle getAuthorizationInfoPhase1Handle =
         iMmPhoneTsy->iTsyReqHandleStore->GetTsyReqHandle(
@@ -3001,7 +2974,7 @@
 	CMmDataPackage* aDataPackage,
 	TInt aError )
     {
-TFLOGSTRING("TSY: CMmNetTsy::ProcessGetAuthorizationInfoPhase1L");
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_PROCESSGETAUTHORIZATIONINFOPHASE1L_1, "TSY: CMmNetTsy::ProcessGetAuthorizationInfoPhase1L");
 
     // Fetch the request handle
     TTsyReqHandle reqHandle =
@@ -3044,7 +3017,7 @@
 	RMobilePhone::TClientId* aClient,
 	TDes8* aBuffer )
     {
-TFLOGSTRING("TSY: CMmNetTsy::GetAuthorizationInfoPhase2L");
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETAUTHORIZATIONINFOPHASE2L_1, "TSY: CMmNetTsy::GetAuthorizationInfoPhase2L");
 	
 	TInt error = KErrNone;
 	
@@ -3125,7 +3098,7 @@
     const TTsyReqHandle aTsyReqHandle,
     RMobilePhone::TAID* aAID )
     {  
-TFLOGSTRING("TSY:CMmNetTsy::GetCurrentActiveUSimApplicationL");
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETCURRENTACTIVEUSIMAPPLICATIONL_1, "TSY:CMmNetTsy::GetCurrentActiveUSimApplicationL");
 	TTsyReqHandle getCurrentActiveUSimApplicationHandle =
 	    iMmPhoneTsy->iTsyReqHandleStore->GetTsyReqHandle(
 	    CMmPhoneTsy::EMultimodePhoneGetCurrentActiveUSimApplication );
@@ -3168,7 +3141,7 @@
 //
 TInt CMmNetTsy::GetCurrentActiveUSimApplicationCancel()
     { 
-TFLOGSTRING("TSY: CMmNetTsy::GetCurrentActiveUSimApplicationCancel");
+OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_GETCURRENTACTIVEUSIMAPPLICATIONCANCEL_1, "TSY: CMmNetTsy::GetCurrentActiveUSimApplicationCancel");
     //reset the req handle
     TTsyReqHandle reqHandle =
         iMmPhoneTsy->iTsyReqHandleStore->ResetTsyReqHandle(
@@ -3193,7 +3166,7 @@
     CMmDataPackage* aDataPackage,
     TInt aErrorValue )
     {
-	TFLOGSTRING("TSY: CMmNetTsy::CompleteGetCurrentActiveUSimApplication");
+	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMNETTSY_COMPLETEGETCURRENTACTIVEUSIMAPPLICATION_1, "TSY: CMmNetTsy::CompleteGetCurrentActiveUSimApplication");
     //reset req handle. Returns the deleted req handle
     TTsyReqHandle reqHandle =
         iMmPhoneTsy->iTsyReqHandleStore->ResetTsyReqHandle(
@@ -3213,345 +3186,7 @@
         iMmPhoneTsy->ReqCompleted( reqHandle, aErrorValue );	        				                          
         }    	        
     }
-
-// ---------------------------------------------------------------------------
-// CMmNetTsy::GetPreferredNetworksListPhase1L
-// Returns minimum size of a buffer to retreive the current Preferred Networks List from SIM
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-TInt CMmNetTsy::GetPreferredNetworksListPhase1L(const TTsyReqHandle /*aTsyReqHandle*/, 
-    											 RMobilePhone::TClientId const* aId, TInt* aBufSize)
-	{
-	TFLOGSTRING("TSY: CMmNetTsy::GetPreferredNetworksListPhase1");	
-	TTsyReqHandle getPrefPLMNHandle = iMmPhoneTsy->iTsyReqHandleStore->GetTsyReqHandle
-		                              (CMmPhoneTsy::EMultimodePhoneGetPreferredNetworksPhase1);
-	
-	if(CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != getPrefPLMNHandle)
-		{
-        // The request is already processing because of previous request
-        // Complete request with status value informing the client about 
-        // the situation.
-		TFLOGSTRING("TSY GetPreferredNetworksListPhase1: the request is already processing because previous request.");
-		return KErrServerBusy;
-        }
-	else
-		{
-		TInt ret = iMmPhoneTsy->iMessageManager->HandleRequestL(ECtsyPhoneGetPreferredNetworksReq);
-
-		if(KErrNone == ret)
-			{
-			TFLOGSTRING("TSY: Successfully send IPC EMobilePhoneGetPreferredNetworksPhase1 to LTSY");
-			
-			iMmPhoneTsy->iReqHandleType = CMmPhoneTsy::EMultimodePhoneGetPreferredNetworksPhase1;
-			
-			// if iGetPrefPLMNList, iClientIdGetPrefPLMN, and/or iBufSizeGetPrefPLMN are not NULL, phase 1 is called twice without calling phase 2.
-			// In this case, we should ignore the previous phase 1 and delete buffers.
-			delete iGetPrefPLMNList;
-			iGetPrefPLMNList = NULL;
-			iBufSizeGetPrefPLMN = aBufSize;
-			delete iClientIdGetPrefPLMN;
-			iClientIdGetPrefPLMN = NULL;
-			// Copy client id (session and subsession handle). it's used for
-            // matching phase 1 and 2 of a request
-			iClientIdGetPrefPLMN = new ( ELeave ) RMobilePhone::TClientId( *aId ); 
-			
-			}
-		else
-			{
-			TFLOGSTRING2("TSY: GetPreferredNetworksListPhase1L LTSY returns error=%d", ret);			
-			return ret;
-			}
-		}
-	return KErrNone;
-	
-	}
-
-// ---------------------------------------------------------------------------
-// CMmNetTsy::GetPreferredNetworksListPhase2
-// Copies the current Preferred Networks List in the given buffer
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-TInt CMmNetTsy::GetPreferredNetworksListPhase2(const TTsyReqHandle aTsyReqHandle, 
-    											 RMobilePhone::TClientId const* aId, TDes8* aBuffer)
-	{
-	TFLOGSTRING2("TSY: CMmNetTsy::GetPreferredNetworksListPhase2: aTsyReqHandle=%d", aTsyReqHandle);	
-	TInt ret = KErrNone;
-	
-	if( ( iClientIdGetPrefPLMN->iSessionHandle == aId->iSessionHandle ) &&
-        ( iClientIdGetPrefPLMN->iSubSessionHandle == aId->iSubSessionHandle ) )
-		{
-		TFLOGSTRING3("TSY GetPreferredNetworksListPhase2: Phase 1 and Phase 2 client ID matched, Copy the streamed list to client buffer. session %d, subsession %d.",
-				iClientIdGetPrefPLMN->iSessionHandle, iClientIdGetPrefPLMN->iSubSessionHandle);		
-		if(iGetPrefPLMNList != NULL)
-			{
-			aBuffer->Copy( iGetPrefPLMNList->Ptr( 0 ) );
-			// MmPhoneTsy completes the request only if return an error
-			// so the request without error code has to complete here
-			iMmPhoneTsy->ReqCompleted(aTsyReqHandle, KErrNone);
-			}
-		else
-			{
-			ret = KErrNotReady;
-			}
-		}
-	else
-		{
-		TFLOGSTRING("TSY GetPreferredNetworksListPhase2: Phase 1 and Phase 2 client ID not matched, complete request with KErrCorrupt");			
-		ret = KErrCorrupt;
-		}
-
-	delete iClientIdGetPrefPLMN;
-	iClientIdGetPrefPLMN = NULL;
-
-	delete iGetPrefPLMNList;
-	iGetPrefPLMNList = NULL;
-	
-	iBufSizeGetPrefPLMN = NULL;
-	
-	return ret;
-	}
-
-// ---------------------------------------------------------------------------
-// CMmNetTsy::StorePreferredNetworksListL
-// Stores the Preferred Networks List into the SIM
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-TInt CMmNetTsy::StorePreferredNetworksListL(const TTsyReqHandle /*aTsyReqHandle*/, TDes8* aBuffer)
-	{
-	TFLOGSTRING("TSY: CMmNetTsy::StorePreferredNetworksList");	
-
-	TTsyReqHandle storePrefPLMNHandle = 
-			iMmPhoneTsy->iTsyReqHandleStore->GetTsyReqHandle( CMmPhoneTsy::EMultimodePhoneStorePreferredNetworksList );
-
-	if(CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != storePrefPLMNHandle)
-        {
-        // The request is already processing because of previous request.
-        // Complete request with status value informing the client about 
-        // the situation.
-		TFLOGSTRING("TSY StorePreferredNetworksListL: the request is already processing because previous request.");
-		return KErrServerBusy;
-        }
-    else
-        {
-    	iMmPhoneTsy->iReqHandleType = CMmPhoneTsy::EMultimodePhoneStorePreferredNetworksList;
-		delete iStorePrefPLMNList;
-		iStorePrefPLMNList = NULL;
-		iStorePrefPLMNList = CMobilePhoneStoredNetworkList::NewL();
-		iStorePrefPLMNList->RestoreL(*aBuffer);
-
-		CMmDataPackage package;
-		package.PackData(iStorePrefPLMNList);
-		TInt ret = iMmPhoneTsy->iMessageManager->HandleRequestL(ECtsyPhoneStorePreferredNetworksListReq, &package);
-		if(KErrNone == ret)
-			{
-			TFLOGSTRING("TSY StorePreferredNetworksListL: Successfully send IPC EMobilePhoneStorePreferredNetworksList to LTSY");
-
-			}
-		else
-			{
-			TFLOGSTRING2("TSY StorePreferredNetworksListL: LTSY returns error=%d", ret);		
-			delete iStorePrefPLMNList;
-			iStorePrefPLMNList = NULL;
-			return ret;
-			}
-    	}
-
-	return KErrNone;
-	}
-
-
-// ---------------------------------------------------------------------------
-// CMmNetTsy::GetPreferredNetworksListCancel
-// Cancels the request for Getting Preferred Networks List
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-TInt CMmNetTsy::GetPreferredNetworksListCancel(const TTsyReqHandle /*aTsyReqHandle*/)
-	{
-	TFLOGSTRING("TSY: CMmPhoneTsy::GetPreferredNetworksListCancel");
-
-	TTsyReqHandle reqHandle = iMmPhoneTsy->iTsyReqHandleStore->ResetTsyReqHandle(CMmPhoneTsy::EMultimodePhoneGetPreferredNetworksPhase1); 
-
-	if(CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle)
-		{
-		iBufSizeGetPrefPLMN = NULL;
-		delete iClientIdGetPrefPLMN;
-		iClientIdGetPrefPLMN = NULL;
-		delete iGetPrefPLMNList;
-		iGetPrefPLMNList = NULL;
-        iMmPhoneTsy->ReqCompleted( reqHandle, KErrCancel );        
-		}
-	//if reqHandle is 0, it means  phase 1 has completed and the list retrieval cannot be cancelled
-	return KErrNone;
-	}
-
-// ---------------------------------------------------------------------------
-// CMmNetTsy::NotifyStorePreferredNetworksListChange
-// Subscribes the notification for storing Preferred networks List
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-TInt CMmNetTsy::NotifyStorePreferredNetworksListChange()
-	{
-	TFLOGSTRING("TSY: CMmPhoneTsy::NotifyStorePreferredNetworksListChange");	
-	iMmPhoneTsy->iReqHandleType = CMmPhoneTsy::EMultimodePhoneNotifyStorePreferredNetworksListChange;
-
-	return KErrNone;
-	}
-
-// ---------------------------------------------------------------------------
-// CMmNetTsy::NotifyStorePreferredNetworksListChangeCancel
-// Cancels the notification request for storing Preferred Networks List
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-TInt CMmNetTsy::NotifyStorePreferredNetworksListChangeCancel(const TTsyReqHandle aTsyReqHandle)
-	{
-	TFLOGSTRING2("TSY: CMmNetTsy::NotifyStorePreferredNetworksListChangeCancel: aTsyReqHandle=%d", aTsyReqHandle);
-	TTsyReqHandle reqHandle = iMmPhoneTsy->iTsyReqHandleStore->ResetTsyReqHandle
-		                       (CMmPhoneTsy::EMultimodePhoneNotifyStorePreferredNetworksListChange);	
-
-	if(CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle)
-		{
-		iMmPhoneTsy->ReqCompleted( aTsyReqHandle, KErrCancel );
-		}
-	return KErrNone;
-	}
-
-// ---------------------------------------------------------------------------
-// CMmNetTsy::CompleteGetPreferredNetworksListPhase1
-// Completes the notification request for storing Preferred Networks List
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-void CMmNetTsy::CompleteGetPreferredNetworksListPhase1(TInt aError, CMmDataPackage* aDataPackage)
-	{
-	TFLOGSTRING2("TSY: CMmNetTsy::CompleteGetPreferredNetworksListPhase1: aError=%d", aError);
-
-	TTsyReqHandle reqHandle = iMmPhoneTsy->iTsyReqHandleStore->ResetTsyReqHandle( CMmPhoneTsy::EMultimodePhoneGetPreferredNetworksPhase1 );
-
-	TFLOGSTRING2("TSY CompleteGetPreferredNetworksListPhase1: EMobilePhoneGetPreferredNetworksPhase1 reqHandle=%d", reqHandle);
-
-	TInt completeError = KErrNone;
-	
-	if(CMmPhoneTsy::EMultimodePhoneReqHandleUnknown == reqHandle)
-		{
-		TFLOGSTRING("TSY CompleteGetPreferredNetworksListPhase1: reqHandle is 0, cannot complete Phase1 list retrieval request!!");
-		delete iClientIdGetPrefPLMN;
-		iClientIdGetPrefPLMN = NULL;
-		}
-	else if(KErrNone == aError)
-		{
-		if(iGetPrefPLMNList == NULL)
-			{
-			TFLOGSTRING("TSY CompleteGetPreferredNetworksListPhase1: LTSY successfully retrieved the preferred networks list, unpack it");		
-			CMobilePhoneStoredNetworkList* list;
-			aDataPackage->UnPackData(&list);
-	
-			TRAPD(trapError, iGetPrefPLMNList = list->StoreLC(); CleanupStack::Pop();); // pop the CBufBase * allocated by StoreLC
-			if(KErrNone == trapError)
-				{
-				*iBufSizeGetPrefPLMN = iGetPrefPLMNList->Size();
-				TFLOGSTRING2("TSY CompleteGetPreferredNetworksListPhase1: first phase list retrieval is OK!!, client buffer = %d", *iBufSizeGetPrefPLMN);					
-				iMmPhoneTsy->ReqCompleted( reqHandle, KErrNone );
-			
-				}
-			else
-				{
-				TFLOGSTRING2("TSY CompleteGetPreferredNetworksListPhase1: failed to stream the list into the buffer, error = %d!!", trapError);
-				completeError = trapError;
-				}
-			}
-		else
-			{
-			TFLOGSTRING("TSY CompleteGetPreferredNetworksListPhase1: iGetPrefPLMNList is not null");
-			completeError = KErrServerBusy;
-			}
-		}
-	else
-		{
-		TFLOGSTRING2("TSY CompleteGetPreferredNetworksListPhase1: LTSY failed to retrieve preferred network list!! error = %d", aError);
-		completeError = aError;
-		}
-	
-	if(completeError != KErrNone)
-		{
-		iMmPhoneTsy->ReqCompleted( reqHandle, aError );
-		delete iClientIdGetPrefPLMN;
-		iClientIdGetPrefPLMN = NULL;
-		}
-	
-	iBufSizeGetPrefPLMN = NULL;
-	}
-
-// ---------------------------------------------------------------------------
-// CMmNetTsy::CompleteStorePreferredNetworksList
-// Completes an outstanding StorePreferredNetworksListL, which stores Preferred Networks List to LTSY layer
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-void CMmNetTsy::CompleteStorePreferredNetworksList(TInt aError)
-	{
-	TFLOGSTRING2("TSY: CMmPhoneTsy::CompleteStorePreferredNetworksList: aError=%d", aError);	
-
-	TTsyReqHandle reqHandle = iMmPhoneTsy->iTsyReqHandleStore->ResetTsyReqHandle( CMmPhoneTsy::EMultimodePhoneStorePreferredNetworksList );
-
-	TFLOGSTRING2("TSY CompleteStorePreferredNetworksList: EMobilePhoneStorePreferredNetworksList reqHandle=%d", reqHandle);
-
-	if(iStorePrefPLMNList != NULL)
-		{
-		delete iStorePrefPLMNList;
-		iStorePrefPLMNList = NULL;
-
-		}
-
-	if(KErrNone == aError)
-		{
-		if(CMmPhoneTsy::EMultimodePhoneReqHandleUnknown == reqHandle)
-			{
-			// we cannot complete the store request but complete the notifier.
-			TFLOGSTRING("TSY CompleteStorePreferredNetworksList: reqHandle is 0, cannot complete store list request!!");
-			}
-		else
-			{
-			TFLOGSTRING("TSY CompleteStorePreferredNetworksList: LTSY successfully stored the preferred networks list");
-			iMmPhoneTsy->ReqCompleted( reqHandle, KErrNone );
-			}
-		CompleteNotifyStorePreferredNetworksListChange();
-		}
-	else
-		{
-		TFLOGSTRING("TSY CompleteStorePreferredNetworksList: LTSY failed to store the preferred networks list");
-		iMmPhoneTsy->ReqCompleted( reqHandle, aError );
-		}
-	}
-
-// ---------------------------------------------------------------------------
-// CMmNetTsy::CompleteNotifyStorePreferredNetworksListChange
-// Completes the notification request for storing Preferred Networks List
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-void CMmNetTsy::CompleteNotifyStorePreferredNetworksListChange()
-	{
-TFLOGSTRING("TSY: CMmPhoneTsy::CompleteNotifyStorePreferredNetworksListChange");	
-
-	TTsyReqHandle reqHandle = iMmPhoneTsy->iTsyReqHandleStore->ResetTsyReqHandle
-		                      ( CMmPhoneTsy::EMultimodePhoneNotifyStorePreferredNetworksListChange );
-    if (CMmPhoneTsy::EMultimodePhoneReqHandleUnknown != reqHandle )
-        {
-    	iMmPhoneTsy->ReqCompleted( reqHandle, KErrNone);
-        }
-	else
-		{
-		TFLOGSTRING("TSY CompleteNotifyStorePreferredNetworksListChange: reqHandle is 0, cannot complete request for IPC EMobilePhoneNotifyStorePreferredNetworksListChange!!");
-
-		}
-	}
-
+    
 //  End of File