telephonyserverplugins/common_tsy/commontsy/src/mmtsy/cmmvoicelinetsy.cpp
branchRCL_3
changeset 65 630d2f34d719
parent 14 7ef16719d8cb
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".
    14 //
    14 //
    15 
    15 
    16 
    16 
    17 
    17 
    18 //INCLUDES
    18 //INCLUDES
       
    19 
       
    20 #include "OstTraceDefinitions.h"
       
    21 #ifdef OST_TRACE_COMPILER_IN_USE
       
    22 #include "cmmvoicelinetsyTraces.h"
       
    23 #endif
       
    24 
    19 #include "cmmvoicelinetsy.h"
    25 #include "cmmvoicelinetsy.h"
    20 #include "cmmphonetsy.h"
    26 #include "cmmphonetsy.h"
    21 #include "cmmvoicecalltsy.h"
    27 #include "cmmvoicecalltsy.h"
    22 #include "cmmcallextinterface.h"
    28 #include "cmmcallextinterface.h"
    23 #include "cmmlinelist.h"
    29 #include "cmmlinelist.h"
    32     {
    38     {
    33     }
    39     }
    34 
    40 
    35 void CMmVoiceLineTsy::ConstructL()
    41 void CMmVoiceLineTsy::ConstructL()
    36     {
    42     {
    37     TFLOGSTRING("TSY: CMmVoiceLineTsy::ConstructL");
    43     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMVOICELINETSY_CONSTRUCTL_1, "TSY: CMmVoiceLineTsy::ConstructL");
    38     CMmLineTsy::ConstructL();
    44     CMmLineTsy::ConstructL();
    39     }
    45     }
    40 
    46 
    41 CMmVoiceLineTsy* CMmVoiceLineTsy::NewL(
    47 CMmVoiceLineTsy* CMmVoiceLineTsy::NewL(
    42     CMmPhoneTsy* aMmPhone,
    48     CMmPhoneTsy* aMmPhone,
    43     RMobilePhone::TMobileService aMode,
    49     RMobilePhone::TMobileService aMode,
    44     const TDesC& aName,
    50     const TDesC& aName,
    45     CMmMessageManagerBase* aMessageManager,
    51     CMmMessageManagerBase* aMessageManager,
    46     MTelephonyAudioControl* aTelephonyAudioControl )
    52     MTelephonyAudioControl* aTelephonyAudioControl )
    47     {
    53     {
    48     TFLOGSTRING2("TSY: CMmVoiceLineTsy::NewL, Voice line %S created", &aName);
    54     OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMVOICELINETSY_NEWL_1, "TSY: CMmVoiceLineTsy::NewL, Voice line %S created", aName);
    49     CMmVoiceLineTsy* mmLineTsy = NULL;
    55     CMmVoiceLineTsy* mmLineTsy = NULL;
    50 
    56 
    51     if ( aMmPhone != NULL && ( aMode == RMobilePhone::EVoiceService 
    57     if ( aMmPhone != NULL && ( aMode == RMobilePhone::EVoiceService 
    52         || aMode == RMobilePhone::EAuxVoiceService ) )
    58         || aMode == RMobilePhone::EAuxVoiceService ) )
    53         {
    59         {
    64     return mmLineTsy;
    70     return mmLineTsy;
    65     }
    71     }
    66 
    72 
    67 CMmVoiceLineTsy::~CMmVoiceLineTsy()
    73 CMmVoiceLineTsy::~CMmVoiceLineTsy()
    68     {
    74     {
    69     TFLOGSTRING2("TSY: CMmVoiceLineTsy::~CMmVoiceLineTsy. Line name: %S", \
    75     OstTraceDefExt1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMVOICELINETSY_DTOR_1, "TSY: CMmVoiceLineTsy::~CMmVoiceLineTsy. Line name: %S", iLineName);
    70         &iLineName);
       
    71     }
    76     }
    72 
    77 
    73 // ---------------------------------------------------------------------------
    78 // ---------------------------------------------------------------------------
    74 // CMmVoiceLineTsy::OpenNewObjectL
    79 // CMmVoiceLineTsy::OpenNewObjectL
    75 // This method creates a new name for a call and opens a new call. This method 
    80 // This method creates a new name for a call and opens a new call. This method 
   255     CCallDataPackage* callDataPackage = 
   260     CCallDataPackage* callDataPackage = 
   256         reinterpret_cast<CCallDataPackage*>(aDataPackage);
   261         reinterpret_cast<CCallDataPackage*>(aDataPackage);
   257 
   262 
   258     callDataPackage->GetCallIdAndMode( callId, callMode ); 
   263     callDataPackage->GetCallIdAndMode( callId, callMode ); 
   259 
   264 
   260     TFLOGSTRING3("TSY: CMmVoiceLineTsy::CompleteNotifyIncomingCall - Line \
   265     OstTraceDefExt2(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMVOICELINETSY_COMPLETENOTIFYINCOMINGCALL_1, "TSY: CMmVoiceLineTsy::CompleteNotifyIncomingCall - Line \name: %S, Call id: %d", iLineName, callId );
   261         name: %S, Call id: %d", &iLineName, callId );
       
   262 
   266 
   263     //reset req handle. Returns the deleted req handle
   267     //reset req handle. Returns the deleted req handle
   264     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( 
   268     TTsyReqHandle reqHandle = iTsyReqHandleStore->ResetTsyReqHandle( 
   265         EMultimodeLineNotifyIncomingCall );
   269         EMultimodeLineNotifyIncomingCall );
   266 
   270 
   334 // ---------------------------------------------------------------------------
   338 // ---------------------------------------------------------------------------
   335 //
   339 //
   336 void CMmVoiceLineTsy::CompleteNotifyDiallingStatus(
   340 void CMmVoiceLineTsy::CompleteNotifyDiallingStatus(
   337     CMmDataPackage* aDataPackage )
   341     CMmDataPackage* aDataPackage )
   338     {
   342     {
   339     TFLOGSTRING("TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus");
   343     OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMVOICELINETSY_COMPLETENOTIFYDIALLINGSTATUS_1, "TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus");
   340     TInt callId( -1 );
   344     TInt callId( -1 );
   341     TBool ghostCall( EFalse );
   345     TBool ghostCall( EFalse );
   342     RMobilePhone::TMobileService callMode( RMobilePhone::EVoiceService );
   346     RMobilePhone::TMobileService callMode( RMobilePhone::EVoiceService );
   343 
   347 
   344     CCallDataPackage* callData = 
   348     CCallDataPackage* callData = 
   349     CMmVoiceCallTsy* mmCall = reinterpret_cast<CMmVoiceCallTsy*>(
   353     CMmVoiceCallTsy* mmCall = reinterpret_cast<CMmVoiceCallTsy*>(
   350         iMmPhone->CallList()->GetMmCallByMode( callMode ) );
   354         iMmPhone->CallList()->GetMmCallByMode( callMode ) );
   351 
   355 
   352     if ( NULL == mmCall )
   356     if ( NULL == mmCall )
   353         {
   357         {
   354         TFLOGSTRING("TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus - \
   358         OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMVOICELINETSY_COMPLETENOTIFYDIALLINGSTATUS_2, "TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus - \GhostCall");
   355             GhostCall");
       
   356         ghostCall = ETrue;
   359         ghostCall = ETrue;
   357         }
   360         }
   358     else
   361     else
   359         {
   362         {
   360         TBool result( EFalse );
   363         TBool result( EFalse );
   378                 CMmCallTsy::EMultimodeMobileCallDialEmergencyCall );
   381                 CMmCallTsy::EMultimodeMobileCallDialEmergencyCall );
   379             }        
   382             }        
   380 
   383 
   381         if ( result || resultNoFdnCheck || resultISV )
   384         if ( result || resultNoFdnCheck || resultISV )
   382             {
   385             {
   383 TFLOGSTRING("TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus - Not Emergency call");
   386 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMVOICELINETSY_COMPLETENOTIFYDIALLINGSTATUS_3, "TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus - Not Emergency call");
   384             for ( TInt i = 0; i < iMmPhone->CallList()->GetNumberOfObjects(); 
   387             for ( TInt i = 0; i < iMmPhone->CallList()->GetNumberOfObjects(); 
   385                       i++ )
   388                       i++ )
   386                 {    
   389                 {    
   387                 mmCall = reinterpret_cast<CMmVoiceCallTsy*>(
   390                 mmCall = reinterpret_cast<CMmVoiceCallTsy*>(
   388                     iMmPhone->CallList()->GetMmCallByIndex(i) );
   391                     iMmPhone->CallList()->GetMmCallByIndex(i) );
   395                         CMmCallTsy::EMultimodeCallDialISV ) ) 
   398                         CMmCallTsy::EMultimodeCallDialISV ) ) 
   396                     || ( mmCall->ServiceRequested(
   399                     || ( mmCall->ServiceRequested(
   397                         CMmCallTsy::EMultimodeCallDialNoFdnCheck ) ) ) )
   400                         CMmCallTsy::EMultimodeCallDialNoFdnCheck ) ) ) )
   398                     {
   401                     {
   399                     mmCall->SetCallId( callId );
   402                     mmCall->SetCallId( callId );
   400 TFLOGSTRING2("TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus - mmCall SetCallId: %d", callId);                      
   403 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMVOICELINETSY_COMPLETENOTIFYDIALLINGSTATUS_4, "TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus - mmCall SetCallId: %d", callId);
   401                     mmCall->CompleteNotifyMobileCallInfoChange( 
   404                     mmCall->CompleteNotifyMobileCallInfoChange( 
   402                                 aDataPackage );
   405                                 aDataPackage );
   403                     break;   
   406                     break;   
   404                     }
   407                     }
   405                 }
   408                 }
   406             }
   409             }
   407         else
   410         else
   408             {
   411             {
   409             TFLOGSTRING("TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus - \
   412             OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CMMVOICELINETSY_COMPLETENOTIFYDIALLINGSTATUS_5, "TSY: CMmVoiceLineTsy::CompleteNotifyDiallingStatus - \Dial not found");
   410                 Dial not found");
       
   411             ghostCall = ETrue;
   413             ghostCall = ETrue;
   412             }
   414             }
   413         }
   415         }
   414     //Ghost call handling starts here
   416     //Ghost call handling starts here
   415     if ( ghostCall )
   417     if ( ghostCall )