telephonyserverplugins/simatktsy/src/CSatNotifyOpenChannel.cpp
branchRCL_3
changeset 20 07a122eea281
parent 19 630d2f34d719
equal deleted inserted replaced
19:630d2f34d719 20:07a122eea281
     1 // Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2005-2009 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".
    18 //
    18 //
    19 
    19 
    20 
    20 
    21 
    21 
    22 //INCLUDES
    22 //INCLUDES
    23 
       
    24 #include "OstTraceDefinitions.h"
       
    25 #ifdef OST_TRACE_COMPILER_IN_USE
       
    26 #include "CSatNotifyOpenChannelTraces.h"
       
    27 #endif
       
    28 
       
    29 #include <satcs.h>                  // Etel SAT IPC definitions
    23 #include <satcs.h>                  // Etel SAT IPC definitions
    30 #include "CSatTsy.h"                // Tsy class header
    24 #include "CSatTsy.h"                // Tsy class header
    31 #include "CSatNotifyOpenChannel.h"  // Class header
    25 #include "CSatNotifyOpenChannel.h"  // Class header
    32 #include "CSatNotificationsTsy.h"   // Tsy class header
    26 #include "CSatNotificationsTsy.h"   // Tsy class header
    33 #include "CBerTlv.h"                // Ber Tlv data handling
    27 #include "CBerTlv.h"                // Ber Tlv data handling
    34 #include "TTlv.h"					// TTlv class
    28 #include "TTlv.h"					// TTlv class
    35 #include "CSatDataPackage.h"        // Parameter packing 
    29 #include "CSatDataPackage.h"        // Parameter packing 
       
    30 #include "TfLogger.h"               // For TFLOGSTRING
    36 #include "TSatUtility.h"            // Utilities
    31 #include "TSatUtility.h"            // Utilities
    37 #include "CSatTsyReqHandleStore.h"  // Request handle class
    32 #include "CSatTsyReqHandleStore.h"  // Request handle class
    38 #include "cmmmessagemanagerbase.h"  // Message manager class for forwarding req.
    33 #include "cmmmessagemanagerbase.h"  // Message manager class for forwarding req.
    39 
    34 
    40 // -----------------------------------------------------------------------------
    35 // -----------------------------------------------------------------------------
    45 CSatNotifyOpenChannel* CSatNotifyOpenChannel::NewL
    40 CSatNotifyOpenChannel* CSatNotifyOpenChannel::NewL
    46         ( 
    41         ( 
    47         CSatNotificationsTsy* aNotificationsTsy 
    42         CSatNotificationsTsy* aNotificationsTsy 
    48         )
    43         )
    49     {
    44     {
    50     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_NEWL_1, "CSAT: CSatNotifyOpenChannel::NewL");
    45     TFLOGSTRING("CSAT: CSatNotifyOpenChannel::NewL");
    51    	CSatNotifyOpenChannel* const satNotifyOpenChannel = 
    46    	CSatNotifyOpenChannel* const satNotifyOpenChannel = 
    52         new ( ELeave ) CSatNotifyOpenChannel( aNotificationsTsy );
    47         new ( ELeave ) CSatNotifyOpenChannel( aNotificationsTsy );
    53     CleanupStack::PushL( satNotifyOpenChannel );
    48     CleanupStack::PushL( satNotifyOpenChannel );
    54     satNotifyOpenChannel->ConstructL();
    49     satNotifyOpenChannel->ConstructL();
    55     CleanupStack::Pop( satNotifyOpenChannel );
    50     CleanupStack::Pop( satNotifyOpenChannel );
    56     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_NEWL_2, "CSAT: CSatNotifyOpenChannel::NewL, end of method");
    51     TFLOGSTRING("CSAT: CSatNotifyOpenChannel::NewL, end of method");
    57     return satNotifyOpenChannel;
    52     return satNotifyOpenChannel;
    58     }
    53     }
    59 
    54 
    60 // -----------------------------------------------------------------------------
    55 // -----------------------------------------------------------------------------
    61 // CSatNotifyOpenChannel::~CSatNotifyOpenChannel
    56 // CSatNotifyOpenChannel::~CSatNotifyOpenChannel
    65 CSatNotifyOpenChannel::~CSatNotifyOpenChannel
    60 CSatNotifyOpenChannel::~CSatNotifyOpenChannel
    66         ( 
    61         ( 
    67 		// None
    62 		// None
    68         )
    63         )
    69     {
    64     {
    70     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_DTOR_1, "CSAT: CSatNotifyOpenChannel::~CSatNotifyOpenChannel");
    65     TFLOGSTRING("CSAT: CSatNotifyOpenChannel::~CSatNotifyOpenChannel");
    71     }
    66     }
    72     
    67     
    73 // -----------------------------------------------------------------------------
    68 // -----------------------------------------------------------------------------
    74 // CSatNotifyOpenChannel::CSatNotifyOpenChannel
    69 // CSatNotifyOpenChannel::CSatNotifyOpenChannel
    75 // Default C++ constructor
    70 // Default C++ constructor
    92 void CSatNotifyOpenChannel::ConstructL
    87 void CSatNotifyOpenChannel::ConstructL
    93         (
    88         (
    94         // None
    89         // None
    95         )
    90         )
    96     {
    91     {
    97     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_CONSTRUCTL_1, "CSAT: CSatNotifyOpenChannel::ConstructL");
    92     TFLOGSTRING("CSAT: CSatNotifyOpenChannel::ConstructL");
    98     }
    93     }
    99 
    94 
   100 // -----------------------------------------------------------------------------
    95 // -----------------------------------------------------------------------------
   101 // CSatNotifyOpenChannel::Notify
    96 // CSatNotifyOpenChannel::Notify
   102 // This request allows a client to be notified of a OPEN CHANNEL proactive 
    97 // This request allows a client to be notified of a OPEN CHANNEL proactive 
   107         (
   102         (
   108         const TTsyReqHandle aTsyReqHandle,
   103         const TTsyReqHandle aTsyReqHandle,
   109         const TDataPackage& aPackage
   104         const TDataPackage& aPackage
   110         )
   105         )
   111     {
   106     {
   112     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_NOTIFY_1, "CSAT: CSatNotifyOpenChannel::Notify");
   107     TFLOGSTRING("CSAT: CSatNotifyOpenChannel::Notify");
   113     // Save data pointers to client side for completion
   108     // Save data pointers to client side for completion
   114     iOpenBaseChannelV2Pckg = reinterpret_cast<RSat::TOpenChannelBaseV2Pckg*>( 
   109     iOpenBaseChannelV2Pckg = reinterpret_cast<RSat::TOpenChannelBaseV2Pckg*>( 
   115         aPackage.Des1n() );  
   110         aPackage.Des1n() );  
   116     iOpenCsChannelV2Pckg = reinterpret_cast<RSat::TOpenCsChannelV2Pckg*>( 
   111     iOpenCsChannelV2Pckg = reinterpret_cast<RSat::TOpenCsChannelV2Pckg*>( 
   117         aPackage.Des1n() );    
   112         aPackage.Des1n() );    
   137 TInt CSatNotifyOpenChannel::CancelNotification
   132 TInt CSatNotifyOpenChannel::CancelNotification
   138         (
   133         (
   139         const TTsyReqHandle aTsyReqHandle 
   134         const TTsyReqHandle aTsyReqHandle 
   140         )
   135         )
   141     {
   136     {
   142     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_CANCELNOTIFICATION_1, "CSAT: CSatNotifyOpenChannel::CancelNotification");
   137     TFLOGSTRING("CSAT: CSatNotifyOpenChannel::CancelNotification");
   143     
   138     
   144     // Reset the request handle
   139     // Reset the request handle
   145     TTsyReqHandle reqHandle = iNotificationsTsy->iSatReqHandleStore->
   140     TTsyReqHandle reqHandle = iNotificationsTsy->iSatReqHandleStore->
   146         ResetTsyReqHandle( CSatTsy::ESatNotifyOpenChannelPCmdReqType );
   141         ResetTsyReqHandle( CSatTsy::ESatNotifyOpenChannelPCmdReqType );
   147 	// Reset the data pointers
   142 	// Reset the data pointers
   164         (
   159         (
   165         CSatDataPackage* aDataPackage,   
   160         CSatDataPackage* aDataPackage,   
   166         TInt aErrorCode                  
   161         TInt aErrorCode                  
   167         )
   162         )
   168     {
   163     {
   169     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_COMPLETENOTIFYL_1, "CSAT: CSatNotifyOpenChannel::CompleteNotifyL");
   164     TFLOGSTRING("CSAT: CSatNotifyOpenChannel::CompleteNotifyL");
   170 
   165 
   171     TInt ret( KErrNone );	
   166     TInt ret( KErrNone );	
   172     // Unpack parameters
   167     // Unpack parameters
   173     TPtrC8* data;
   168     TPtrC8* data;
   174     aDataPackage->UnPackData( &data );
   169     aDataPackage->UnPackData( &data );
   207             	// Switch according to bearer
   202             	// Switch according to bearer
   208             	switch ( bearerDescription.GetShortInfo( ETLV_BearerType ) )
   203             	switch ( bearerDescription.GetShortInfo( ETLV_BearerType ) )
   209                 	{
   204                 	{
   210                 	case KBipCsdBearer:
   205                 	case KBipCsdBearer:
   211                     	{
   206                     	{
   212                     	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_COMPLETENOTIFYL_2, "CSAT: CSatNotifyOpenChannel::CompleteNotifyL, Command not supported: Csd Bearer");
   207                     	TFLOGSTRING("CSAT: CSatNotifyOpenChannel::\
       
   208                     	    CompleteNotifyL, Command not supported: \
       
   209                     	    Csd Bearer");
   213                     	// Buffer size
   210                     	// Buffer size
   214             	        iBufferSize = bufferSize.GetLongInfo( 
   211             	        iBufferSize = bufferSize.GetLongInfo( 
   215             	            ETLV_BufferSize );
   212             	            ETLV_BufferSize );
   216                     	// Bearer description
   213                     	// Bearer description
   217                     	iBearerType = RSat::ECSDBearer;
   214                     	iBearerType = RSat::ECSDBearer;
   218                     	iBearer = bearerDescription.GetData( 
   215                     	iBearer = bearerDescription.GetData( 
   219                     	    ETLV_BearerParameters ); 
   216                     	    ETLV_BearerParameters ); 
   220                         OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_COMPLETENOTIFYL_3, "CSAT: CSatNotifyOpenChannel::CompleteNotifyL, BipCsdBearer ");
   217                         TFLOGSTRING("CSAT: CSatNotifyOpenChannel::\
       
   218                             CompleteNotifyL, BipCsdBearer ");
   221                         CreateTerminalRespL( pCmdNumber, 
   219                         CreateTerminalRespL( pCmdNumber, 
   222 							RSat::KCmdBeyondMeCapabilities, KNullDesC16 );
   220 							RSat::KCmdBeyondMeCapabilities, KNullDesC16 );
   223                         ret = KErrCorrupt; 
   221                         ret = KErrCorrupt; 
   224         				break;
   222         				break;
   225                     	}
   223                     	}
   272                     	}
   270                     	}
   273                 	case KBipLocalLinkBearer:
   271                 	case KBipLocalLinkBearer:
   274                 	default:
   272                 	default:
   275                     	{
   273                     	{
   276                     	// Bearer not supported (RFU)
   274                     	// Bearer not supported (RFU)
   277                     	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_COMPLETENOTIFYL_4, "CSAT: CSatNotifyOpenChannel::CompleteNotifyL, Bearer not supported");
   275                     	TFLOGSTRING("CSAT: CSatNotifyOpenChannel::\
       
   276                     	    CompleteNotifyL, Bearer not supported");
   278                     	// Required values missing
   277                     	// Required values missing
   279                     	iBearer.FillZ( 1 );
   278                     	iBearer.FillZ( 1 );
   280                     	iBufferSize = 0;
   279                     	iBufferSize = 0;
   281                     	iBearerType = static_cast<TUint8>( 
   280                     	iBearerType = static_cast<TUint8>( 
   282                     	    RSat::EBearerTypeNotSet );
   281                     	    RSat::EBearerTypeNotSet );
   287                     	}
   286                     	}
   288                 	}    
   287                 	}    
   289             	}
   288             	}
   290         	else
   289         	else
   291             	{
   290             	{
   292             	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_COMPLETENOTIFYL_5, "CSAT: CSatNotifyOpenChannel::CompleteNotifyL, required values missing");
   291             	TFLOGSTRING("CSAT: CSatNotifyOpenChannel::CompleteNotifyL,\
       
   292             	    required values missing");
   293             	// Required values missing
   293             	// Required values missing
   294             	iBearer.FillZ( 1 );
   294             	iBearer.FillZ( 1 );
   295             	iBufferSize = 0;
   295             	iBufferSize = 0;
   296             	iBearerType = static_cast<TUint8>( RSat::EBearerTypeNotSet );
   296             	iBearerType = static_cast<TUint8>( RSat::EBearerTypeNotSet );
   297             	CreateTerminalRespL( pCmdNumber, 
   297             	CreateTerminalRespL( pCmdNumber, 
   356                     	// Set alpha id status
   356                     	// Set alpha id status
   357                     	openChannelV2->iAlphaId.iStatus = RSat::EAlphaIdProvided;
   357                     	openChannelV2->iAlphaId.iStatus = RSat::EAlphaIdProvided;
   358                     	}
   358                     	}
   359                 	else
   359                 	else
   360                     	{
   360                     	{
   361                     	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_COMPLETENOTIFYL_6, "CSAT: CSatNotifyOpenChannel::CompleteNotifyL, Alpha ID is NULL");
   361                     	TFLOGSTRING("CSAT: CSatNotifyOpenChannel::\
       
   362                     	    CompleteNotifyL, Alpha ID is NULL");
   362                     	openChannelV2->iAlphaId.iStatus = RSat::EAlphaIdNull;
   363                     	openChannelV2->iAlphaId.iStatus = RSat::EAlphaIdNull;
   363                     	}
   364                     	}
   364                		}
   365                		}
   365             	// Alpha id not present
   366             	// Alpha id not present
   366             	else
   367             	else
   367                 	{
   368                 	{
   368                 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_COMPLETENOTIFYL_7, "CSAT: CSatNotifyOpenChannel::CompleteNotifyL, Alpha ID not present");
   369                 	TFLOGSTRING("CSAT: CSatNotifyOpenChannel::CompleteNotifyL,\
       
   370                 	    Alpha ID not present");
   369                 	openChannelV2->iAlphaId.iStatus = RSat::EAlphaIdNotPresent;
   371                 	openChannelV2->iAlphaId.iStatus = RSat::EAlphaIdNotPresent;
   370                 	}
   372                 	}
   371 
   373 
   372 
   374 
   373             	// Iconid (optional)
   375             	// Iconid (optional)
   407                         	}
   409                         	}
   408                 	    }
   410                 	    }
   409                 	}
   411                 	}
   410             	else
   412             	else
   411                 	{
   413                 	{
   412                 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_COMPLETENOTIFYL_8, "CSAT: CSatNotifyOpenChannel::CompleteNotifyL, Protocol not present");
   414                 	TFLOGSTRING("CSAT: CSatNotifyOpenChannel::CompleteNotifyL,\
       
   415                 	    Protocol not present");
   413                 	openChannelV2->iSimMeInterface.iTransportProto =
   416                 	openChannelV2->iSimMeInterface.iTransportProto =
   414                     	RSat::EProtocolNotPresent;
   417                     	RSat::EProtocolNotPresent;
   415                 	}
   418                 	}
   416 
   419 
   417                 // Data destination address
   420                 // Data destination address
   482                         	    RSat::EIPv6Address;
   485                         	    RSat::EIPv6Address;
   483                         	break;
   486                         	break;
   484                         	}
   487                         	}
   485                     	default:
   488                     	default:
   486                         	{
   489                         	{
   487                         	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_COMPLETENOTIFYL_9, "CSAT: CSatNotifyOpenChannel::CompleteNotifyL, Address not set");
   490                         	TFLOGSTRING("CSAT: CSatNotifyOpenChannel::\
       
   491                         	    CompleteNotifyL, Address not set");
   488                         	openChannelV2->iDestinationAddress.iType = 
   492                         	openChannelV2->iDestinationAddress.iType = 
   489                         	    RSat::EAddressNotSet;
   493                         	    RSat::EAddressNotSet;
   490                         	break;
   494                         	break;
   491                         	}
   495                         	}
   492                     	}
   496                     	}
   536                                     		RSat::EIPv6Address;
   540                                     		RSat::EIPv6Address;
   537                                     	break;
   541                                     	break;
   538                                 		}
   542                                 		}
   539                                 	default:
   543                                 	default:
   540                                     	{
   544                                     	{
   541                                     	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_COMPLETENOTIFYL_10, "CSAT: CSatNotifyOpenChannel::CompleteNotifyL, Address not set");
   545                                     	TFLOGSTRING("CSAT:\
       
   546                                     	    CSatNotifyOpenChannel::\
       
   547                                     	    CompleteNotifyL, Address not set");
   542                                 		openCsChannelV2.iLocalAddress.iType = 
   548                                 		openCsChannelV2.iLocalAddress.iType = 
   543                                     		RSat::EAddressNotSet;
   549                                     		RSat::EAddressNotSet;
   544                                 		}
   550                                 		}
   545                         		    }
   551                         		    }
   546                         		    
   552                         		    
   550                             		openCsChannelV2.iLocalAddress.iAddress = 
   556                             		openCsChannelV2.iLocalAddress.iAddress = 
   551                                 		localAddressTlv->GetData( ETLV_Address );
   557                                 		localAddressTlv->GetData( ETLV_Address );
   552                             		}
   558                             		}
   553                        			else
   559                        			else
   554                             		{
   560                             		{
   555                             		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_COMPLETENOTIFYL_11, "CSAT: CSatNotifyOpenChannel::CompleteNotifyL, Address not present");
   561                             		TFLOGSTRING("CSAT: CSatNotifyOpenChannel::\
       
   562                             		    CompleteNotifyL, Address not present");
   556                             		openCsChannelV2.iLocalAddress.iType = 
   563                             		openCsChannelV2.iLocalAddress.iType = 
   557                                 		RSat::EAddressNotPresent;
   564                                 		RSat::EAddressNotPresent;
   558                             		}    
   565                             		}    
   559                             		
   566                             		
   560                         		break;
   567                         		break;
   582                                         	RSat::EIPv6Address;
   589                                         	RSat::EIPv6Address;
   583                                         break;
   590                                         break;
   584                                     	}
   591                                     	}
   585                                     default:
   592                                     default:
   586                                     	{
   593                                     	{
   587                                     	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_COMPLETENOTIFYL_12, "CSAT: CSatNotifyOpenChannel::CompleteNotifyL, Address not set");
   594                                     	TFLOGSTRING("CSAT: \
       
   595                                     	    CSatNotifyOpenChannel::\
       
   596                                     	    CompleteNotifyL, Address not set");
   588                                     	openGprsChannelV4.iLocalAddress.iType = 
   597                                     	openGprsChannelV4.iLocalAddress.iType = 
   589                                         	RSat::EAddressNotSet;
   598                                         	RSat::EAddressNotSet;
   590                                     	}
   599                                     	}
   591                             	    }
   600                             	    }
   592                             	    
   601                             	    
   597                                     	localAddressTlv->GetData( 
   606                                     	localAddressTlv->GetData( 
   598                                     	    ETLV_Address );
   607                                     	    ETLV_Address );
   599                                 	}
   608                                 	}
   600                             	else
   609                             	else
   601                                 	{
   610                                 	{
   602                                 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_COMPLETENOTIFYL_13, "CSAT: CSatNotifyOpenChannel::CompleteNotifyL, Address not present");
   611                                 	TFLOGSTRING("CSAT: CSatNotifyOpenChannel::\
       
   612                                 	    CompleteNotifyL, Address not present");
   603                                 	openGprsChannelV4.iLocalAddress.iType = 
   613                                 	openGprsChannelV4.iLocalAddress.iType = 
   604                                     	RSat::EAddressNotPresent;
   614                                     	RSat::EAddressNotPresent;
   605                                 	}    
   615                                 	}    
   606                             
   616                             
   607                             	break;
   617                             	break;
   608                             	}
   618                             	}
   609                         	default:
   619                         	default:
   610                             	{
   620                             	{
   611                             	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_COMPLETENOTIFYL_14, "CSAT: CSatNotifyOpenChannel::CompleteNotifyL, Unknown Bearer type");
   621                             	TFLOGSTRING("CSAT: CSatNotifyOpenChannel::\
       
   622                             	    CompleteNotifyL, Unknown Bearer type");
   612                             	break;
   623                             	break;
   613                             	}
   624                             	}
   614                             	
   625                             	
   615                     		} // Switch-case
   626                     		} // Switch-case
   616                 	    } // If bearer description tag exists
   627                 	    } // If bearer description tag exists
   617             		} // if ( localAddressTlv )
   628             		} // if ( localAddressTlv )
   618             	} // if ( KErrNone == ret )
   629             	} // if ( KErrNone == ret )
   619             else
   630             else
   620                 {
   631                 {
   621                 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_COMPLETENOTIFYL_15, "CSAT: CSatNotifyOpenChannel::CompleteNotifyL, Error when parsing Bearer data");
   632                 TFLOGSTRING("CSAT: CSatNotifyOpenChannel::CompleteNotifyL,\
       
   633                     Error when parsing Bearer data");
   622                 }
   634                 }
   623             } // if ( KErrNone == aErrorCode )
   635             } // if ( KErrNone == aErrorCode )
   624 		else
   636 		else
   625             {
   637             {
   626             ret = aErrorCode;
   638             ret = aErrorCode;
   629         iNotificationsTsy->iSatTsy->ReqCompleted( reqHandle, ret );
   641         iNotificationsTsy->iSatTsy->ReqCompleted( reqHandle, ret );
   630         } // if ( CSatTsy::ESatReqHandleUnknown != reqHandle )
   642         } // if ( CSatTsy::ESatReqHandleUnknown != reqHandle )
   631     else
   643     else
   632         {
   644         {
   633         // Request not on, returning response immediately
   645         // Request not on, returning response immediately
   634         OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_COMPLETENOTIFYL_16, "CSAT:  CSatNotifyOpenChannel::CompleteNotifyL, Request not ongoing");
   646         TFLOGSTRING("CSAT:  CSatNotifyOpenChannel::CompleteNotifyL, \
       
   647             Request not ongoing");
   635         // additional info must be provided with KMeUnableToProcessCmd 
   648         // additional info must be provided with KMeUnableToProcessCmd 
   636 		TBuf16<1> additionalInfo;
   649 		TBuf16<1> additionalInfo;
   637 		additionalInfo.Append( RSat::KNoSpecificMeProblem );
   650 		additionalInfo.Append( RSat::KNoSpecificMeProblem );
   638         iBearer.FillZ( 1 );
   651         iBearer.FillZ( 1 );
   639         iBufferSize = 0;
   652         iBufferSize = 0;
   652 TInt CSatNotifyOpenChannel::TerminalResponseL
   665 TInt CSatNotifyOpenChannel::TerminalResponseL
   653         ( 
   666         ( 
   654         TDes8* aRsp 
   667         TDes8* aRsp 
   655         )
   668         )
   656     {
   669     {
   657     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_TERMINALRESPONSEL_1, "CSAT: CSatNotifyOpenChannel::TerminalResponseL");
   670     TFLOGSTRING("CSAT: CSatNotifyOpenChannel::TerminalResponseL");
   658 
   671 
   659     TInt ret( KErrNone );
   672     TInt ret( KErrNone );
   660 
   673 
   661 	TBuf16<RSat::KAdditionalInfoMaxSize> additionalInfo;
   674 	TBuf16<RSat::KAdditionalInfoMaxSize> additionalInfo;
   662 
   675 
   664             REINTERPRET_CAST( RSat::TOpenChannelRspV2Pckg*, aRsp);
   677             REINTERPRET_CAST( RSat::TOpenChannelRspV2Pckg*, aRsp);
   665     RSat::TOpenChannelRspV2& rspV2 = ( *aRspPckg ) ();
   678     RSat::TOpenChannelRspV2& rspV2 = ( *aRspPckg ) ();
   666 
   679 
   667     TUint8 pCmdNumber( rspV2.PCmdNumber() );
   680     TUint8 pCmdNumber( rspV2.PCmdNumber() );
   668     
   681     
   669     OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_TERMINALRESPONSEL_2, "CSAT: CSatNotifyOpenChannel::TerminalResponseL, General result: %d", rspV2.iGeneralResult);
   682     TFLOGSTRING2("CSAT: CSatNotifyOpenChannel::TerminalResponseL, \
       
   683         General result: %d", rspV2.iGeneralResult);
   670 
   684 
   671     // Check that general result value is valid
   685     // Check that general result value is valid
   672     if ( ( RSat::KSuccess != rspV2.iGeneralResult ) 
   686     if ( ( RSat::KSuccess != rspV2.iGeneralResult ) 
   673         && ( RSat::KPartialComprehension != rspV2.iGeneralResult )
   687         && ( RSat::KPartialComprehension != rspV2.iGeneralResult )
   674         && ( RSat::KMissingInformation != rspV2.iGeneralResult )
   688         && ( RSat::KMissingInformation != rspV2.iGeneralResult )
   687         && ( RSat::KErrorRequiredValuesMissing != rspV2.iGeneralResult )
   701         && ( RSat::KErrorRequiredValuesMissing != rspV2.iGeneralResult )
   688         && ( RSat::KBearerIndepProtocolError != rspV2.iGeneralResult )
   702         && ( RSat::KBearerIndepProtocolError != rspV2.iGeneralResult )
   689         && ( RSat::KAccessTechUnableProcessCmd != rspV2.iGeneralResult )
   703         && ( RSat::KAccessTechUnableProcessCmd != rspV2.iGeneralResult )
   690         && ( RSat::KFramesError != rspV2.iGeneralResult ) )
   704         && ( RSat::KFramesError != rspV2.iGeneralResult ) )
   691         {
   705         {
   692         OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_TERMINALRESPONSEL_3, "CSAT: CSatNotifyOpenChannel::TerminalResponseL, Invalid General Result");
   706         TFLOGSTRING("CSAT: CSatNotifyOpenChannel::TerminalResponseL, \
       
   707             Invalid General Result");
   693         // Invalid general result
   708         // Invalid general result
   694         ret = KErrCorrupt;
   709         ret = KErrCorrupt;
   695         }
   710         }
   696 
   711 
   697     // Check for additional info type
   712     // Check for additional info type
   701          ( RSat::KChannelStatusInfo == rspV2.iInfoType ) )
   716          ( RSat::KChannelStatusInfo == rspV2.iInfoType ) )
   702         {
   717         {
   703         // Check the length of additional info
   718         // Check the length of additional info
   704         if ( rspV2.iAdditionalInfo.Length() <= 0 )
   719         if ( rspV2.iAdditionalInfo.Length() <= 0 )
   705             {
   720             {
   706             OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_TERMINALRESPONSEL_4, "CSAT: CSatNotifyOpenChannel::TerminalResponseL, Invalid Additional Info");
   721             TFLOGSTRING("CSAT: CSatNotifyOpenChannel::TerminalResponseL, \
       
   722                 Invalid Additional Info");
   707             // Invalid additional info field
   723             // Invalid additional info field
   708             ret = KErrCorrupt;
   724             ret = KErrCorrupt;
   709             }
   725             }
   710         else
   726         else
   711         	{
   727         	{
   724 	    {
   740 	    {
   725 	    // Do nothing
   741 	    // Do nothing
   726 	    }
   742 	    }
   727 	else
   743 	else
   728         {
   744         {
   729         OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_TERMINALRESPONSEL_5, "CSAT: CSatNotifyOpenChannel::TerminalResponseL, Invalid Additional Info type");
   745         TFLOGSTRING("CSAT: CSatNotifyOpenChannel::TerminalResponseL, \
       
   746                      Invalid Additional Info type");
   730         ret = KErrCorrupt;
   747         ret = KErrCorrupt;
   731         }
   748         }
   732         
   749         
   733 	iBearerType = static_cast<TUint8>(rspV2.iBearer.iType);
   750 	iBearerType = static_cast<TUint8>(rspV2.iBearer.iType);
   734 	iBearer.Copy( rspV2.iBearer.iParams );
   751 	iBearer.Copy( rspV2.iBearer.iParams );
   754         TUint8 aPCmdNumber,         
   771         TUint8 aPCmdNumber,         
   755         TUint8 aGeneralResult,      
   772         TUint8 aGeneralResult,      
   756         const TDesC16& aAdditionalInfo
   773         const TDesC16& aAdditionalInfo
   757 		)
   774 		)
   758     {
   775     {
   759     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_CREATETERMINALRESPL_1, "CSAT: CSatMessHandler::CreateTerminalRespL");
   776     TFLOGSTRING("CSAT: CSatMessHandler::CreateTerminalRespL");
   760     // Create and append response data
   777     // Create and append response data
   761     TTlv tlvSpecificData;
   778     TTlv tlvSpecificData;
   762     // Create General Result TLV here
   779     // Create General Result TLV here
   763     tlvSpecificData.AddTag( KTlvResultTag );
   780     tlvSpecificData.AddTag( KTlvResultTag );
   764     // General result
   781     // General result
   781     else
   798     else
   782         {
   799         {
   783         // Successful result: could/must provide an additional info byte
   800         // Successful result: could/must provide an additional info byte
   784 		if ( aAdditionalInfo.Length() > 0 )
   801 		if ( aAdditionalInfo.Length() > 0 )
   785         	{
   802         	{
   786         	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_CREATETERMINALRESPL_2, "CSAT: CSatMessHandler::CreateTerminalRespL, Unsuccessful result: aAddtionalInfo: %d", aAdditionalInfo[0]);
   803         	TFLOGSTRING2("CSAT: CSatMessHandler::CreateTerminalRespL,\
       
   804 				Unsuccessful result: aAddtionalInfo: %d", aAdditionalInfo[0]);
   787 			tlvSpecificData.AddByte( static_cast<TUint8>( aAdditionalInfo[0] ) );
   805 			tlvSpecificData.AddByte( static_cast<TUint8>( aAdditionalInfo[0] ) );
   788             }
   806             }
   789         }
   807         }
   790         
   808         
   791     // For any result: Append Bearer Description data
   809     // For any result: Append Bearer Description data
   795         tlvSpecificData.AddByte( iBearerType );
   813         tlvSpecificData.AddByte( iBearerType );
   796         tlvSpecificData.AddData( iBearer );
   814         tlvSpecificData.AddData( iBearer );
   797         }
   815         }
   798     else
   816     else
   799         {
   817         {
   800         OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYOPENCHANNEL_CREATETERMINALRESPL_3, "CSAT: CSatMessHandler::CreateTerminalRespL: No Bearer Description data available");
   818         TFLOGSTRING("CSAT: CSatMessHandler::CreateTerminalRespL: \
       
   819         	No Bearer Description data available");
   801         }
   820         }
   802         
   821         
   803     // Append Buffer Size
   822     // Append Buffer Size
   804     tlvSpecificData.AddTag( KTlvBufferSizeTag );
   823     tlvSpecificData.AddTag( KTlvBufferSizeTag );
   805     tlvSpecificData.AddByte( TUint8( ( iBufferSize & 0xFF00 ) >> 8 ) );
   824     tlvSpecificData.AddByte( TUint8( ( iBufferSize & 0xFF00 ) >> 8 ) );