telephonyserverplugins/simatktsy/src/CSatNotifySetUpCall.cpp
branchRCL_3
changeset 65 630d2f34d719
parent 0 3553901f7fa8
child 66 07a122eea281
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".
    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 "CSatNotifySetUpCallTraces.h"
       
    27 #endif
       
    28 
    23 #include <satcs.h>                  // Etel SAT IPC definitions
    29 #include <satcs.h>                  // Etel SAT IPC definitions
    24 #include "CSatTsy.h"                // Tsy class header
    30 #include "CSatTsy.h"                // Tsy class header
    25 #include "CSatNotifySetUpCall.h"    // Tsy class header
    31 #include "CSatNotifySetUpCall.h"    // Tsy class header
    26 #include "CSatNotificationsTsy.h"   // Class header
    32 #include "CSatNotificationsTsy.h"   // Class header
    27 #include "CBerTlv.h"                // Ber Tlv data handling
    33 #include "CBerTlv.h"                // Ber Tlv data handling
    28 #include "TTlv.h"					// TTlv class
    34 #include "TTlv.h"					// TTlv class
    29 #include "CSatDataPackage.h"        // Parameter packing 
    35 #include "CSatDataPackage.h"        // Parameter packing 
    30 #include "TfLogger.h"               // For TFLOGSTRING
       
    31 #include "TSatUtility.h"            // Utilities
    36 #include "TSatUtility.h"            // Utilities
    32 #include "CSatTsyReqHandleStore.h"  // Request handle class
    37 #include "CSatTsyReqHandleStore.h"  // Request handle class
    33 #include "cmmmessagemanagerbase.h"  // Message manager class for forwarding req.
    38 #include "cmmmessagemanagerbase.h"  // Message manager class for forwarding req.
    34 
    39 
    35 // -----------------------------------------------------------------------------
    40 // -----------------------------------------------------------------------------
    40 CSatNotifySetUpCall* CSatNotifySetUpCall::NewL
    45 CSatNotifySetUpCall* CSatNotifySetUpCall::NewL
    41         ( 
    46         ( 
    42         CSatNotificationsTsy* aNotificationsTsy 
    47         CSatNotificationsTsy* aNotificationsTsy 
    43         )
    48         )
    44     {
    49     {
    45     TFLOGSTRING("CSAT: CSatNotifySetupCall::NewL"); 
    50     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_NEWL_1, "CSAT: CSatNotifySetupCall::NewL");
    46     CSatNotifySetUpCall* const satNotifySetUpCall = 
    51     CSatNotifySetUpCall* const satNotifySetUpCall = 
    47         new ( ELeave ) CSatNotifySetUpCall( aNotificationsTsy );
    52         new ( ELeave ) CSatNotifySetUpCall( aNotificationsTsy );
    48     CleanupStack::PushL( satNotifySetUpCall );
    53     CleanupStack::PushL( satNotifySetUpCall );
    49     satNotifySetUpCall->ConstructL();
    54     satNotifySetUpCall->ConstructL();
    50     CleanupStack::Pop( satNotifySetUpCall );
    55     CleanupStack::Pop( satNotifySetUpCall );
    51     TFLOGSTRING("CSAT: CSatNotifySetupCall::NewL, end of method"); 
    56     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_NEWL_2, "CSAT: CSatNotifySetupCall::NewL, end of method");
    52     return satNotifySetUpCall;
    57     return satNotifySetUpCall;
    53     }
    58     }
    54 
    59 
    55 // -----------------------------------------------------------------------------
    60 // -----------------------------------------------------------------------------
    56 // CSatNotifySetupCall::~CSatNotifySetupCall
    61 // CSatNotifySetupCall::~CSatNotifySetupCall
    60 CSatNotifySetUpCall::~CSatNotifySetUpCall
    65 CSatNotifySetUpCall::~CSatNotifySetUpCall
    61         (
    66         (
    62         // None
    67         // None
    63         )
    68         )
    64     {
    69     {
    65     TFLOGSTRING("CSAT: CSatNotifySetupCall::~CSatNotifySetUpCall"); 
    70     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_DTOR_1, "CSAT: CSatNotifySetupCall::~CSatNotifySetUpCall");
    66     }
    71     }
    67         
    72         
    68 // -----------------------------------------------------------------------------
    73 // -----------------------------------------------------------------------------
    69 // CSatNotifySetupCall::CSatNotifySetupCall
    74 // CSatNotifySetupCall::CSatNotifySetupCall
    70 // Constructor
    75 // Constructor
    86 void CSatNotifySetUpCall::ConstructL
    91 void CSatNotifySetUpCall::ConstructL
    87         ( 
    92         ( 
    88         // None
    93         // None
    89         )
    94         )
    90     {
    95     {
    91     TFLOGSTRING("CSAT: CSatNotifySetupCall::ConstructL"); 
    96     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_CONSTRUCTL_1, "CSAT: CSatNotifySetupCall::ConstructL");
    92     iCallConnectedEvent.Zero();
    97     iCallConnectedEvent.Zero();
    93     }
    98     }
    94     
    99     
    95 // -----------------------------------------------------------------------------
   100 // -----------------------------------------------------------------------------
    96 // CSatNotifySetupCall::Notify
   101 // CSatNotifySetupCall::Notify
   101         ( 
   106         ( 
   102         const TTsyReqHandle aTsyReqHandle,
   107         const TTsyReqHandle aTsyReqHandle,
   103         const TDataPackage& aPackage   
   108         const TDataPackage& aPackage   
   104         )
   109         )
   105     {
   110     {
   106     TFLOGSTRING("CSAT: CSatNotifySetupCall::Notify"); 
   111     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_NOTIFY_1, "CSAT: CSatNotifySetupCall::Notify");
   107     // Save data pointer to client side for completion
   112     // Save data pointer to client side for completion
   108     iSetUpCallV1Pckg = reinterpret_cast<RSat::TSetUpCallV1Pckg*>( 
   113     iSetUpCallV1Pckg = reinterpret_cast<RSat::TSetUpCallV1Pckg*>( 
   109         aPackage.Des1n() );
   114         aPackage.Des1n() );
   110     // Save the request handle
   115     // Save the request handle
   111     iNotificationsTsy->iSatTsy->SaveReqHandle( aTsyReqHandle, 
   116     iNotificationsTsy->iSatTsy->SaveReqHandle( aTsyReqHandle, 
   112 		CSatTsy::ESatNotifySetUpCallPCmdReqType );   
   117 		CSatTsy::ESatNotifySetUpCallPCmdReqType );   
   113     TFLOGSTRING2("CSAT: CSatNotifySetUpCall::Notify\t Handle:%d",
   118     OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_NOTIFY_2, "CSAT: CSatNotifySetUpCall::Notify\t Handle:%d",aTsyReqHandle);
   114            aTsyReqHandle);
       
   115     // Check if requested notification is already pending
   119     // Check if requested notification is already pending
   116     iNotificationsTsy->NotifySatReadyForNotification( KSetUpCall );   
   120     iNotificationsTsy->NotifySatReadyForNotification( KSetUpCall );   
   117 
   121 
   118     return KErrNone;
   122     return KErrNone;
   119     }
   123     }
   129 TInt CSatNotifySetUpCall::CancelNotification
   133 TInt CSatNotifySetUpCall::CancelNotification
   130         (
   134         (
   131         const TTsyReqHandle aTsyReqHandle
   135         const TTsyReqHandle aTsyReqHandle
   132         )
   136         )
   133     {
   137     {
   134     TFLOGSTRING("CSAT: CSatNotifySetUpCall::CancelNotification");   
   138     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_CANCELNOTIFICATION_1, "CSAT: CSatNotifySetUpCall::CancelNotification");
   135     // Reset the request handle 
   139     // Reset the request handle 
   136     iNotificationsTsy->iSatReqHandleStore->ResetTsyReqHandle( 
   140     iNotificationsTsy->iSatReqHandleStore->ResetTsyReqHandle( 
   137         CSatTsy::ESatNotifySetUpCallPCmdReqType );
   141         CSatTsy::ESatNotifySetUpCallPCmdReqType );
   138     // Reset the data pointer
   142     // Reset the data pointer
   139     iSetUpCallV1Pckg = NULL;    
   143     iSetUpCallV1Pckg = NULL;    
   153         ( 
   157         ( 
   154         CSatDataPackage* aDataPackage,
   158         CSatDataPackage* aDataPackage,
   155         TInt aErrorCode  
   159         TInt aErrorCode  
   156         ) 
   160         ) 
   157     {
   161     {
   158     TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL");
   162     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_1, "CSAT: CSatNotifySetupCall::CompleteNotifyL");
   159     TInt returnValue( KErrNone );
   163     TInt returnValue( KErrNone );
   160     TInt ret( KErrNone );
   164     TInt ret( KErrNone );
   161     iCCResult = 0;
   165     iCCResult = 0;
   162     // Unpack parameters
   166     // Unpack parameters
   163     TPtrC8* data;
   167     TPtrC8* data;
   179     iNotificationsTsy->iTerminalRespData.iCommandDetails.Copy( 
   183     iNotificationsTsy->iTerminalRespData.iCommandDetails.Copy( 
   180     	commandDetails.Data() );
   184     	commandDetails.Data() );
   181     
   185     
   182     TUint8 pCmdNumber( commandDetails.GetShortInfo( ETLV_CommandNumber ) );
   186     TUint8 pCmdNumber( commandDetails.GetShortInfo( ETLV_CommandNumber ) );
   183                 
   187                 
   184     TFLOGSTRING2("CSAT: CSatNotifySetUpCall::CompleteNotifyL\t Handle:%d",
   188     OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_2, "CSAT: CSatNotifySetUpCall::CompleteNotifyL\t Handle:%d",reqHandle);
   185            reqHandle);
       
   186     // In case the request was ongoing, continue..
   189     // In case the request was ongoing, continue..
   187     if ( CSatTsy::ESatReqHandleUnknown  != reqHandle )
   190     if ( CSatTsy::ESatReqHandleUnknown  != reqHandle )
   188         {
   191         {
   189         // Complete right away if error has occured, otherwise continue..
   192         // Complete right away if error has occured, otherwise continue..
   190         if ( KErrNone == aErrorCode )
   193         if ( KErrNone == aErrorCode )
   193             RSat::TSetUpCallV1& setUpCallV1 = ( *iSetUpCallV1Pckg )();
   196             RSat::TSetUpCallV1& setUpCallV1 = ( *iSetUpCallV1Pckg )();
   194 
   197 
   195             // Transaction ID
   198             // Transaction ID
   196             setUpCallV1.SetPCmdNumber( pCmdNumber );
   199             setUpCallV1.SetPCmdNumber( pCmdNumber );
   197             
   200             
   198             TFLOGSTRING2("CSAT: CSatNotifySetupCall::CompleteNotifyL \
   201             OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_3, "CSAT: CSatNotifySetupCall::CompleteNotifyL CommandQualifier %d", iNotificationsTsy->iTerminalRespData.iCommandDetails[ KCommandQualifier ]);
   199             	CommandQualifier %d", iNotificationsTsy->iTerminalRespData.
       
   200             	iCommandDetails[ KCommandQualifier ]);
       
   201 
   202 
   202             switch ( iNotificationsTsy->iTerminalRespData.
   203             switch ( iNotificationsTsy->iTerminalRespData.
   203             		iCommandDetails[ KCommandQualifier ] )
   204             		iCommandDetails[ KCommandQualifier ] )
   204                 {
   205                 {
   205                 case KOnlyIfNotBusy:
   206                 case KOnlyIfNotBusy:
   239                     setUpCallV1.iType = RSat::EDisconnectOtherCallsWithRedial;
   240                     setUpCallV1.iType = RSat::EDisconnectOtherCallsWithRedial;
   240                     break;
   241                     break;
   241                     }
   242                     }
   242                 default:
   243                 default:
   243                     {
   244                     {
   244                     TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL,\
   245                     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_4, "CSAT: CSatNotifySetupCall::CompleteNotifyL,Call type not set");
   245                         Call type not set");
       
   246                     // Call type not set
   246                     // Call type not set
   247                     setUpCallV1.iType = RSat::ESetUpCallTypeNotSet;
   247                     setUpCallV1.iType = RSat::ESetUpCallTypeNotSet;
   248                     break;
   248                     break;
   249                     }
   249                     }
   250                 }    
   250                 }    
   273                         RSat::EAlphaIdProvided;
   273                         RSat::EAlphaIdProvided;
   274 
   274 
   275                      // Get alpha id string
   275                      // Get alpha id string
   276                     sourceString.Set( alphaIdentifier.GetData( 
   276                     sourceString.Set( alphaIdentifier.GetData( 
   277                         ETLV_AlphaIdentifier ) );
   277                         ETLV_AlphaIdentifier ) );
   278                     TFLOGSTRING2("CSAT: CSatNotifySetupCall::CompleteNotifyL User \
   278                     OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_5, "CSAT: CSatNotifySetupCall::CompleteNotifyL User confirmation phase: sourceString %s", sourceString );
   279                         confirmation phase: sourceString %s", 
       
   280                         &sourceString );               
       
   281                     // Convert and set the alpha id
   279                     // Convert and set the alpha id
   282                     TSatUtility::SetAlphaId( sourceString ,
   280                     TSatUtility::SetAlphaId( sourceString ,
   283                         setUpCallV1.iAlphaIdConfirmationPhase.iAlphaId ); 
   281                         setUpCallV1.iAlphaIdConfirmationPhase.iAlphaId ); 
   284                 
   282                 
   285                     }
   283                     }
   286                 // Alpha id found for user confirmation phase, but length 
   284                 // Alpha id found for user confirmation phase, but length 
   287                 // is zero
   285                 // is zero
   288                 else
   286                 else
   289                     {
   287                     {
   290                     TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL \
   288                     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_6, "CSAT: CSatNotifySetupCall::CompleteNotifyL User confirmation phase: Alpha Id missing");
   291                         User confirmation phase: Alpha Id missing");
       
   292                     setUpCallV1.iAlphaIdConfirmationPhase.iStatus = 
   289                     setUpCallV1.iAlphaIdConfirmationPhase.iStatus = 
   293                         RSat::EAlphaIdNull;
   290                         RSat::EAlphaIdNull;
   294                     }
   291                     }
   295                 }
   292                 }
   296             // No alpha id for user confirmation phase
   293             // No alpha id for user confirmation phase
   297             else
   294             else
   298                 {
   295                 {
   299                 TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL,\
   296                 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_7, "CSAT: CSatNotifySetupCall::CompleteNotifyL, User confirmation phase: Alpha ID not present");
   300                     User confirmation phase: Alpha ID not present");
       
   301                 setUpCallV1.iAlphaIdConfirmationPhase.iStatus = 
   297                 setUpCallV1.iAlphaIdConfirmationPhase.iStatus = 
   302                     RSat::EAlphaIdNotPresent;
   298                     RSat::EAlphaIdNotPresent;
   303                 }  
   299                 }  
   304 
   300 
   305             // Get alpha identifier for call set up phase
   301             // Get alpha identifier for call set up phase
   315                     setUpCallV1.iAlphaIdCallSetUpPhase.iStatus = 
   311                     setUpCallV1.iAlphaIdCallSetUpPhase.iStatus = 
   316                         RSat::EAlphaIdProvided;
   312                         RSat::EAlphaIdProvided;
   317                      // Get alpha id string
   313                      // Get alpha id string
   318                     sourceString.Set( alphaIdentifier.GetData( 
   314                     sourceString.Set( alphaIdentifier.GetData( 
   319                         ETLV_AlphaIdentifier ) );
   315                         ETLV_AlphaIdentifier ) );
   320                     TFLOGSTRING2("CSAT: CSatNotifySetupCall::CompleteNotifyL \
   316                     OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_8, "CSAT: CSatNotifySetupCall::CompleteNotifyL Call Set Up phase: sourceString %s",sourceString );
   321                         Call Set Up phase: sourceString %s",
       
   322                         &sourceString );
       
   323                     // Convert and set the alpha id
   317                     // Convert and set the alpha id
   324                     TSatUtility::SetAlphaId( sourceString,
   318                     TSatUtility::SetAlphaId( sourceString,
   325                         setUpCallV1.iAlphaIdCallSetUpPhase.iAlphaId ); 
   319                         setUpCallV1.iAlphaIdCallSetUpPhase.iAlphaId ); 
   326 
   320 
   327                     }
   321                     }
   328                 // Alpha id found for set up call phase,  but length is zero
   322                 // Alpha id found for set up call phase,  but length is zero
   329                 else
   323                 else
   330                     {
   324                     {
   331                     TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL \
   325                     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_9, "CSAT: CSatNotifySetupCall::CompleteNotifyL Call Set Up phase: Alpha Id is NULL");
   332                         Call Set Up phase: Alpha Id is NULL"); 
       
   333                     setUpCallV1.iAlphaIdCallSetUpPhase.iStatus = 
   326                     setUpCallV1.iAlphaIdCallSetUpPhase.iStatus = 
   334                         RSat::EAlphaIdNull;
   327                         RSat::EAlphaIdNull;
   335                     }
   328                     }
   336                 }
   329                 }
   337    
   330    
   338             // No alpha id set up call phase
   331             // No alpha id set up call phase
   339             else
   332             else
   340                 {
   333                 {
   341                 TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL,\
   334                 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_10, "CSAT: CSatNotifySetupCall::CompleteNotifyL, Alpha ID not present");
   342                     Alpha ID not present");
       
   343                 setUpCallV1.iAlphaIdCallSetUpPhase.iStatus = 
   335                 setUpCallV1.iAlphaIdCallSetUpPhase.iStatus = 
   344                     RSat::EAlphaIdNotPresent;
   336                     RSat::EAlphaIdNotPresent;
   345                 }  
   337                 }  
   346 
   338 
   347             // First icon for user confirmation phase
   339             // First icon for user confirmation phase
   407                     TSatUtility::RemoveWildAndExpansionDigit( sourceString, 
   399                     TSatUtility::RemoveWildAndExpansionDigit( sourceString, 
   408                         tempNumber );
   400                         tempNumber );
   409                     // Set actual number
   401                     // Set actual number
   410                     setUpCallV1.iAddress.iTelNumber.Copy( tempNumber );
   402                     setUpCallV1.iAddress.iTelNumber.Copy( tempNumber );
   411 
   403 
   412                     TFLOGSTRING2("CSAT: CSatNotifySetUpCall::CompleteNotifyL, \
   404                     OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_11, "CSAT: CSatNotifySetUpCall::CompleteNotifyL, TelNumber: %S", setUpCallV1.iAddress.iTelNumber );
   413                     	TelNumber: %S", &setUpCallV1.iAddress.iTelNumber );
       
   414                     	
   405                     	
   415                     iNotificationsTsy->iSatTsy->StoreProactiveAddress( 
   406                     iNotificationsTsy->iSatTsy->StoreProactiveAddress( 
   416                         &tempNumber );
   407                         &tempNumber );
   417                     }
   408                     }
   418                 }
   409                 }
   419             else
   410             else
   420                 {
   411                 {
   421                 TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL,\
   412                 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_12, "CSAT: CSatNotifySetupCall::CompleteNotifyL, Request not ongoing");
   422                     Request not ongoing");
       
   423                 additionalInfo.Zero();
   413                 additionalInfo.Zero();
   424                 additionalInfo.Append( KNoCause );
   414                 additionalInfo.Append( KNoCause );
   425                 // Request not on, returning response immediately
   415                 // Request not on, returning response immediately
   426                 CreateTerminalRespL( pCmdNumber, RSat::KCmdDataNotUnderstood,
   416                 CreateTerminalRespL( pCmdNumber, RSat::KCmdDataNotUnderstood,
   427                     additionalInfo ); 
   417                     additionalInfo ); 
   439                 {
   429                 {
   440                 // iCapabilityConfigParams is 8-bit string
   430                 // iCapabilityConfigParams is 8-bit string
   441                 setUpCallV1.iCapabilityConfigParams.Append( capabilityConfig.
   431                 setUpCallV1.iCapabilityConfigParams.Append( capabilityConfig.
   442                     GetData( ETLV_CapabilityConfigurationParameters ) );
   432                     GetData( ETLV_CapabilityConfigurationParameters ) );
   443 
   433 
   444                 TFLOGSTRING2("CSAT: CSatNotifySetUpCall::CompleteNotifyL, \
   434                 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_13, "CSAT: CSatNotifySetUpCall::CompleteNotifyL, CapabilityParams: %s", setUpCallV1.iCapabilityConfigParams );
   445                    CapabilityParams: %s", &setUpCallV1.iCapabilityConfigParams );
       
   446                 }
   435                 }
   447 
   436 
   448             // Called Party SubAddress
   437             // Called Party SubAddress
   449             setUpCallV1.iSubAddress.Zero();
   438             setUpCallV1.iSubAddress.Zero();
   450             CTlv subAddress;
   439             CTlv subAddress;
   477 
   466 
   478                     TSatUtility::Copy8to16LE( sourceString, 
   467                     TSatUtility::Copy8to16LE( sourceString, 
   479                         setUpCallV1.iSubAddress );
   468                         setUpCallV1.iSubAddress );
   480                     }
   469                     }
   481                 
   470                 
   482                 TFLOGSTRING2("CSAT: CSatNotifySetUpCall, SubAddress: %S", 
   471                 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_14, "CSAT: CSatNotifySetUpCall, SubAddress: %S", setUpCallV1.iSubAddress );
   483                     &setUpCallV1.iSubAddress );
       
   484                 }
   472                 }
   485 
   473 
   486             // Duration ( optional, maximum duration for the redial mechanism )
   474             // Duration ( optional, maximum duration for the redial mechanism )
   487             CTlv callDuration;
   475             CTlv callDuration;
   488             returnValue = berTlv.TlvByTagValue( &callDuration, 
   476             returnValue = berTlv.TlvByTagValue( &callDuration, 
   509                             RSat::ETenthsOfSeconds;
   497                             RSat::ETenthsOfSeconds;
   510                         break;
   498                         break;
   511                         }
   499                         }
   512                     default:
   500                     default:
   513                         {
   501                         {
   514                         TFLOGSTRING("CSAT: CSatNotifySetupCall::\
   502                         OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_15, "CSAT: CSatNotifySetupCall::CompleteNotifyL, time unit not set");
   515                             CompleteNotifyL, time unit not set");
       
   516                         setUpCallV1.iDuration.iTimeUnit = 
   503                         setUpCallV1.iDuration.iTimeUnit = 
   517                             RSat::ETimeUnitNotSet;
   504                             RSat::ETimeUnitNotSet;
   518                         break;
   505                         break;
   519                         }
   506                         }
   520                     }
   507                     }
   521             
   508             
   522                 // Time interval, valid range 1-255 (0x01 - 0xFF)
   509                 // Time interval, valid range 1-255 (0x01 - 0xFF)
   523                 setUpCallV1.iDuration.iNumOfUnits = 
   510                 setUpCallV1.iDuration.iNumOfUnits = 
   524                     callDuration.GetShortInfo( ETLV_TimeInterval );
   511                     callDuration.GetShortInfo( ETLV_TimeInterval );
   525 
   512 
   526                 TFLOGSTRING("CSAT: CSatNotifySetUpCall::CompleteNotifyL Max \
   513                 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_16, "CSAT: CSatNotifySetUpCall::CompleteNotifyL Max Duration for the Redial Mechanism" );
   527                 	Duration for the Redial Mechanism" );
       
   528 
   514 
   529                 // Check that Time interval value is not invalid
   515                 // Check that Time interval value is not invalid
   530                 if ( NULL == setUpCallV1.iDuration.iNumOfUnits )
   516                 if ( NULL == setUpCallV1.iDuration.iNumOfUnits )
   531                     {
   517                     {
   532                     // Set value to valid range
   518                     // Set value to valid range
   547         	}
   533         	}
   548         iNotificationsTsy->iSatTsy->ReqCompleted( reqHandle, ret );
   534         iNotificationsTsy->iSatTsy->ReqCompleted( reqHandle, ret );
   549         }        
   535         }        
   550     else
   536     else
   551         {
   537         {
   552         TFLOGSTRING("CSAT: CSatNotifySetupCall::CompleteNotifyL,\
   538         OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_COMPLETENOTIFYL_17, "CSAT: CSatNotifySetupCall::CompleteNotifyL, Request not ongoing");
   553             Request not ongoing");
       
   554         additionalInfo.Zero();
   539         additionalInfo.Zero();
   555         additionalInfo.Append( KNoCause );
   540         additionalInfo.Append( KNoCause );
   556         // Request not on, returning response immediately
   541         // Request not on, returning response immediately
   557         CreateTerminalRespL( pCmdNumber, 
   542         CreateTerminalRespL( pCmdNumber, 
   558                 RSat::KMeUnableToProcessCmd,
   543                 RSat::KMeUnableToProcessCmd,
   569 TInt CSatNotifySetUpCall::TerminalResponseL
   554 TInt CSatNotifySetUpCall::TerminalResponseL
   570         ( 
   555         ( 
   571         TDes8* aRsp
   556         TDes8* aRsp
   572         )
   557         )
   573     {
   558     {
   574     TFLOGSTRING("CSAT:CSatNotifySetUpCall::TerminalResponseL");
   559     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_TERMINALRESPONSEL_1, "CSAT:CSatNotifySetUpCall::TerminalResponseL");
   575 
   560 
   576     TInt    ret( KErrNone );
   561     TInt    ret( KErrNone );
   577     TBuf<1> additionalInfo;
   562     TBuf<1> additionalInfo;
   578 
   563 
   579     RSat::TSetUpCallRspV2Pckg* aRspPckg = 
   564     RSat::TSetUpCallRspV2Pckg* aRspPckg = 
   595         && ( RSat::KCmdBeyondMeCapabilities  != rspV2.iGeneralResult )
   580         && ( RSat::KCmdBeyondMeCapabilities  != rspV2.iGeneralResult )
   596         && ( RSat::KSsReturnError != rspV2.iGeneralResult )
   581         && ( RSat::KSsReturnError != rspV2.iGeneralResult )
   597         && ( RSat::KErrorRequiredValuesMissing != rspV2.iGeneralResult ) 
   582         && ( RSat::KErrorRequiredValuesMissing != rspV2.iGeneralResult ) 
   598         && ( RSat::KInteractionWithCCPermanentError != rspV2.iGeneralResult) )
   583         && ( RSat::KInteractionWithCCPermanentError != rspV2.iGeneralResult) )
   599         {
   584         {
   600         TFLOGSTRING("CSAT:CSatNotifySetUpCall::TerminalResponseL,\
   585         OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_TERMINALRESPONSEL_2, "CSAT:CSatNotifySetUpCall::TerminalResponseL, Invalid General Result");
   601             Invalid General Result");
       
   602         // Invalid general result
   586         // Invalid general result
   603         ret = KErrCorrupt;
   587         ret = KErrCorrupt;
   604         }
   588         }
   605 
   589 
   606     // If there is Me (Mobile Entity) error or network error,
   590     // If there is Me (Mobile Entity) error or network error,
   615             additionalInfo.Append( static_cast<TUint8>( 
   599             additionalInfo.Append( static_cast<TUint8>( 
   616                 rspV2.iAdditionalInfo[0] ) );
   600                 rspV2.iAdditionalInfo[0] ) );
   617             }
   601             }
   618         else
   602         else
   619             {
   603             {
   620             TFLOGSTRING("CSAT:CSatNotifySetUpCall::TerminalResponseL,\
   604             OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_TERMINALRESPONSEL_3, "CSAT:CSatNotifySetUpCall::TerminalResponseL, Invalid Additional Info");
   621                 Invalid Additional Info");
       
   622             ret = KErrCorrupt;
   605             ret = KErrCorrupt;
   623             }
   606             }
   624         }
   607         }
   625         
   608         
   626     iNotificationsTsy->iSatTsy->StoreProactiveAddress( NULL );
   609     iNotificationsTsy->iSatTsy->StoreProactiveAddress( NULL );
   665         TUint8  aPCmdNumber,         
   648         TUint8  aPCmdNumber,         
   666         TUint8  aGeneralResult,      
   649         TUint8  aGeneralResult,      
   667         TDesC16& aAdditionalInfo            
   650         TDesC16& aAdditionalInfo            
   668 		)
   651 		)
   669     {
   652     {
   670     TFLOGSTRING("CSAT: CSatNotifySetUpCall::CreateTerminalRespL");    
   653     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_CREATETERMINALRESPL_1, "CSAT: CSatNotifySetUpCall::CreateTerminalRespL");
   671     // Create and append response data
   654     // Create and append response data
   672     TTlv tlvSpecificData;
   655     TTlv tlvSpecificData;
   673     tlvSpecificData.AddTag( KTlvResultTag );
   656     tlvSpecificData.AddTag( KTlvResultTag );
   674     // Result
   657     // Result
   675     tlvSpecificData.AddByte( aGeneralResult );
   658     tlvSpecificData.AddByte( aGeneralResult );
   683             {
   666             {
   684             tlvSpecificData.AddByte( static_cast<TUint8>( aAdditionalInfo[0] ) );
   667             tlvSpecificData.AddByte( static_cast<TUint8>( aAdditionalInfo[0] ) );
   685             }
   668             }
   686         else
   669         else
   687             {
   670             {
   688             TFLOGSTRING( "CSAT: CSatNotifySetUpCall::CreateTerminalRespL \
   671             OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_CREATETERMINALRESPL_2,  "CSAT: CSatNotifySetUpCall::CreateTerminalRespL aAdditionalInfo.Length() == 0" );
   689                 aAdditionalInfo.Length() == 0" ); 
       
   690             }
   672             }
   691         }
   673         }
   692     
   674     
   693      // Prepare data
   675      // Prepare data
   694     iNotificationsTsy->iTerminalRespData.iPCmdNumber = aPCmdNumber;
   676     iNotificationsTsy->iTerminalRespData.iPCmdNumber = aPCmdNumber;
   712 void CSatNotifySetUpCall::StoreCallConnectedEvent
   694 void CSatNotifySetUpCall::StoreCallConnectedEvent
   713         ( 
   695         ( 
   714         const TDesC8& aEnvelope
   696         const TDesC8& aEnvelope
   715         )
   697         )
   716     {
   698     {
   717     TFLOGSTRING("CSAT: CSatNotifySetUpCall::StoreCallConnectedEvent");
   699     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYSETUPCALL_STORECALLCONNECTEDEVENT_1, "CSAT: CSatNotifySetUpCall::StoreCallConnectedEvent");
   718     // Store it to the buffer
   700     // Store it to the buffer
   719     iCallConnectedEvent = aEnvelope;
   701     iCallConnectedEvent = aEnvelope;
   720     } 
   702     } 
   721 
   703 
   722 // End of file
   704 // End of file