telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmdatalinetsy.cpp
branchRCL_3
changeset 19 630d2f34d719
parent 0 3553901f7fa8
child 20 07a122eea281
equal deleted inserted replaced
18:17af172ffa5f 19:630d2f34d719
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    14 //
    14 //
    15 
    15 
    16 
    16 
    17 
    17 
    18 //INCLUDE FILES
    18 //INCLUDE FILES
       
    19 
       
    20 #include "OstTraceDefinitions.h"
       
    21 #ifdef OST_TRACE_COMPILER_IN_USE
       
    22 #include "cmmdatalinetsyTraces.h"
       
    23 #endif
       
    24 
    19 #include "cmmdatalinetsy.h"
    25 #include "cmmdatalinetsy.h"
    20 #include "cmmphonetsy.h"
    26 #include "cmmphonetsy.h"
    21 #include "cmmdatacalltsy.h"
    27 #include "cmmdatacalltsy.h"
    22 #include "cmmcallextinterface.h"
    28 #include "cmmcallextinterface.h"
    23 #include "cmmlinelist.h"
    29 #include "cmmlinelist.h"
    35     }
    41     }
    36 
    42 
    37 
    43 
    38 void CMmDataLineTsy::ConstructL()
    44 void CMmDataLineTsy::ConstructL()
    39     {
    45     {
    40 TFLOGSTRING("TSY: CMmDataLineTsy::ConstructL");
    46 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDATALINETSY_CONSTRUCTL_1, "TSY: CMmDataLineTsy::ConstructL");
    41 
    47 
    42     CMmLineTsy::ConstructL();
    48     CMmLineTsy::ConstructL();
    43     }
    49     }
    44 
    50 
    45 CMmDataLineTsy* CMmDataLineTsy::NewL(
    51 CMmDataLineTsy* CMmDataLineTsy::NewL(
    46     CMmPhoneTsy* aMmPhone,
    52     CMmPhoneTsy* aMmPhone,
    47     RMobilePhone::TMobileService aMode,
    53     RMobilePhone::TMobileService aMode,
    48     const TDesC& aName,
    54     const TDesC& aName,
    49     CMmMessageManagerBase* aMessageManager )
    55     CMmMessageManagerBase* aMessageManager )
    50     {
    56     {
    51 TFLOGSTRING2("TSY: CMmDataLineTsy::NewL - Data line %S created", &aName);
    57 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDATALINETSY_NEWL_1, "TSY: CMmDataLineTsy::NewL - Data line %S created", aName);
    52     CMmDataLineTsy* mmLineTsy = NULL;
    58     CMmDataLineTsy* mmLineTsy = NULL;
    53 
    59 
    54     if ( NULL != aMmPhone && RMobilePhone::ECircuitDataService == aMode )
    60     if ( NULL != aMmPhone && RMobilePhone::ECircuitDataService == aMode )
    55         {
    61         {
    56         mmLineTsy = new ( ELeave ) CMmDataLineTsy();
    62         mmLineTsy = new ( ELeave ) CMmDataLineTsy();
    67     return mmLineTsy;
    73     return mmLineTsy;
    68     }
    74     }
    69 
    75 
    70 CMmDataLineTsy::~CMmDataLineTsy()
    76 CMmDataLineTsy::~CMmDataLineTsy()
    71     {
    77     {
    72 TFLOGSTRING2("TSY: CMmDataLineTsy::~CMmDataLineTsy - Line name: %S",
    78 OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDATALINETSY_DTOR_1, "TSY: CMmDataLineTsy::~CMmDataLineTsy - Line name: %S",iLineName);
    73     &iLineName);
       
    74 
    79 
    75     }
    80     }
    76 
    81 
    77 // ---------------------------------------------------------------------------
    82 // ---------------------------------------------------------------------------
    78 // CMmDataLineTsy::OpenNewObjectL
    83 // CMmDataLineTsy::OpenNewObjectL
   250 
   255 
   251     CCallDataPackage* callDataPackage =
   256     CCallDataPackage* callDataPackage =
   252         reinterpret_cast<CCallDataPackage*>(aDataPackage);
   257         reinterpret_cast<CCallDataPackage*>(aDataPackage);
   253     callDataPackage->GetCallIdAndMode( callId, callMode ); 
   258     callDataPackage->GetCallIdAndMode( callId, callMode ); 
   254 
   259 
   255 TFLOGSTRING3("TSY: CMmDataLineTsy::CompleteNotifyIncomingCall - \
   260 OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDATALINETSY_COMPLETENOTIFYINCOMINGCALL_1, "TSY: CMmDataLineTsy::CompleteNotifyIncomingCall - \Line name: %S, Call id: %d", iLineName, callId );
   256     Line name: %S, Call id: %d", &iLineName, callId );
       
   257 
   261 
   258     //reset req handle. Returns the deleted req handle
   262     //reset req handle. Returns the deleted req handle
   259     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( 
   263     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( 
   260         EMultimodeLineNotifyIncomingCall );
   264         EMultimodeLineNotifyIncomingCall );
   261 
   265 
   417 // ---------------------------------------------------------------------------
   421 // ---------------------------------------------------------------------------
   418 //
   422 //
   419 void CMmDataLineTsy::CompleteNotifyDiallingStatus(
   423 void CMmDataLineTsy::CompleteNotifyDiallingStatus(
   420     CMmDataPackage* aDataPackage )
   424     CMmDataPackage* aDataPackage )
   421     {
   425     {
   422 TFLOGSTRING("TSY: CMmDataLineTsy::CompleteNotifyDiallingStatus");
   426 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDATALINETSY_COMPLETENOTIFYDIALLINGSTATUS_1, "TSY: CMmDataLineTsy::CompleteNotifyDiallingStatus");
   423 
   427 
   424     TInt callId( -1 );
   428     TInt callId( -1 );
   425     TBool ghostCall( EFalse );
   429     TBool ghostCall( EFalse );
   426     RMobilePhone::TMobileService callMode( 
   430     RMobilePhone::TMobileService callMode( 
   427                                       RMobilePhone::ECircuitDataService );
   431                                       RMobilePhone::ECircuitDataService );
   434     CMmDataCallTsy* mmCall = reinterpret_cast<CMmDataCallTsy*>(
   438     CMmDataCallTsy* mmCall = reinterpret_cast<CMmDataCallTsy*>(
   435         iMmPhone->CallList()->GetMmCallByMode( callMode ) );
   439         iMmPhone->CallList()->GetMmCallByMode( callMode ) );
   436 
   440 
   437     if ( NULL == mmCall )
   441     if ( NULL == mmCall )
   438         {
   442         {
   439         TFLOGSTRING("TSY: CMmDataLineTsy::CompleteNotifyDiallingStatus - \
   443         OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDATALINETSY_COMPLETENOTIFYDIALLINGSTATUS_2, "TSY: CMmDataLineTsy::CompleteNotifyDiallingStatus - \GhostCall");
   440             GhostCall");
       
   441         ghostCall = ETrue;
   444         ghostCall = ETrue;
   442         }
   445         }
   443     else
   446     else
   444         {
   447         {
   445         TBool result( EFalse );
   448         TBool result( EFalse );
   451 
   454 
   452         //now we have to check, if this is a ghost call
   455         //now we have to check, if this is a ghost call
   453         resultNoFdnCheck = mmCall->IsServiceLocallyRequested( 
   456         resultNoFdnCheck = mmCall->IsServiceLocallyRequested( 
   454             CMmCallTsy::EMultimodeCallDialNoFdnCheck );
   457             CMmCallTsy::EMultimodeCallDialNoFdnCheck );
   455 
   458 
   456 TFLOGSTRING2("TSY: CMmDataLineTsy::CompleteNotifyDiallingStatus - IsDial: %d", result );  
   459 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDATALINETSY_COMPLETENOTIFYDIALLINGSTATUS_3, "TSY: CMmDataLineTsy::CompleteNotifyDiallingStatus - IsDial: %d", result );
   457 TFLOGSTRING2("TSY: CMmDataLineTsy::CompleteNotifyDiallingStatus - IsDialNoFdnCheck: %d", resultNoFdnCheck );  
   460 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDATALINETSY_COMPLETENOTIFYDIALLINGSTATUS_4, "TSY: CMmDataLineTsy::CompleteNotifyDiallingStatus - IsDialNoFdnCheck: %d", resultNoFdnCheck );
   458 
   461 
   459         if ( result || resultNoFdnCheck )
   462         if ( result || resultNoFdnCheck )
   460             {
   463             {
   461             for ( TInt i = 0; i < iMmPhone->CallList()->
   464             for ( TInt i = 0; i < iMmPhone->CallList()->
   462                                                 GetNumberOfObjects(); i++ )
   465                                                 GetNumberOfObjects(); i++ )
   468                         CMmCallTsy::EMultimodeCallDial ) )
   471                         CMmCallTsy::EMultimodeCallDial ) )
   469                     || ( mmCall->ServiceRequested(
   472                     || ( mmCall->ServiceRequested(
   470                         CMmCallTsy::EMultimodeCallDialNoFdnCheck ) ) )
   473                         CMmCallTsy::EMultimodeCallDialNoFdnCheck ) ) )
   471                     {
   474                     {
   472                     mmCall->SetCallId( callId );
   475                     mmCall->SetCallId( callId );
   473 TFLOGSTRING2("TSY: CMmDataLineTsy::CompleteNotifyDiallingStatus - mmCall SetCallId: %d", callId);                           
   476 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDATALINETSY_COMPLETENOTIFYDIALLINGSTATUS_5, "TSY: CMmDataLineTsy::CompleteNotifyDiallingStatus - mmCall SetCallId: %d", callId);
   474                     mmCall->CompleteNotifyMobileCallInfoChange( 
   477                     mmCall->CompleteNotifyMobileCallInfoChange( 
   475                                 aDataPackage );
   478                                 aDataPackage );
   476                     break;
   479                     break;
   477                     }
   480                     }
   478                 }
   481                 }
   479             }
   482             }
   480         else
   483         else
   481             {
   484             {
   482 TFLOGSTRING("TSY: CMmDataLineTsy::CompleteNotifyDiallingStatus - Dial not found");
   485 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDATALINETSY_COMPLETENOTIFYDIALLINGSTATUS_6, "TSY: CMmDataLineTsy::CompleteNotifyDiallingStatus - Dial not found");
   483             ghostCall = ETrue;
   486             ghostCall = ETrue;
   484             }
   487             }
   485         }
   488         }
   486     //Ghost call handling starts here
   489     //Ghost call handling starts here
   487     if ( ghostCall )
   490     if ( ghostCall )
   488         {
   491         {
   489 TFLOGSTRING("TSY: CMmDataLineTsy::CompleteNotifyDiallingStatus -> CompleteNotifyAddBypassingCall");        
   492 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMDATALINETSY_COMPLETENOTIFYDIALLINGSTATUS_7, "TSY: CMmDataLineTsy::CompleteNotifyDiallingStatus -> CompleteNotifyAddBypassingCall");
   490         //complete call added notification directly from here
   493         //complete call added notification directly from here
   491         CompleteNotifyAddBypassingCall( aDataPackage ); 
   494         CompleteNotifyAddBypassingCall( aDataPackage ); 
   492         }
   495         }
   493     }
   496     }
   494 
   497