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