phoneapp/phoneuicontrol/src/cphonestateincall.cpp
branchRCL_3
changeset 14 24062c24fe38
parent 9 8871b09be73b
child 19 544e34b3255a
equal deleted inserted replaced
9:8871b09be73b 14:24062c24fe38
     1 /*
     1 /*
     2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    24 #include <UikonInternalPSKeys.h>
    24 #include <UikonInternalPSKeys.h>
    25 #include <mpeengineinfo.h>
    25 #include <mpeengineinfo.h>
    26 #include <videotelcontrolmediatorapi.h>
    26 #include <videotelcontrolmediatorapi.h>
    27 #include <MediatorDomainUIDs.h>
    27 #include <MediatorDomainUIDs.h>
    28 #include <bldvariant.hrh>
    28 #include <bldvariant.hrh>
       
    29 #include <coreapplicationuisdomainpskeys.h>
    29 
    30 
    30 #include "cphonestateincall.h"
    31 #include "cphonestateincall.h"
    31 #include "tphonecmdparamboolean.h"
    32 #include "tphonecmdparamboolean.h"
    32 #include "tphonecmdparaminteger.h"
    33 #include "tphonecmdparaminteger.h"
    33 #include "tphonecmdparamstring.h"
    34 #include "tphonecmdparamstring.h"
    74 // (other items were commented in a header).
    75 // (other items were commented in a header).
    75 // -----------------------------------------------------------
    76 // -----------------------------------------------------------
    76 //
    77 //
    77 EXPORT_C CPhoneStateInCall::~CPhoneStateInCall()
    78 EXPORT_C CPhoneStateInCall::~CPhoneStateInCall()
    78     {
    79     {
    79     if( iDtmfWaitCharTimer )
    80     delete iDtmfWaitCharTimer;            
    80         {
       
    81         delete iDtmfWaitCharTimer;            
       
    82         }
       
    83     }
    81     }
    84 
    82 
    85 // -----------------------------------------------------------
    83 // -----------------------------------------------------------
    86 // CPhoneStateInCall::ConstructL()
    84 // CPhoneStateInCall::ConstructL()
    87 // Constructor
    85 // Constructor
   304     BeginTransEffectLC( ENumberEntryOpen );  
   302     BeginTransEffectLC( ENumberEntryOpen );  
   305     BeginUiUpdateLC();
   303     BeginUiUpdateLC();
   306     SetDefaultFlagsL();
   304     SetDefaultFlagsL();
   307     if ( IsNumberEntryUsedL() )
   305     if ( IsNumberEntryUsedL() )
   308         {
   306         {
   309         // Show the number entry if it exists and update cba's.
   307         if ( NeedToReturnToForegroundAppL() )
   310         SetNumberEntryVisibilityL( ETrue );
   308             {
   311         
   309             // Return phone to the background if menu application is needed to foreground.
   312         // Close dtmf dialer when call is disconnected.
   310             iViewCommandHandle->ExecuteCommandL( EPhoneViewSendToBackground );
   313         if ( IsDTMFEditorVisibleL() )
   311     
   314             {      
   312             iViewCommandHandle->ExecuteCommandL( EPhoneViewSetControlAndVisibility );
   315             CloseDTMFEditorL();
   313     
   316             
   314             // Set Number Entry CBA
   317             // Display idle screen and update CBA's
   315             iCbaManager->SetCbaL( EPhoneNumberAcqCBA );
   318             DisplayIdleScreenL();
   316             }
   319             }
   317         else
   320         else if ( iOnScreenDialer && IsCustomizedDialerVisibleL() )
   318             {
   321             {            
   319             // Show the number entry if it exists and update cba's.
   322             CloseCustomizedDialerL();
   320             SetNumberEntryVisibilityL( ETrue );
   323             // Display idle screen and update CBA's
   321             
   324             DisplayIdleScreenL();
   322             // Close dtmf dialer when call is disconnected.
   325             }          
   323             if ( IsDTMFEditorVisibleL() )
       
   324                 {      
       
   325                 CloseDTMFEditorL();
       
   326                 
       
   327                 // Display idle screen and update CBA's
       
   328                 DisplayIdleScreenL();
       
   329                 }
       
   330             else if ( iOnScreenDialer && IsCustomizedDialerVisibleL() )
       
   331                 {            
       
   332                 CloseCustomizedDialerL();
       
   333                 // Display idle screen and update CBA's
       
   334                 DisplayIdleScreenL();
       
   335                 } 
       
   336             }
   326         }
   337         }
   327     else
   338     else
   328         {
   339         {
   329         // Close menu bar, if it is displayed
   340         // Close menu bar, if it is displayed
   330         iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   341         iViewCommandHandle->ExecuteCommandL( EPhoneViewMenuBarClose );
   331         
   342         
   332         if ( !TopAppIsDisplayedL() || IsAutoLockOn() )
   343         if ( !TopAppIsDisplayedL() || IsAutoLockOn() || NeedToReturnToForegroundAppL() )
   333             {        
   344             {        
   334             // Continue displaying current app but set up the 
   345             // Continue displaying current app but set up the 
   335             // idle screen in the background
   346             // idle screen in the background
   336             SetupIdleScreenInBackgroundL();
   347             SetupIdleScreenInBackgroundL();
   337             }
   348             }
   367 // -----------------------------------------------------------
   378 // -----------------------------------------------------------
   368 //
   379 //
   369 EXPORT_C void CPhoneStateInCall::UpdateCbaL( TInt aResource )
   380 EXPORT_C void CPhoneStateInCall::UpdateCbaL( TInt aResource )
   370     {
   381     {
   371     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateInCall::UpdateCbaL() ");
   382     __LOGMETHODSTARTEND(EPhoneControl, "CPhoneStateInCall::UpdateCbaL() ");
   372     if ( iOnScreenDialer && IsDTMFEditorVisibleL() )
   383     if ( iOnScreenDialer && IsNumberEntryVisibleL() && IsDTMFEditorVisibleL() )
   373         {
   384         {
   374         iCbaManager->SetCbaL( EPhoneDtmfDialerCBA );        
   385         iCbaManager->SetCbaL( EPhoneDtmfDialerCBA );        
   375         }
   386         }
   376     else if ( iOnScreenDialer && IsCustomizedDialerVisibleL() )
   387     else if ( iOnScreenDialer && IsNumberEntryVisibleL() && IsCustomizedDialerVisibleL() )
   377         {
   388         {
   378         iCbaManager->SetCbaL( CustomizedDialerCbaResourceIdL() );
   389         iCbaManager->SetCbaL( CustomizedDialerCbaResourceIdL() );
   379         }
   390         }
   380     else
   391     else
   381         {
   392         {
   815                 HandleNumberEntryClearedL();
   826                 HandleNumberEntryClearedL();
   816                 }
   827                 }
   817             commandStatus = CPhoneState::HandleCommandL( aCommand );        
   828             commandStatus = CPhoneState::HandleCommandL( aCommand );        
   818             break;
   829             break;
   819  
   830  
       
   831         case EPhoneInCallCmdShareLiveVideo:
       
   832             iViewCommandHandle->ExecuteCommandL( EPhoneViewLaunchMultimediaSharing );
       
   833             break;
       
   834 
   820        default:
   835        default:
   821             commandStatus = CPhoneState::HandleCommandL( aCommand );
   836             commandStatus = CPhoneState::HandleCommandL( aCommand );
   822             break;
   837             break;
   823         }
   838         }
   824 
   839 
  1289         __ASSERT_DEBUG( EFalse, Panic( EPhoneCtrlIndexOutOfBounds ) );
  1304         __ASSERT_DEBUG( EFalse, Panic( EPhoneCtrlIndexOutOfBounds ) );
  1290         }       
  1305         }       
  1291     }
  1306     }
  1292 
  1307 
  1293 // -----------------------------------------------------------------------------
  1308 // -----------------------------------------------------------------------------
  1294 // CPhoneStateInCall::LockKeysL
  1309 // CPhoneStateInCall::LockKeypadL
  1295 // -----------------------------------------------------------------------------
  1310 // -----------------------------------------------------------------------------
  1296 //
  1311 //
  1297 void CPhoneStateInCall::LockKeypadL()
  1312 void CPhoneStateInCall::LockKeypadL()
  1298     {
  1313     {
  1299     __LOGMETHODSTARTEND(EPhoneControl, 
  1314     __LOGMETHODSTARTEND(EPhoneControl, 
  1598     // Display dialog        
  1613     // Display dialog        
  1599     iViewCommandHandle->ExecuteCommandL( EPhoneViewShowQuery,
  1614     iViewCommandHandle->ExecuteCommandL( EPhoneViewShowQuery,
  1600         &queryDialogParam );    
  1615         &queryDialogParam );    
  1601     }
  1616     }
  1602   
  1617   
       
  1618 // -----------------------------------------------------------------------------
       
  1619 // CPhoneStateInCall::HandlePropertyChangedL
       
  1620 // from CPhoneState
       
  1621 // -----------------------------------------------------------------------------
       
  1622 //  
       
  1623 EXPORT_C void CPhoneStateInCall::HandlePropertyChangedL(
       
  1624         const TUid& aCategory, const TUint aKey, const TInt aValue)
       
  1625     {
       
  1626     if ( aCategory == KPSUidCoreApplicationUIs &&
       
  1627          aKey == KCoreAppUIsVideoSharingIndicator )
       
  1628         {
       
  1629         if ( aValue == ECoreAppUIsVideoSharingIndicatorOn )
       
  1630             {
       
  1631             SetTouchPaneButtons( EPhoneIncallVideoShareButtons );
       
  1632             }
       
  1633         else
       
  1634             {
       
  1635             SetTouchPaneButtons( EPhoneIncallButtons );
       
  1636             }
       
  1637         }
       
  1638     else
       
  1639         {
       
  1640         CPhoneState::HandlePropertyChangedL( aCategory, aKey, aValue );
       
  1641         }
       
  1642     }
       
  1643 
  1603 // End of File
  1644 // End of File