telephonyserverplugins/common_tsy/commontsy/src/mmpacket/Cmmpacketcontexttsy.cpp
branchRCL_3
changeset 65 630d2f34d719
parent 16 fe8b59ab9fa0
child 66 07a122eea281
child 69 b982c3e940f3
equal deleted inserted replaced
61:17af172ffa5f 65: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 "CmmpacketcontexttsyTraces.h"
       
    23 #endif
       
    24 
    19 #include "Cmmpacketcontexttsy.h"
    25 #include "Cmmpacketcontexttsy.h"
    20 #include "Cmmpacketcontextlist.h"
    26 #include "Cmmpacketcontextlist.h"
    21 #include "cmmpacketservicegsmwcdmaext.h"
    27 #include "cmmpacketservicegsmwcdmaext.h"
    22 #include "CMmPacketTsy.h"
    28 #include "CMmPacketTsy.h"
    23 #include <ctsy/tflogger.h>
       
    24 #include "MmTsy_timeoutdefs.h"
    29 #include "MmTsy_timeoutdefs.h"
    25 #include "MmTsy_numberOfSlots.h"
    30 #include "MmTsy_numberOfSlots.h"
    26 
    31 
    27 // ============================ MEMBER FUNCTIONS ===============================
    32 // ============================ MEMBER FUNCTIONS ===============================
    28 
    33 
    36         CMmPacketServiceTsy* const aMmPacketService,
    41         CMmPacketServiceTsy* const aMmPacketService,
    37         const TInfoName& aHostCID, 
    42         const TInfoName& aHostCID, 
    38         const TDes& aName,  
    43         const TDes& aName,  
    39         const TUint8 aProxyId ) 
    44         const TUint8 aProxyId ) 
    40     {
    45     {
    41 TFLOGSTRING2( "TSY: CMmPacketContextTsy::NewL. Context name:%S", &aName );
    46 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_NEWL_1,  "TSY: CMmPacketContextTsy::NewL. Context name:%S", aName );
    42 
    47 
    43     CMmPacketContextTsy* packetContext = new ( ELeave ) CMmPacketContextTsy();
    48     CMmPacketContextTsy* packetContext = new ( ELeave ) CMmPacketContextTsy();
    44 
    49 
    45     CleanupClosePushL( *packetContext );
    50     CleanupClosePushL( *packetContext );
    46     packetContext->iMmPacketService = aMmPacketService;
    51     packetContext->iMmPacketService = aMmPacketService;
    59     InitInternalAttributes();    
    64     InitInternalAttributes();    
    60     }
    65     }
    61     
    66     
    62 CMmPacketContextTsy::~CMmPacketContextTsy()
    67 CMmPacketContextTsy::~CMmPacketContextTsy()
    63     {
    68     {
    64 TFLOGSTRING2( "TSY: CMmPacketContextTsy::~CMmPacketContextTsy. Context name: %S", &iContextName );
    69 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_DTOR_1,  "TSY: CMmPacketContextTsy::~CMmPacketContextTsy. Context name: %S", iContextName );
    65 	
    70 	
    66 	if( iMmPacketService )
    71 	if( iMmPacketService )
    67 		{
    72 		{
    68 			
    73 			
    69 		iMmPacketService->PacketContextList()->RemoveObject( this );
    74 		iMmPacketService->PacketContextList()->RemoveObject( this );
   157 TInt CMmPacketContextTsy::ExtFunc( 
   162 TInt CMmPacketContextTsy::ExtFunc( 
   158         const TTsyReqHandle aTsyReqHandle, 
   163         const TTsyReqHandle aTsyReqHandle, 
   159         const TInt aIpc, 
   164         const TInt aIpc, 
   160         const TDataPackage& aPackage )  
   165         const TDataPackage& aPackage )  
   161     {
   166     {
   162 TFLOGSTRING3( "TSY: CMmPacketContextTsy::ExtFunc. IPC: %d Context name:%S", aIpc, &iContextName );
   167 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_EXTFUNC_1,  "TSY: CMmPacketContextTsy::ExtFunc. IPC: %d Context name:%S", aIpc, iContextName );
   163 
   168 
   164     TInt ret( KErrNone );
   169     TInt ret( KErrNone );
   165     TInt trapError( KErrNone );
   170     TInt trapError( KErrNone );
   166 
   171 
   167 #ifdef ADD_REMOVE_PACKETFILTER_DEFECT_FIXED  // search for this up from bottom of file
   172 #ifdef ADD_REMOVE_PACKETFILTER_DEFECT_FIXED  // search for this up from bottom of file
   215 TInt CMmPacketContextTsy::DoExtFuncL( 
   220 TInt CMmPacketContextTsy::DoExtFuncL( 
   216         const TTsyReqHandle aTsyReqHandle,      
   221         const TTsyReqHandle aTsyReqHandle,      
   217         const TInt aIpc,      
   222         const TInt aIpc,      
   218         const TDataPackage& aPackage )   
   223         const TDataPackage& aPackage )   
   219     {
   224     {
   220 TFLOGSTRING3( "TSY: CMmPacketContextTsy::DoExtFuncL. IPC: %d Handle:%d",
   225 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_DOEXTFUNCL_1,  "TSY: CMmPacketContextTsy::DoExtFuncL. IPC: %d Handle:%d",aIpc, aTsyReqHandle );
   221                 aIpc, aTsyReqHandle );
       
   222 
   226 
   223     TInt ret( KErrNotSupported );
   227     TInt ret( KErrNotSupported );
   224 
   228 
   225     TAny* dataPtr = aPackage.Ptr1();
   229     TAny* dataPtr = aPackage.Ptr1();
   226     TAny* dataPtr2 = aPackage.Ptr2();
   230     TAny* dataPtr2 = aPackage.Ptr2();
   382 // ---------------------------------------------------------------------------
   386 // ---------------------------------------------------------------------------
   383 //
   387 //
   384 CTelObject::TReqMode CMmPacketContextTsy::ReqModeL( 
   388 CTelObject::TReqMode CMmPacketContextTsy::ReqModeL( 
   385         const TInt aIpc ) 
   389         const TInt aIpc ) 
   386     {
   390     {
   387 TFLOGSTRING2( "TSY: CMmPacketContextTsy::ReqModeL. IPC: %d", aIpc );
   391 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_REQMODEL_1,  "TSY: CMmPacketContextTsy::ReqModeL. IPC: %d", aIpc );
   388 
   392 
   389     CTelObject::TReqMode reqMode( 0 );
   393     CTelObject::TReqMode reqMode( 0 );
   390     TBool doLeave( EFalse );
   394     TBool doLeave( EFalse );
   391 
   395 
   392     switch ( aIpc )
   396     switch ( aIpc )
   525             // Unknown or invalid IPC
   529             // Unknown or invalid IPC
   526             User::Leave( KErrNotSupported );
   530             User::Leave( KErrNotSupported );
   527             break;
   531             break;
   528 
   532 
   529         }  
   533         }  
   530 TFLOGSTRING3( "TSY: CMmPacketContextTsy::NumberOfSlotsL. IPC: %d Number of slots: %d",
   534 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_NUMBEROFSLOTSL_1,  "TSY: CMmPacketContextTsy::NumberOfSlotsL. IPC: %d Number of slots: %d",aIpc, numberOfSlots );
   531                 aIpc, numberOfSlots );
       
   532 
   535 
   533     return numberOfSlots;
   536     return numberOfSlots;
   534 
   537 
   535     }
   538     }
   536 
   539 
   548 //
   551 //
   549 TInt CMmPacketContextTsy::CancelService(    
   552 TInt CMmPacketContextTsy::CancelService(    
   550         const TInt aIpc,                            
   553         const TInt aIpc,                            
   551         const TTsyReqHandle aTsyReqHandle )         
   554         const TTsyReqHandle aTsyReqHandle )         
   552     {
   555     {
   553 TFLOGSTRING3( "TSY: CMmPacketContextTsy::CancelService. IPC: %d Handle:%d",
   556 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_CANCELSERVICE_1,  "TSY: CMmPacketContextTsy::CancelService. IPC: %d Handle:%d",aIpc, aTsyReqHandle );
   554                 aIpc, aTsyReqHandle );
       
   555 
   557 
   556     TInt ret( KErrNone );
   558     TInt ret( KErrNone );
   557 	TTsyReqHandle reqHandle( NULL );
   559 	TTsyReqHandle reqHandle( NULL );
   558 
   560 
   559 #ifdef ADD_REMOVE_PACKETFILTER_DEFECT_FIXED  // search for this up from bottom of file
   561 #ifdef ADD_REMOVE_PACKETFILTER_DEFECT_FIXED  // search for this up from bottom of file
   673 // ---------------------------------------------------------------------------
   675 // ---------------------------------------------------------------------------
   674 //
   676 //
   675 TInt CMmPacketContextTsy::RegisterNotification( 
   677 TInt CMmPacketContextTsy::RegisterNotification( 
   676         const TInt aIpc )              
   678         const TInt aIpc )              
   677     {
   679     {
   678 TFLOGSTRING2( "TSY: CMmPacketContextTsy::RegisterNotification. IPC: %d", aIpc );
   680 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_REGISTERNOTIFICATION_1,  "TSY: CMmPacketContextTsy::RegisterNotification. IPC: %d", aIpc );
   679 
   681 
   680     TInt ret( KErrNone );
   682     TInt ret( KErrNone );
   681 
   683 
   682     switch ( aIpc )
   684     switch ( aIpc )
   683         {
   685         {
   715 // ---------------------------------------------------------------------------
   717 // ---------------------------------------------------------------------------
   716 //
   718 //
   717 TInt CMmPacketContextTsy::DeregisterNotification(
   719 TInt CMmPacketContextTsy::DeregisterNotification(
   718         const TInt aIpc )                          
   720         const TInt aIpc )                          
   719     {
   721     {
   720 TFLOGSTRING2( "TSY: CMmPacketContextTsy::DeregisterNotification. IPC: %d", aIpc );
   722 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_DEREGISTERNOTIFICATION_1,  "TSY: CMmPacketContextTsy::DeregisterNotification. IPC: %d", aIpc );
   721 
   723 
   722     TInt ret( KErrNone );
   724     TInt ret( KErrNone );
   723 
   725 
   724     switch ( aIpc )
   726     switch ( aIpc )
   725         {
   727         {
   752 // ---------------------------------------------------------------------------
   754 // ---------------------------------------------------------------------------
   753 //
   755 //
   754 CTelObject* CMmPacketContextTsy::OpenNewObjectL(    
   756 CTelObject* CMmPacketContextTsy::OpenNewObjectL(    
   755         TDes& aNewName )                          
   757         TDes& aNewName )                          
   756     {
   758     {
   757 TFLOGSTRING( "TSY: CMmPacketContextTsy::OpenNewObjectL." );
   759 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_OPENNEWOBJECTL_1,  "TSY: CMmPacketContextTsy::OpenNewObjectL." );
   758 
   760 
   759     // Each context can have only one QoS
   761     // Each context can have only one QoS
   760     if ( NULL != iQoSProfile )
   762     if ( NULL != iQoSProfile )
   761         {
   763         {
   762 TFLOGSTRING2( "TSY: CMmPacketContextTsy::OpenNewObjectL. Leaves with: %d", KErrAlreadyExists );
   764 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_OPENNEWOBJECTL_2,  "TSY: CMmPacketContextTsy::OpenNewObjectL. Leaves with: %d", KErrAlreadyExists );
   763         User::Leave( KErrAlreadyExists );
   765         User::Leave( KErrAlreadyExists );
   764         }
   766         }
   765     
   767     
   766     else
   768     else
   767         {
   769         {
   769         iQoSProfile = CMmPacketQoSTsy::NewL( iMmPacketService, this );
   771         iQoSProfile = CMmPacketQoSTsy::NewL( iMmPacketService, this );
   770 
   772 
   771         iQoSProfileName.Copy( iContextName );
   773         iQoSProfileName.Copy( iContextName );
   772         aNewName.Copy( iQoSProfileName );
   774         aNewName.Copy( iQoSProfileName );
   773         }
   775         }
   774 TFLOGSTRING2( "TSY: CMmPacketContextTsy::OpenNewObjectL. aNewName: %S", &aNewName );
   776 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_OPENNEWOBJECTL_3,  "TSY: CMmPacketContextTsy::OpenNewObjectL. aNewName: %S", aNewName );
   775 
   777 
   776     return iQoSProfile;
   778     return iQoSProfile;
   777     }
   779     }
   778 
   780 
   779 // ---------------------------------------------------------------------------
   781 // ---------------------------------------------------------------------------
   785 // ---------------------------------------------------------------------------
   787 // ---------------------------------------------------------------------------
   786 //
   788 //
   787 CTelObject* CMmPacketContextTsy::OpenNewObjectByNameL(    
   789 CTelObject* CMmPacketContextTsy::OpenNewObjectByNameL(    
   788         const TDesC& aName )                     
   790         const TDesC& aName )                     
   789     {
   791     {
   790 TFLOGSTRING2( "TSY: CMmPacketContextTsy::OpenNewObjectByNameL. aName: %S", &aName );
   792 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_OPENNEWOBJECTBYNAMEL_1,  "TSY: CMmPacketContextTsy::OpenNewObjectByNameL. aName: %S", aName );
   791 
   793 
   792     if ( aName != iQoSProfileName )
   794     if ( aName != iQoSProfileName )
   793         {
   795         {
   794 TFLOGSTRING2( "TSY: CMmPacketContextTsy::OpenNewObjectByNameL. Leaves with: %d", KErrNotFound );
   796 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_OPENNEWOBJECTBYNAMEL_2,  "TSY: CMmPacketContextTsy::OpenNewObjectByNameL. Leaves with: %d", KErrNotFound );
   795         User::Leave( KErrNotFound );
   797         User::Leave( KErrNotFound );
   796         }
   798         }
   797 
   799 
   798     return iQoSProfile;
   800     return iQoSProfile;
   799     }
   801     }
   804 // (other items were commented in a header).
   806 // (other items were commented in a header).
   805 // ---------------------------------------------------------------------------
   807 // ---------------------------------------------------------------------------
   806 //
   808 //
   807 TInt CMmPacketContextTsy::InitialiseContextL(RPacketContext::TDataChannelV2* aDataChannel )
   809 TInt CMmPacketContextTsy::InitialiseContextL(RPacketContext::TDataChannelV2* aDataChannel )
   808     {
   810     {
   809 TFLOGSTRING( "TSY: CMmPacketContextTsy::InitialiseContextL." );
   811 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_INITIALISECONTEXTL_1,  "TSY: CMmPacketContextTsy::InitialiseContextL." );
   810 
   812 
   811     TInt ret( KErrNone );
   813     TInt ret( KErrNone );
   812 
   814 
   813     // Initialise Context
   815     // Initialise Context
   814     ret = iMmPacketContextGsmWcdmaExt->InitialiseContextL(aDataChannel);
   816     ret = iMmPacketContextGsmWcdmaExt->InitialiseContextL(aDataChannel);
   828 // (other items were commented in a header).
   830 // (other items were commented in a header).
   829 // ---------------------------------------------------------------------------
   831 // ---------------------------------------------------------------------------
   830 //
   832 //
   831 void CMmPacketContextTsy::CompleteInitialiseContext(const TInt aResult )     
   833 void CMmPacketContextTsy::CompleteInitialiseContext(const TInt aResult )     
   832     {
   834     {
   833 TFLOGSTRING2( "TSY: CMmPacketContextTsy::CompleteInitialiseContext. Error: %d", aResult );
   835 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETEINITIALISECONTEXT_1,  "TSY: CMmPacketContextTsy::CompleteInitialiseContext. Error: %d", aResult );
   834 
   836 
   835     // Reset the req handle. Returns the deleted req handle
   837     // Reset the req handle. Returns the deleted req handle
   836     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
   838     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
   837         EMultimodePacketContextInitialiseContext );
   839         EMultimodePacketContextInitialiseContext );
   838 
   840 
   855 // (other items were commented in a header).
   857 // (other items were commented in a header).
   856 // ---------------------------------------------------------------------------
   858 // ---------------------------------------------------------------------------
   857 //
   859 //
   858 TInt CMmPacketContextTsy::ActivateL()
   860 TInt CMmPacketContextTsy::ActivateL()
   859     {
   861     {
   860 TFLOGSTRING2( "TSY: CMmPacketContextTsy::ActivateL. Context name:%S", &iContextName );
   862 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_ACTIVATEL_1,  "TSY: CMmPacketContextTsy::ActivateL. Context name:%S", iContextName );
   861 
   863 
   862     TInt ret( KErrGprsServicesNotAllowed );
   864     TInt ret( KErrGprsServicesNotAllowed );
   863 
   865 
   864     if ( iMmPacketService->IsActivationAllowed() )
   866     if ( iMmPacketService->IsActivationAllowed() )
   865         {
   867         {
   883 // ---------------------------------------------------------------------------
   885 // ---------------------------------------------------------------------------
   884 //
   886 //
   885 void CMmPacketContextTsy::CompleteActivate( 
   887 void CMmPacketContextTsy::CompleteActivate( 
   886         const TInt aResult )
   888         const TInt aResult )
   887     {
   889     {
   888 TFLOGSTRING2( "TSY: CMmPacketContextTsy::CompleteActivate. Error: %d", aResult );
   890 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETEACTIVATE_1,  "TSY: CMmPacketContextTsy::CompleteActivate. Error: %d", aResult );
   889     // Reset the req handle. Returns the deleted req handle
   891     // Reset the req handle. Returns the deleted req handle
   890     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
   892     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
   891         EMultimodePacketContextActivate );
   893         EMultimodePacketContextActivate );
   892 
   894 
   893     if ( EMultimodePacketContextReqHandleUnknown != reqHandle )
   895     if ( EMultimodePacketContextReqHandleUnknown != reqHandle )
   904 // (other items were commented in a header).
   906 // (other items were commented in a header).
   905 // ---------------------------------------------------------------------------
   907 // ---------------------------------------------------------------------------
   906 //
   908 //
   907 TInt CMmPacketContextTsy::DeactivateL()
   909 TInt CMmPacketContextTsy::DeactivateL()
   908     {
   910     {
   909 TFLOGSTRING2( "TSY: CMmPacketContextTsy::DeactivateL. Context name:%S", &iContextName );
   911 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_DEACTIVATEL_1,  "TSY: CMmPacketContextTsy::DeactivateL. Context name:%S", iContextName );
   910     TInt ret( KErrNone );
   912     TInt ret( KErrNone );
   911 
   913 
   912     // Call Deactivate
   914     // Call Deactivate
   913     ret = iMmPacketContextGsmWcdmaExt->DeactivateL();
   915     ret = iMmPacketContextGsmWcdmaExt->DeactivateL();
   914 
   916 
   928 // ---------------------------------------------------------------------------
   930 // ---------------------------------------------------------------------------
   929 //
   931 //
   930 void CMmPacketContextTsy::CompleteDeactivate( 
   932 void CMmPacketContextTsy::CompleteDeactivate( 
   931         const TInt aResult )    
   933         const TInt aResult )    
   932     {
   934     {
   933 TFLOGSTRING2( "TSY: CMmPacketContextTsy::CompleteDeactivate. Error: %d", aResult );
   935 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETEDEACTIVATE_1,  "TSY: CMmPacketContextTsy::CompleteDeactivate. Error: %d", aResult );
   934     // Reset the req handle. Returns the deleted req handle
   936     // Reset the req handle. Returns the deleted req handle
   935     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
   937     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
   936         EMultimodePacketContextDeactivate );
   938         EMultimodePacketContextDeactivate );
   937 
   939 
   938     if ( EMultimodePacketContextReqHandleUnknown != reqHandle )
   940     if ( EMultimodePacketContextReqHandleUnknown != reqHandle )
   952 // (other items were commented in a header).
   954 // (other items were commented in a header).
   953 // ---------------------------------------------------------------------------
   955 // ---------------------------------------------------------------------------
   954 //
   956 //
   955 TInt CMmPacketContextTsy::DeleteL()
   957 TInt CMmPacketContextTsy::DeleteL()
   956     {
   958     {
   957 TFLOGSTRING2( "TSY: CMmPacketContextTsy::DeleteL. Context name:%S", &iContextName );
   959 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_DELETEL_1,  "TSY: CMmPacketContextTsy::DeleteL. Context name:%S", iContextName );
   958 
   960 
   959     TInt ret( KErrNone );
   961     TInt ret( KErrNone );
   960 
   962 
   961     // Call DeleteL
   963     // Call DeleteL
   962     ret = iMmPacketContextGsmWcdmaExt->DeleteL();
   964     ret = iMmPacketContextGsmWcdmaExt->DeleteL();
   977 // ---------------------------------------------------------------------------
   979 // ---------------------------------------------------------------------------
   978 //
   980 //
   979 void CMmPacketContextTsy::CompleteDelete( 
   981 void CMmPacketContextTsy::CompleteDelete( 
   980         const TInt aResult )        
   982         const TInt aResult )        
   981     {
   983     {
   982 TFLOGSTRING2( "TSY: CMmPacketContextTsy::CompleteDelete. Error: %d", aResult );
   984 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETEDELETE_1,  "TSY: CMmPacketContextTsy::CompleteDelete. Error: %d", aResult );
   983     // Reset the req handle. Returns the deleted req handle
   985     // Reset the req handle. Returns the deleted req handle
   984     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
   986     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
   985         EMultimodePacketContextDelete );
   987         EMultimodePacketContextDelete );
   986 
   988 
   987     if ( EMultimodePacketContextReqHandleUnknown != reqHandle )
   989     if ( EMultimodePacketContextReqHandleUnknown != reqHandle )
   999 //
  1001 //
  1000 TInt CMmPacketContextTsy::GetConfig(
  1002 TInt CMmPacketContextTsy::GetConfig(
  1001         const TTsyReqHandle aTsyReqHandle,    
  1003         const TTsyReqHandle aTsyReqHandle,    
  1002         TPacketDataConfigBase* const aConfig )  
  1004         TPacketDataConfigBase* const aConfig )  
  1003     {
  1005     {
  1004 TFLOGSTRING2( "TSY: CMmPacketContextTsy::GetConfig. Context name:%S", &iContextName );
  1006 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_GETCONFIG_1,  "TSY: CMmPacketContextTsy::GetConfig. Context name:%S", iContextName );
  1005 
  1007 
  1006     // Get config
  1008     // Get config
  1007     TInt ret = iMmPacketContextGsmWcdmaExt->GetConfig( aConfig );
  1009     TInt ret = iMmPacketContextGsmWcdmaExt->GetConfig( aConfig );
  1008 
  1010 
  1009     // Complete Request
  1011     // Complete Request
  1020 //
  1022 //
  1021 TInt CMmPacketContextTsy::GetConnectionSpeed(
  1023 TInt CMmPacketContextTsy::GetConnectionSpeed(
  1022         const TTsyReqHandle aTsyReqHandle,         
  1024         const TTsyReqHandle aTsyReqHandle,         
  1023         TUint* const aRate ) 
  1025         TUint* const aRate ) 
  1024     {
  1026     {
  1025 TFLOGSTRING3( "TSY: CMmPacketContextTsy::GetConnectionSpeed. Context name: %S Connection Speed:%d bps",
  1027 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_GETCONNECTIONSPEED_1,  "TSY: CMmPacketContextTsy::GetConnectionSpeed. Context name: %S Connection Speed:%u bps",iContextName, iConnectionSpeed );
  1026              &iContextName, iConnectionSpeed );
       
  1027 
  1028 
  1028     // Get current connection speed rate
  1029     // Get current connection speed rate
  1029     *aRate = iConnectionSpeed;
  1030     *aRate = iConnectionSpeed;
  1030 
  1031 
  1031     // Complete Request
  1032     // Complete Request
  1042 //
  1043 //
  1043 TInt CMmPacketContextTsy::GetDataVolumeTransferredL(
  1044 TInt CMmPacketContextTsy::GetDataVolumeTransferredL(
  1044         const TTsyReqHandle aTsyReqHandle,   
  1045         const TTsyReqHandle aTsyReqHandle,   
  1045         RPacketContext::TDataVolume* const aVolume ) 
  1046         RPacketContext::TDataVolume* const aVolume ) 
  1046     {
  1047     {
  1047 TFLOGSTRING2( "TSY: CMmPacketContextTsy::GetDataVolumeTransferredL. Context name:%S", &iContextName );
  1048 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_GETDATAVOLUMETRANSFERREDL_1,  "TSY: CMmPacketContextTsy::GetDataVolumeTransferredL. Context name:%S", iContextName );
  1048 
  1049 
  1049     TInt ret( KErrNone );
  1050     TInt ret( KErrNone );
  1050 
  1051 
  1051     if ( RPacketContext::EStatusDeleted != iContextStatus )
  1052     if ( RPacketContext::EStatusDeleted != iContextStatus )
  1052         {
  1053         {
  1079 // ---------------------------------------------------------------------------
  1080 // ---------------------------------------------------------------------------
  1080 //
  1081 //
  1081 void CMmPacketContextTsy::CompleteGetDataVolumeTransferred( 
  1082 void CMmPacketContextTsy::CompleteGetDataVolumeTransferred( 
  1082         const TInt aResult )  
  1083         const TInt aResult )  
  1083     {
  1084     {
  1084 TFLOGSTRING2( "TSY: CMmPacketContextTsy::CompleteGetDataVolumeTransferred. Error: %d", aResult );
  1085 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETEGETDATAVOLUMETRANSFERRED_1,  "TSY: CMmPacketContextTsy::CompleteGetDataVolumeTransferred. Error: %d", aResult );
  1085 
  1086 
  1086     // Reset the req handle. Returns the deleted req handle
  1087     // Reset the req handle. Returns the deleted req handle
  1087     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  1088     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  1088         EMultimodePacketContextGetDataVolumeTransferred );
  1089         EMultimodePacketContextGetDataVolumeTransferred );
  1089 
  1090 
  1112 //
  1113 //
  1113 TInt CMmPacketContextTsy::GetLastErrorCause(
  1114 TInt CMmPacketContextTsy::GetLastErrorCause(
  1114         const TTsyReqHandle aTsyReqHandle,  
  1115         const TTsyReqHandle aTsyReqHandle,  
  1115         TInt* const aError )    
  1116         TInt* const aError )    
  1116     {
  1117     {
  1117 TFLOGSTRING3( "TSY: CMmPacketContextTsy::GetLastErrorCause. Context name:%S Last error cause: %d",
  1118 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_GETLASTERRORCAUSE_1,  "TSY: CMmPacketContextTsy::GetLastErrorCause. Context name:%S Last error cause: %d",iContextName, iLastErrorCause );
  1118              &iContextName, iLastErrorCause );
       
  1119 
  1119 
  1120     *aError = iLastErrorCause;
  1120     *aError = iLastErrorCause;
  1121     CMmPacketContextTsy::ReqCompleted( aTsyReqHandle, KErrNone );
  1121     CMmPacketContextTsy::ReqCompleted( aTsyReqHandle, KErrNone );
  1122 
  1122 
  1123     return KErrNone;
  1123     return KErrNone;
  1143         {
  1143         {
  1144         // QoS profile not found
  1144         // QoS profile not found
  1145         aQoSProfile->Zero();
  1145         aQoSProfile->Zero();
  1146         }
  1146         }
  1147 
  1147 
  1148 TFLOGSTRING3( "TSY: CMmPacketContextTsy::GetProfileName. Context name: %S QoS Profile Name: %S",
  1148 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_GETPROFILENAME_1,  "TSY: CMmPacketContextTsy::GetProfileName. Context name: %S QoS Profile Name: %S",iContextName, *aQoSProfile );
  1149              &iContextName, aQoSProfile );
       
  1150 
  1149 
  1151     CMmPacketContextTsy::ReqCompleted( aTsyReqHandle, KErrNone );
  1150     CMmPacketContextTsy::ReqCompleted( aTsyReqHandle, KErrNone );
  1152     return KErrNone;
  1151     return KErrNone;
  1153     }
  1152     }
  1154 
  1153 
  1160 //
  1159 //
  1161 TInt CMmPacketContextTsy::GetStatus(
  1160 TInt CMmPacketContextTsy::GetStatus(
  1162         const TTsyReqHandle aTsyReqHandle,   
  1161         const TTsyReqHandle aTsyReqHandle,   
  1163         RPacketContext::TContextStatus* const aContextStatus )
  1162         RPacketContext::TContextStatus* const aContextStatus )
  1164     {
  1163     {
  1165 TFLOGSTRING3( "TSY: CMmPacketContextTsy::GetStatus. Context name: %S Context Status:%d",
  1164 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_GETSTATUS_1,  "TSY: CMmPacketContextTsy::GetStatus. Context name: %S Context Status:%d",iContextName, iContextStatus );
  1166              &iContextName, iContextStatus );
       
  1167     *aContextStatus = iContextStatus;
  1165     *aContextStatus = iContextStatus;
  1168     CMmPacketContextTsy::ReqCompleted( aTsyReqHandle, KErrNone );
  1166     CMmPacketContextTsy::ReqCompleted( aTsyReqHandle, KErrNone );
  1169 
  1167 
  1170     return KErrNone;
  1168     return KErrNone;
  1171     }
  1169     }
  1177 // ---------------------------------------------------------------------------
  1175 // ---------------------------------------------------------------------------
  1178 //
  1176 //
  1179 TInt CMmPacketContextTsy::NotifyConfigChanged(
  1177 TInt CMmPacketContextTsy::NotifyConfigChanged(
  1180         TPacketDataConfigBase* const aConfig )  
  1178         TPacketDataConfigBase* const aConfig )  
  1181     {
  1179     {
  1182 TFLOGSTRING( "TSY: CMmPacketContextTsy::NotifyConfigChanged." );
  1180 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_NOTIFYCONFIGCHANGED_1,  "TSY: CMmPacketContextTsy::NotifyConfigChanged." );
  1183 
  1181 
  1184     // Call NotifyConfigChanged from extension
  1182     // Call NotifyConfigChanged from extension
  1185     TInt ret = iMmPacketContextGsmWcdmaExt->NotifyConfigChanged( *aConfig );
  1183     TInt ret = iMmPacketContextGsmWcdmaExt->NotifyConfigChanged( *aConfig );
  1186 
  1184 
  1187     if ( KErrNone == ret )
  1185     if ( KErrNone == ret )
  1212 // (other items were commented in a header).
  1210 // (other items were commented in a header).
  1213 // ---------------------------------------------------------------------------
  1211 // ---------------------------------------------------------------------------
  1214 //
  1212 //
  1215 void CMmPacketContextTsy::CompleteNotifyConfigChanged()
  1213 void CMmPacketContextTsy::CompleteNotifyConfigChanged()
  1216     {
  1214     {
  1217 TFLOGSTRING2( "TSY: CMmPacketContextTsy::CompleteNotifyConfigChanged.  Context name:%S",
  1215 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETENOTIFYCONFIGCHANGED_1,  "TSY: CMmPacketContextTsy::CompleteNotifyConfigChanged.  Context name:%S",iContextName );
  1218                 &iContextName );
       
  1219 
  1216 
  1220     // Get and reset req handle for R97/98 config notify
  1217     // Get and reset req handle for R97/98 config notify
  1221     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  1218     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  1222         EMultimodePacketContextNotifyConfigChanged );
  1219         EMultimodePacketContextNotifyConfigChanged );
  1223 
  1220 
  1253 // ---------------------------------------------------------------------------
  1250 // ---------------------------------------------------------------------------
  1254 //
  1251 //
  1255 TInt CMmPacketContextTsy::NotifyConnectionSpeedChange(
  1252 TInt CMmPacketContextTsy::NotifyConnectionSpeedChange(
  1256         TUint* const aRate )    
  1253         TUint* const aRate )    
  1257     {
  1254     {
  1258 TFLOGSTRING( "TSY: CMmPacketContextTsy::NotifyConnectionSpeedChange." );
  1255 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_NOTIFYCONNECTIONSPEEDCHANGE_1,  "TSY: CMmPacketContextTsy::NotifyConnectionSpeedChange." );
  1259 
  1256 
  1260     // Store pointer
  1257     // Store pointer
  1261     iRetNotifyConnectionSpeed = aRate;
  1258     iRetNotifyConnectionSpeed = aRate;
  1262     // Store req handle type
  1259     // Store req handle type
  1263     iReqHandleType = EMultimodePacketContextNotifyConnectionSpeedChange;
  1260     iReqHandleType = EMultimodePacketContextNotifyConnectionSpeedChange;
  1276     {
  1273     {
  1277     iConnectionSpeed = aConnectionSpeed;
  1274     iConnectionSpeed = aConnectionSpeed;
  1278     
  1275     
  1279     if ( iNotifyConnectionSpeed != iConnectionSpeed )
  1276     if ( iNotifyConnectionSpeed != iConnectionSpeed )
  1280         {
  1277         {
  1281 TFLOGSTRING3( "TSY: CMmPacketContextTsy::CompleteNotifyConnectionSpeedChange. Context name:%S Connection Speed:%d bps",
  1278 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETENOTIFYCONNECTIONSPEEDCHANGE_1,  "TSY: CMmPacketContextTsy::CompleteNotifyConnectionSpeedChange. Context name:%S Connection Speed:%u bps",iContextName, iConnectionSpeed );
  1282             &iContextName, iConnectionSpeed );
       
  1283 
  1279 
  1284         // Store the connection speed internally
  1280         // Store the connection speed internally
  1285         iNotifyConnectionSpeed = iConnectionSpeed;
  1281         iNotifyConnectionSpeed = iConnectionSpeed;
  1286 
  1282 
  1287         // Get and reset req handle
  1283         // Get and reset req handle
  1307 // ---------------------------------------------------------------------------
  1303 // ---------------------------------------------------------------------------
  1308 //
  1304 //
  1309 TInt CMmPacketContextTsy::NotifyStatusChange(
  1305 TInt CMmPacketContextTsy::NotifyStatusChange(
  1310         RPacketContext::TContextStatus* const aContextStatus )
  1306         RPacketContext::TContextStatus* const aContextStatus )
  1311     {
  1307     {
  1312 TFLOGSTRING2( "TSY: CMmPacketContextTsy::NotifyStatusChange. Context name:%S", &iContextName );
  1308 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_NOTIFYSTATUSCHANGE_1,  "TSY: CMmPacketContextTsy::NotifyStatusChange. Context name:%S", iContextName );
  1313     iRetNotifyStatus = aContextStatus;
  1309     iRetNotifyStatus = aContextStatus;
  1314     iReqHandleType = EMultimodePacketContextNotifyStatusChange;
  1310     iReqHandleType = EMultimodePacketContextNotifyStatusChange;
  1315 
  1311 
  1316     return KErrNone;
  1312     return KErrNone;
  1317     }
  1313     }
  1327     {
  1323     {
  1328 
  1324 
  1329     if ( aContextStatus != iContextStatus )
  1325     if ( aContextStatus != iContextStatus )
  1330         {
  1326         {
  1331         iContextStatus = aContextStatus;
  1327         iContextStatus = aContextStatus;
  1332 TFLOGSTRING3( "TSY: CMmPacketContextTsy::CompleteNotifyStatusChange. Context name: %S  Context status:%d",
  1328 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETENOTIFYSTATUSCHANGE_1,  "TSY: CMmPacketContextTsy::CompleteNotifyStatusChange. Context name: %S  Context status:%d",iContextName, iContextStatus );
  1333                     &iContextName, iContextStatus );
       
  1334 
  1329 
  1335         if ( RPacketContext::EStatusActive == iContextStatus ||
  1330         if ( RPacketContext::EStatusActive == iContextStatus ||
  1336              RPacketContext::EStatusInactive == iContextStatus ||
  1331              RPacketContext::EStatusInactive == iContextStatus ||
  1337              RPacketContext::EStatusDeleted == iContextStatus )
  1332              RPacketContext::EStatusDeleted == iContextStatus )
  1338             {
  1333             {
  1367 // ---------------------------------------------------------------------------
  1362 // ---------------------------------------------------------------------------
  1368 //
  1363 //
  1369 TInt CMmPacketContextTsy::SetConfigL(
  1364 TInt CMmPacketContextTsy::SetConfigL(
  1370         TPacketDataConfigBase* const aConfig ) 
  1365         TPacketDataConfigBase* const aConfig ) 
  1371     {
  1366     {
  1372 TFLOGSTRING2( "TSY: CMmPacketContextTsy::SetConfigL. Context name:%S", &iContextName );
  1367 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_SETCONFIGL_1,  "TSY: CMmPacketContextTsy::SetConfigL. Context name:%S", iContextName );
  1373 
  1368 
  1374     // Call SetConfigL
  1369     // Call SetConfigL
  1375     TInt ret = iMmPacketContextGsmWcdmaExt->SetConfigL( aConfig );
  1370     TInt ret = iMmPacketContextGsmWcdmaExt->SetConfigL( aConfig );
  1376 
  1371 
  1377     if ( KErrNone == ret )
  1372     if ( KErrNone == ret )
  1391 //
  1386 //
  1392 void CMmPacketContextTsy::CompleteSetConfig( 
  1387 void CMmPacketContextTsy::CompleteSetConfig( 
  1393         const TInt aError,   
  1388         const TInt aError,   
  1394         TBool aIsAddMediaAuthorizationCalled )
  1389         TBool aIsAddMediaAuthorizationCalled )
  1395     {
  1390     {
  1396 TFLOGSTRING2( "TSY: CMmPacketContextTsy::CompleteSetConfig. Error: %d", aError );
  1391 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETESETCONFIG_1,  "TSY: CMmPacketContextTsy::CompleteSetConfig. Error: %d", aError );
  1397     
  1392     
  1398     TTsyReqHandle reqHandle( EMultimodePacketContextReqHandleUnknown );
  1393     TTsyReqHandle reqHandle( EMultimodePacketContextReqHandleUnknown );
  1399     //if context exists eg. its name length is bigger than zero
  1394     //if context exists eg. its name length is bigger than zero
  1400     if( 0 == CMmPacketContextTsy::HostCID().Length() )
  1395     if( 0 == CMmPacketContextTsy::HostCID().Length() )
  1401         {
  1396         {
  1480 void CMmPacketContextTsy::SetDataVolume(
  1475 void CMmPacketContextTsy::SetDataVolume(
  1481         const TInt /* aResult */,
  1476         const TInt /* aResult */,
  1482         RPacketContext::TDataVolume dataVolume )
  1477         RPacketContext::TDataVolume dataVolume )
  1483     {
  1478     {
  1484 
  1479 
  1485 TFLOGSTRING( "TSY: CMmPacketContextTsy::SetDataVolume" );
  1480 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_SETDATAVOLUME_1,  "TSY: CMmPacketContextTsy::SetDataVolume" );
  1486    
  1481    
  1487     if ( dataVolume.iBytesSent < iDataVolume.iBytesSent )
  1482     if ( dataVolume.iBytesSent < iDataVolume.iBytesSent )
  1488         {
  1483         {
  1489         // The value of sent data has turned around the 4 GB
  1484         // The value of sent data has turned around the 4 GB
  1490         iDataVolume.iOverflowCounterSent++;
  1485         iDataVolume.iOverflowCounterSent++;
  1514      	RPacketContext::EStatusDeactivating == iContextStatus   )
  1509      	RPacketContext::EStatusDeactivating == iContextStatus   )
  1515         {
  1510         {
  1516         iLastErrorCause =  aErrorCause;           
  1511         iLastErrorCause =  aErrorCause;           
  1517         }
  1512         }
  1518 
  1513 
  1519 TFLOGSTRING3( "TSY: CMmPacketContextTsy::SetLastErrorCause.  aErrorCause: %d iLastErrorCause:%d", 
  1514 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_SETLASTERRORCAUSE_1,  "TSY: CMmPacketContextTsy::SetLastErrorCause.  aErrorCause: %d iLastErrorCause:%d", aErrorCause, iLastErrorCause );
  1520              aErrorCause, iLastErrorCause );
       
  1521 
  1515 
  1522     }
  1516     }
  1523 
  1517 
  1524 // ---------------------------------------------------------------------------
  1518 // ---------------------------------------------------------------------------
  1525 // CMmPacketContextTsy::ContextStatus
  1519 // CMmPacketContextTsy::ContextStatus
  1538 // (other items were commented in a header).
  1532 // (other items were commented in a header).
  1539 // ---------------------------------------------------------------------------
  1533 // ---------------------------------------------------------------------------
  1540 //
  1534 //
  1541 void CMmPacketContextTsy::ContextSuspended()
  1535 void CMmPacketContextTsy::ContextSuspended()
  1542     {
  1536     {
  1543 TFLOGSTRING2( "TSY: CMmPacketContextTsy::ContextSuspended. Context status before suspending: %d",
  1537 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_CONTEXTSUSPENDED_1,  "TSY: CMmPacketContextTsy::ContextSuspended. Context status before suspending: %d",iContextStatus );
  1544                 iContextStatus );
       
  1545 
  1538 
  1546     if ( ( RPacketContext::EStatusActivating == iContextStatus ) ||
  1539     if ( ( RPacketContext::EStatusActivating == iContextStatus ) ||
  1547          ( RPacketContext::EStatusActive == iContextStatus ) ||
  1540          ( RPacketContext::EStatusActive == iContextStatus ) ||
  1548          ( RPacketContext::EStatusDeactivating == iContextStatus ) )
  1541          ( RPacketContext::EStatusDeactivating == iContextStatus ) )
  1549         {
  1542         {
  1567 									iContextStatusBeforeSuspending );
  1560 									iContextStatusBeforeSuspending );
  1568         }
  1561         }
  1569 
  1562 
  1570     iContextStatusBeforeSuspending = RPacketContext::EStatusUnknown;
  1563     iContextStatusBeforeSuspending = RPacketContext::EStatusUnknown;
  1571 
  1564 
  1572 TFLOGSTRING2( "TSY: CMmPacketContextTsy::ContextResumed. Context status when resumed: %d",
  1565 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_CONTEXTRESUMED_1,  "TSY: CMmPacketContextTsy::ContextResumed. Context status when resumed: %d",iContextStatus );
  1573                 iContextStatus );
       
  1574 
  1566 
  1575     }
  1567     }
  1576 
  1568 
  1577 // ---------------------------------------------------------------------------
  1569 // ---------------------------------------------------------------------------
  1578 // CMmPacketContextTsy::PacketContextGsmWcdmaExt
  1570 // CMmPacketContextTsy::PacketContextGsmWcdmaExt
  1602 // (other items were commented in a header).
  1594 // (other items were commented in a header).
  1603 // ---------------------------------------------------------------------------
  1595 // ---------------------------------------------------------------------------
  1604 //
  1596 //
  1605 void CMmPacketContextTsy::RemoveQoS()
  1597 void CMmPacketContextTsy::RemoveQoS()
  1606     {
  1598     {
  1607 TFLOGSTRING( "TSY: CMmPacketContextTsy::RemoveQoS." );
  1599 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_REMOVEQOS_1,  "TSY: CMmPacketContextTsy::RemoveQoS." );
  1608 
  1600 
  1609     iQoSProfile = NULL;
  1601     iQoSProfile = NULL;
  1610     iQoSProfileName.Zero();
  1602     iQoSProfileName.Zero();
  1611     }
  1603     }
  1612 
  1604 
  1618 //
  1610 //
  1619 void CMmPacketContextTsy::ReqCompleted(
  1611 void CMmPacketContextTsy::ReqCompleted(
  1620         const TTsyReqHandle aTsyReqHandle, 
  1612         const TTsyReqHandle aTsyReqHandle, 
  1621         const TInt aError )   
  1613         const TInt aError )   
  1622     {
  1614     {
  1623 TFLOGSTRING3( "TSY: CMmPacketContextTsy::ReqCompleted. Handle:%d Error:%d", 
  1615 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_REQCOMPLETED_1,  "TSY: CMmPacketContextTsy::ReqCompleted. Handle:%d Error:%d", aTsyReqHandle, aError );
  1624              aTsyReqHandle, aError );
       
  1625 
  1616 
  1626     // Set last error cause
  1617     // Set last error cause
  1627     if ( KErrNone != aError )
  1618     if ( KErrNone != aError )
  1628         {
  1619         {
  1629         iLastErrorCause = aError;
  1620         iLastErrorCause = aError;
  1785 // ---------------------------------------------------------------------------
  1776 // ---------------------------------------------------------------------------
  1786 //
  1777 //
  1787 void CMmPacketContextTsy::ResetDialUpContext()
  1778 void CMmPacketContextTsy::ResetDialUpContext()
  1788     {
  1779     {
  1789 
  1780 
  1790 TFLOGSTRING( "TSY: CMmPacketContextTsy::ResetDialUpContext." );
  1781 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_RESETDIALUPCONTEXT_1,  "TSY: CMmPacketContextTsy::ResetDialUpContext." );
  1791 
  1782 
  1792     iDataVolume.iOverflowCounterSent = 0;
  1783     iDataVolume.iOverflowCounterSent = 0;
  1793     iDataVolume.iBytesSent = 0;
  1784     iDataVolume.iBytesSent = 0;
  1794     iDataVolume.iOverflowCounterReceived = 0;
  1785     iDataVolume.iOverflowCounterReceived = 0;
  1795     iDataVolume.iBytesReceived = 0;
  1786     iDataVolume.iBytesReceived = 0;
  1821 //
  1812 //
  1822 TInt CMmPacketContextTsy::AddPacketFilterL(
  1813 TInt CMmPacketContextTsy::AddPacketFilterL(
  1823         const TTsyReqHandle aTsyReqHandle,  
  1814         const TTsyReqHandle aTsyReqHandle,  
  1824         TDes8* const aPacketFilter )  
  1815         TDes8* const aPacketFilter )  
  1825     {
  1816     {
  1826 TFLOGSTRING2( "TSY: CMmPacketContextTsy::AddPacketFilterL. Context name:%S", &iContextName );
  1817 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_ADDPACKETFILTERL_1,  "TSY: CMmPacketContextTsy::AddPacketFilterL. Context name:%S", iContextName );
  1827 
  1818 
  1828     TInt ret( KErrGeneral );
  1819     TInt ret( KErrGeneral );
  1829 
  1820 
  1830     if ( (0 < iHostCID.Length()) && (aPacketFilter->Length() > 0) )
  1821     if ( (0 < iHostCID.Length()) && (aPacketFilter->Length() > 0) )
  1831         {
  1822         {
  1863 #ifndef USING_CTSY_DISPATCHER 
  1854 #ifndef USING_CTSY_DISPATCHER 
  1864 TInt CMmPacketContextTsy::RemovePacketFilter(
  1855 TInt CMmPacketContextTsy::RemovePacketFilter(
  1865         const TTsyReqHandle aTsyReqHandle,  
  1856         const TTsyReqHandle aTsyReqHandle,  
  1866         TInt *aID ) 
  1857         TInt *aID ) 
  1867     {
  1858     {
  1868 TFLOGSTRING2( "TSY: CMmPacketContextTsy::RemovePacketFilter. RemovedFilter:%d", *aID );
  1859 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_REMOVEPACKETFILTER_1,  "TSY: CMmPacketContextTsy::RemovePacketFilter. RemovedFilter:%d", *aID );
  1869 
  1860 
  1870     TInt ret( KErrArgument );
  1861     TInt ret( KErrArgument );
  1871 
  1862 
  1872     // id must be value from 1 to 8
  1863     // id must be value from 1 to 8
  1873     if ( 0 < *aID && 8 >= *aID )
  1864     if ( 0 < *aID && 8 >= *aID )
  1888 // (other items were commented in a header).
  1879 // (other items were commented in a header).
  1889 // ---------------------------------------------------------------------------
  1880 // ---------------------------------------------------------------------------
  1890 //
  1881 //
  1891 TInt CMmPacketContextTsy::ModifyActiveContextL()
  1882 TInt CMmPacketContextTsy::ModifyActiveContextL()
  1892     {
  1883     {
  1893 TFLOGSTRING2( "TSY: CMmPacketContextTsy::ModifyActiveContextL. Context name:%S", &iContextName );
  1884 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_MODIFYACTIVECONTEXTL_1,  "TSY: CMmPacketContextTsy::ModifyActiveContextL. Context name:%S", iContextName );
  1894     
  1885     
  1895     TInt ret( KErrNotReady );
  1886     TInt ret( KErrNotReady );
  1896 
  1887 
  1897     if ( RPacketContext::EStatusUnknown != ContextStatus() &&
  1888     if ( RPacketContext::EStatusUnknown != ContextStatus() &&
  1898         RPacketContext::EStatusInactive != ContextStatus() &&
  1889         RPacketContext::EStatusInactive != ContextStatus() &&
  1917 // ---------------------------------------------------------------------------
  1908 // ---------------------------------------------------------------------------
  1918 //
  1909 //
  1919 void CMmPacketContextTsy::CompleteModifyActiveContext(
  1910 void CMmPacketContextTsy::CompleteModifyActiveContext(
  1920         const TInt aResult )
  1911         const TInt aResult )
  1921     {
  1912     {
  1922 TFLOGSTRING2( "TSY: CMmPacketContextTsy::CompleteModifyActiveContext. Context name:%S", &iContextName );
  1913 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETEMODIFYACTIVECONTEXT_1,  "TSY: CMmPacketContextTsy::CompleteModifyActiveContext. Context name:%S", iContextName );
  1923 
  1914 
  1924     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  1915     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle(
  1925            EMultimodePacketContextModifyActiveContext );
  1916            EMultimodePacketContextModifyActiveContext );
  1926 
  1917 
  1927     if ( EMultimodePacketContextReqHandleUnknown != reqHandle )
  1918     if ( EMultimodePacketContextReqHandleUnknown != reqHandle )
  2116 //
  2107 //
  2117 TInt CMmPacketContextTsy::GetConnectionInfo(
  2108 TInt CMmPacketContextTsy::GetConnectionInfo(
  2118         const TTsyReqHandle aTsyReqHandle,    
  2109         const TTsyReqHandle aTsyReqHandle,    
  2119         TConnectionInfoBase* const aInfo )  
  2110         TConnectionInfoBase* const aInfo )  
  2120     {
  2111     {
  2121 TFLOGSTRING2( "TSY: CMmPacketContextTsy::GetConnectionInfo. Context name:%S", &iContextName );
  2112 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_GETCONNECTIONINFO_1,  "TSY: CMmPacketContextTsy::GetConnectionInfo. Context name:%S", iContextName );
  2122 
  2113 
  2123     // Get config
  2114     // Get config
  2124     TInt ret = FillConnectionInfo( aInfo );
  2115     TInt ret = FillConnectionInfo( aInfo );
  2125 
  2116 
  2126     // Complete Request
  2117     // Complete Request
  2136 // ---------------------------------------------------------------------------
  2127 // ---------------------------------------------------------------------------
  2137 //
  2128 //
  2138 TInt CMmPacketContextTsy::NotifyConnectionInfoChange(
  2129 TInt CMmPacketContextTsy::NotifyConnectionInfoChange(
  2139         TConnectionInfoBase* const aInfo )    
  2130         TConnectionInfoBase* const aInfo )    
  2140     {
  2131     {
  2141 TFLOGSTRING( "TSY: CMmPacketContextTsy::NotifyConnectionInfoChange." );
  2132 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_NOTIFYCONNECTIONINFOCHANGE_1,  "TSY: CMmPacketContextTsy::NotifyConnectionInfoChange." );
  2142 
  2133 
  2143     // Store pointer
  2134     // Store pointer
  2144     iRetNotifyConnectionInfo = aInfo;
  2135     iRetNotifyConnectionInfo = aInfo;
  2145     // Store req handle type
  2136     // Store req handle type
  2146     iReqHandleType = EMultimodePacketContextNotifyConnectionInfoChange;
  2137     iReqHandleType = EMultimodePacketContextNotifyConnectionInfoChange;
  2155 // ---------------------------------------------------------------------------
  2146 // ---------------------------------------------------------------------------
  2156 //
  2147 //
  2157 void CMmPacketContextTsy::CompleteNotifyConnectionInfoChange(
  2148 void CMmPacketContextTsy::CompleteNotifyConnectionInfoChange(
  2158         TConnectionInfoBase* const aInfo )    
  2149         TConnectionInfoBase* const aInfo )    
  2159     {
  2150     {
  2160 TFLOGSTRING( "TSY: CMmPacketContextTsy::CompleteNotifyConnectionInfoChange." );
  2151 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_COMPLETENOTIFYCONNECTIONINFOCHANGE_1,  "TSY: CMmPacketContextTsy::CompleteNotifyConnectionInfoChange." );
  2161 
  2152 
  2162     if ( NULL != aInfo &&
  2153     if ( NULL != aInfo &&
  2163         TConnectionInfoBase::KConnectionInfoV1 == aInfo->ExtensionId() )
  2154         TConnectionInfoBase::KConnectionInfoV1 == aInfo->ExtensionId() )
  2164         {
  2155         {
  2165     	RPacketContext::TConnectionInfoV1 connectionInfoV1;
  2156     	RPacketContext::TConnectionInfoV1 connectionInfoV1;
  2204 // ---------------------------------------------------------------------------
  2195 // ---------------------------------------------------------------------------
  2205 //
  2196 //
  2206 TInt CMmPacketContextTsy::FillConnectionInfo(   
  2197 TInt CMmPacketContextTsy::FillConnectionInfo(   
  2207         TConnectionInfoBase* const aInfo )  
  2198         TConnectionInfoBase* const aInfo )  
  2208     {
  2199     {
  2209 TFLOGSTRING( "TSY: CMmPacketContextTsy::FillConnectionInfo" );
  2200 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMPACKETCONTEXTTSY_FILLCONNECTIONINFO_1,  "TSY: CMmPacketContextTsy::FillConnectionInfo" );
  2210 
  2201 
  2211     TInt ret = KErrNone;
  2202     TInt ret = KErrNone;
  2212 
  2203 
  2213     if ( NULL != aInfo &&
  2204     if ( NULL != aInfo &&
  2214         TConnectionInfoBase::KConnectionInfoV1 == aInfo->ExtensionId() )
  2205         TConnectionInfoBase::KConnectionInfoV1 == aInfo->ExtensionId() )