vtuis/videotelui/src/CVtUiAppUi.cpp
branchRCL_3
changeset 13 392fdfb57a78
parent 12 3e521e99f813
child 14 856ae1b15d98
equal deleted inserted replaced
12:3e521e99f813 13:392fdfb57a78
    69 #include    <settingsinternalcrkeys.h>
    69 #include    <settingsinternalcrkeys.h>
    70 #include    <e32property.h>
    70 #include    <e32property.h>
    71 #include    <telcommsinfopskeys.h>
    71 #include    <telcommsinfopskeys.h>
    72 #include    <telinformationpskeys.h>
    72 #include    <telinformationpskeys.h>
    73 #include    <activeidle2domainpskeys.h>
    73 #include    <activeidle2domainpskeys.h>
    74 #include 	<ctsydomainpskeys.h>
    74 #include     <ctsydomainpskeys.h>
    75 
    75 
    76 #include    <AknQueryDialog.h>
    76 #include    <AknQueryDialog.h>
    77 #include 	<AknGlobalNote.h>
    77 #include     <AknGlobalNote.h>
    78 #include 	<aknsoundsystem.h>
    78 #include     <aknsoundsystem.h>
    79 
    79 
    80 
    80 
    81 #include    <cvtlogger.h>
    81 #include    <cvtlogger.h>
    82 #include    <cvtengmodel.h>
    82 #include    <cvtengmodel.h>
    83 #include    <mvtengeventobserver.h>
    83 #include    <mvtengeventobserver.h>
   110 #include    <remconinterfaceselector.h>
   110 #include    <remconinterfaceselector.h>
   111 #include    <remconcoreapitarget.h>
   111 #include    <remconcoreapitarget.h>
   112 #include    <remconcoreapitargetobserver.h>
   112 #include    <remconcoreapitargetobserver.h>
   113 #include    "tvtuiwsevent.h"
   113 #include    "tvtuiwsevent.h"
   114 #include    "mvtuinumbersource.h"
   114 #include    "mvtuinumbersource.h"
   115 #include	"tVtuifeaturevariation.h"
   115 #include    "tVtuifeaturevariation.h"
   116 #include    "cvtuidialer.h"
   116 #include    "cvtuidialer.h"
   117 #include    "tvtuiappstates.h"
   117 #include    "tvtuiappstates.h"
   118 #include    "cvtuivolume.h"
   118 #include    "cvtuivolume.h"
   119 #include    "cvtuizoom.h"
   119 #include    "cvtuizoom.h"
   120 #include    "cvtuivolumecontrol.h"
   120 #include    "cvtuivolumecontrol.h"
   152 const TUid KVtUiTelephoneUid = { 0x100058B3 };
   152 const TUid KVtUiTelephoneUid = { 0x100058B3 };
   153 
   153 
   154 // Reset value for volume
   154 // Reset value for volume
   155 const TInt  KVolumeResetValue = -1;
   155 const TInt  KVolumeResetValue = -1;
   156 
   156 
       
   157 // Remote video control normal priority
       
   158 const TInt KVtUiRemoteVideoControlOrdinalPriNormal = 0;
       
   159 
       
   160 // Remote video control high priority
       
   161 const TInt KVtUiRemoteVideoControlOrdinalPriHigh = 2;
   157 
   162 
   158 // Name of the EIKON server window group.
   163 // Name of the EIKON server window group.
   159 _LIT( KVtUiEikonServer, "EikonServer" );
   164 _LIT( KVtUiEikonServer, "EikonServer" );
   160 
   165 
   161 // Name of the AknCapServer window group.
   166 // Name of the AknCapServer window group.
   214     // refresh Menu
   219     // refresh Menu
   215     EVtUiRefreshMenu =                      1 << 14,
   220     EVtUiRefreshMenu =                      1 << 14,
   216     // Stop brightness and contrast slider
   221     // Stop brightness and contrast slider
   217     EVtUiStopBrightnessOrContrast =         1 << 15,
   222     EVtUiStopBrightnessOrContrast =         1 << 15,
   218     // refresh zoom popup
   223     // refresh zoom popup
   219     EVtUiRefreshZoomPopup =       					1 << 16
   224     EVtUiRefreshZoomPopup =                           1 << 16
   220     };
   225     };
   221 
   226 
   222 // Enumerates states for CVtUiActiveExec.
   227 // Enumerates states for CVtUiActiveExec.
   223 enum
   228 enum
   224     {
   229     {
   763     public CBase,
   768     public CBase,
   764     public MMGFetchVerifier
   769     public MMGFetchVerifier
   765     {
   770     {
   766     public:
   771     public:
   767 
   772 
   768     		/**
   773             /**
   769     		* Static constructor, pushes created instance into cleanup stack.
   774             * Static constructor, pushes created instance into cleanup stack.
   770     		*/
   775             */
   771         static CVtUiAppUiMGVerifier* NewLC(
   776         static CVtUiAppUiMGVerifier* NewLC(
   772             CVtUiAppUi& aAppUi, CCoeEnv& aCoeEnv );
   777             CVtUiAppUi& aAppUi, CCoeEnv& aCoeEnv );
   773 
   778 
   774     		/**
   779             /**
   775     		* Destructor.
   780             * Destructor.
   776     		*/
   781             */
   777         ~CVtUiAppUiMGVerifier();
   782         ~CVtUiAppUiMGVerifier();
   778 
   783 
   779     public: // from MMGFetchVerifier
   784     public: // from MMGFetchVerifier
   780 
   785 
   781         /**
   786         /**
   782     		* @see MMGFetchVerifier::VerifySelectionL
   787             * @see MMGFetchVerifier::VerifySelectionL
   783     		*/
   788             */
   784         TBool VerifySelectionL( const MDesCArray* aSelectedFiles );
   789         TBool VerifySelectionL( const MDesCArray* aSelectedFiles );
   785 
   790 
   786     private:
   791     private:
   787 
   792 
   788     		/**
   793             /**
   789     		* 2nd constructor in two phase construction.
   794             * 2nd constructor in two phase construction.
   790     		*/
   795             */
   791         void ConstructL();
   796         void ConstructL();
   792 
   797 
   793         /**
   798         /**
   794     		* Constructor.
   799             * Constructor.
   795     		*/
   800             */
   796         CVtUiAppUiMGVerifier( CVtUiAppUi& aAppUi, CCoeEnv& aCoeEnv );
   801         CVtUiAppUiMGVerifier( CVtUiAppUi& aAppUi, CCoeEnv& aCoeEnv );
   797 
   802 
   798     private:
   803     private:
   799 
   804 
   800         // Reference to Application UI
   805         // Reference to Application UI
   843     iVTVariation.ReadL();
   848     iVTVariation.ReadL();
   844 
   849 
   845     iEventObserver = CEventObserver::NewL( *this );
   850     iEventObserver = CEventObserver::NewL( *this );
   846     iUiStates = new ( ELeave ) TVtUiStates( iEventObserver->Model() );
   851     iUiStates = new ( ELeave ) TVtUiStates( iEventObserver->Model() );
   847     iUiStates->Update();
   852     iUiStates->Update();
   848 		iUiStates->SetViewFindersInitialPlaceContextPane( ETrue );
   853         iUiStates->SetViewFindersInitialPlaceContextPane( ETrue );
   849 		
   854         
   850     TVtUiAppStateBase::SetInitialStateL( *this, *iUiStates );
   855     TVtUiAppStateBase::SetInitialStateL( *this, *iUiStates );
   851 
   856 
   852     iCommandManager = CVtUiCommandManager::NewL( *iUiStates, *this );
   857     iCommandManager = CVtUiCommandManager::NewL( *iUiStates, *this );
   853 
   858 
   854     iComponentManager = CVtUiComponentManager::NewL();
   859     iComponentManager = CVtUiComponentManager::NewL();
   869 
   874 
   870     iThisApplicationWgId = eikEnv.RootWin().Identifier();
   875     iThisApplicationWgId = eikEnv.RootWin().Identifier();
   871     iEikonServerWgId =
   876     iEikonServerWgId =
   872         eikEnv.WsSession().FindWindowGroupIdentifier( 0, KVtUiEikonServer );
   877         eikEnv.WsSession().FindWindowGroupIdentifier( 0, KVtUiEikonServer );
   873     iAknCapServerWgId =
   878     iAknCapServerWgId =
   874     	eikEnv.WsSession().FindWindowGroupIdentifier( 0, KVtUiAknCapServer );
   879         eikEnv.WsSession().FindWindowGroupIdentifier( 0, KVtUiAknCapServer );
   875     iAknNfyServerWgId =
   880     iAknNfyServerWgId =
   876         eikEnv.WsSession().FindWindowGroupIdentifier( 0,
   881         eikEnv.WsSession().FindWindowGroupIdentifier( 0,
   877             KVtUiAknNotifierServer );
   882             KVtUiAknNotifierServer );
   878 
   883 
   879     __ASSERT_ALWAYS(
   884     __ASSERT_ALWAYS(
  1027         {
  1032         {
  1028         if ( isStatusPaneFlat && VtUiLayout::IsLandscapeOrientation() )
  1033         if ( isStatusPaneFlat && VtUiLayout::IsLandscapeOrientation() )
  1029             {
  1034             {
  1030             __VTPRINT( DEBUG_GEN,
  1035             __VTPRINT( DEBUG_GEN,
  1031                 "VtUi.SwitchLayoutToFlatStatusPaneL LAYOUT USUAL" );
  1036                 "VtUi.SwitchLayoutToFlatStatusPaneL LAYOUT USUAL" );
  1032 //            NaviPaneL()->Pop();
       
  1033             statusPane->SwitchLayoutL( idleResId );
  1037             statusPane->SwitchLayoutL( idleResId );
  1034             }
  1038             }
  1035         else if ( !isStatusPaneFlat && !VtUiLayout::IsLandscapeOrientation() )
  1039         else if ( !isStatusPaneFlat && !VtUiLayout::IsLandscapeOrientation() )
  1036             {
  1040             {
  1037             __VTPRINT( DEBUG_GEN,
  1041             __VTPRINT( DEBUG_GEN,
  1038                 "VtUi.SwitchLayoutToFlatStatusPaneL USUAL FLAT" );
  1042                 "VtUi.SwitchLayoutToFlatStatusPaneL USUAL FLAT" );
  1039 //            NaviPaneL()->PushDefaultL();
       
  1040             statusPane->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT );
  1043             statusPane->SwitchLayoutL( R_AVKON_STATUS_PANE_LAYOUT_USUAL_FLAT );
  1041             }
  1044             }
  1042         }
  1045         }
  1043     else
  1046     else
  1044         {
  1047         {
  1045         if ( isStatusPaneFlat )
  1048         if ( isStatusPaneFlat )
  1046             {
  1049             {
  1047             __VTPRINT( DEBUG_GEN,
  1050             __VTPRINT( DEBUG_GEN,
  1048                 "VtUi.SwitchLayoutToFlatStatusPaneL LAYOUT IDLE" );
  1051                 "VtUi.SwitchLayoutToFlatStatusPaneL LAYOUT IDLE" );
  1049 //            NaviPaneL()->Pop();
       
  1050             statusPane->SwitchLayoutL( idleResId );
  1052             statusPane->SwitchLayoutL( idleResId );
  1051             }
  1053             }
  1052         }
  1054         }
  1053     // ApplyCurrentSettingsL is called whenever statuspane
  1055     // ApplyCurrentSettingsL is called whenever statuspane
  1054     // visibility status or pane layout changes.
  1056     // visibility status or pane layout changes.
  1564     CleanupDeletePushL( allWgIds );
  1566     CleanupDeletePushL( allWgIds );
  1565     CleanupClosePushL( *allWgIds );
  1567     CleanupClosePushL( *allWgIds );
  1566 
  1568 
  1567     User::LeaveIfError( ws.WindowGroupList( 0, allWgIds) );
  1569     User::LeaveIfError( ws.WindowGroupList( 0, allWgIds) );
  1568 
  1570 
  1569 	const TInt chainCount = allWgIds->Count();
  1571     const TInt chainCount = allWgIds->Count();
  1570 	
  1572     
  1571 	RApaLsSession appArcSession;
  1573     RApaLsSession appArcSession;
  1572 	User::LeaveIfError( appArcSession.Connect() );
  1574     User::LeaveIfError( appArcSession.Connect() );
  1573 
  1575 
  1574 	appArcSession.GetAllApps();
  1576     appArcSession.GetAllApps();
  1575 
  1577 
  1576     CApaWindowGroupName* windowName;
  1578     CApaWindowGroupName* windowName;
  1577     TInt firstAppWgId = KErrNone;
  1579     TInt firstAppWgId = KErrNone;
  1578     for ( TInt index=0; index < chainCount; index++ )
  1580     for ( TInt index=0; index < chainCount; index++ )
  1579         {
  1581         {
  1599                 }
  1601                 }
  1600 
  1602 
  1601             CleanupStack::PopAndDestroy();  //windowName
  1603             CleanupStack::PopAndDestroy();  //windowName
  1602             }
  1604             }
  1603         }
  1605         }
       
  1606     CleanupStack::PopAndDestroy( 2 ); // allWgIds, *allWgIds
       
  1607     
  1604     __VTPRINTEXIT( "VtUi.GetFocusWindowGroupId" )
  1608     __VTPRINTEXIT( "VtUi.GetFocusWindowGroupId" )
  1605     return firstAppWgId;
  1609     return firstAppWgId;
  1606     }
  1610     }
  1607 
  1611 
  1608 
  1612 
  1831     MVtUiVideoWindow* aNewDownlink )
  1835     MVtUiVideoWindow* aNewDownlink )
  1832     {
  1836     {
  1833     __VTPRINTENTER( "VtUi.SetRenderingModeL" )
  1837     __VTPRINTENTER( "VtUi.SetRenderingModeL" )
  1834     __VTPRINT2( DEBUG_GEN, "VtUi.SetRenderingModeL=%d", aMode );
  1838     __VTPRINT2( DEBUG_GEN, "VtUi.SetRenderingModeL=%d", aMode );
  1835     iRenderingMode = aMode;
  1839     iRenderingMode = aMode;
       
  1840     
       
  1841     TInt pos = 
       
  1842         iInstance->iRemoteVideoControl->DrawableWindow()->OrdinalPosition();
       
  1843     if ( aMode == ERenderingModeDialer )
       
  1844         {
       
  1845         // Remote video control has the highest priority in dialer
       
  1846         iInstance->iRemoteVideoControl->DrawableWindow()->SetOrdinalPosition( 
       
  1847                 pos, KVtUiRemoteVideoControlOrdinalPriHigh );
       
  1848         }
       
  1849     else 
       
  1850         {
       
  1851         // Set remote video control priority back to normal
       
  1852         iInstance->iRemoteVideoControl->DrawableWindow()->SetOrdinalPosition( 
       
  1853                 pos, KVtUiRemoteVideoControlOrdinalPriNormal );
       
  1854         }
       
  1855     
  1836     if ( aNewDownlink )
  1856     if ( aNewDownlink )
  1837         {
  1857         {
  1838         if ( iDownlinkWindow != aNewDownlink )
  1858         if ( iDownlinkWindow != aNewDownlink )
  1839             {
  1859             {
  1840             iStoredDownlinkWindow = iDownlinkWindow;
  1860             iStoredDownlinkWindow = iDownlinkWindow;
  2156 
  2176 
  2157         case EVtUiCmdEnableVideo:
  2177         case EVtUiCmdEnableVideo:
  2158             {
  2178             {
  2159             MVtEngMedia::TShareObjectState shareObjectState;
  2179             MVtEngMedia::TShareObjectState shareObjectState;
  2160             VtUiUtility::GetObjectSharingState( Model().Media(),
  2180             VtUiUtility::GetObjectSharingState( Model().Media(),
  2161             		                            shareObjectState );
  2181                                                 shareObjectState );
  2162             if( shareObjectState != MVtEngMedia::ESharingImage )
  2182             if( shareObjectState != MVtEngMedia::ESharingImage )
  2163                 {
  2183                 {
  2164                 refresh = ETrue;
  2184                 refresh = ETrue;
  2165                 EnableCommandActivatingAndCleanupPushL();
  2185                 EnableCommandActivatingAndCleanupPushL();
  2166                 CmdEnableVideoL();
  2186                 CmdEnableVideoL();
  2184         case EVtUiCmdEnableBoth:
  2204         case EVtUiCmdEnableBoth:
  2185             EnableCommandActivatingAndCleanupPushL();
  2205             EnableCommandActivatingAndCleanupPushL();
  2186             CmdEnableAudioL();
  2206             CmdEnableAudioL();
  2187             MVtEngMedia::TShareObjectState shareObjectState;
  2207             MVtEngMedia::TShareObjectState shareObjectState;
  2188             VtUiUtility::GetObjectSharingState( Model().Media(),
  2208             VtUiUtility::GetObjectSharingState( Model().Media(),
  2189             									shareObjectState );
  2209                                                 shareObjectState );
  2190             if( shareObjectState != MVtEngMedia::ESharingImage )
  2210             if( shareObjectState != MVtEngMedia::ESharingImage )
  2191                 {
  2211                 {
  2192                 refresh = ETrue;
  2212                 refresh = ETrue;
  2193                 CmdEnableVideoL();
  2213                 CmdEnableVideoL();
  2194                 }
  2214                 }
  2371 void CVtUiAppUi::DynInitMenuPaneL(
  2391 void CVtUiAppUi::DynInitMenuPaneL(
  2372         TInt,
  2392         TInt,
  2373         CEikMenuPane* aMenuPane )
  2393         CEikMenuPane* aMenuPane )
  2374     {
  2394     {
  2375     __VTPRINTENTER( "VtUi.DynInitMenuPaneL" )
  2395     __VTPRINTENTER( "VtUi.DynInitMenuPaneL" )
  2376 	
  2396     
  2377     CVtUiMenus* menus = static_cast< CVtUiMenus* >(
  2397     CVtUiMenus* menus = static_cast< CVtUiMenus* >(
  2378         iFeatureManager->GetFeatureById( EVtUiFeatureIdMenu ) );
  2398         iFeatureManager->GetFeatureById( EVtUiFeatureIdMenu ) );
  2379     if ( menus )
  2399     if ( menus )
  2380         {
  2400         {
  2381         iUiStates->Update();
  2401         iUiStates->Update();
  2382         menus->SetMenuPane( aMenuPane );
  2402         menus->SetMenuPane( aMenuPane );
  2383         menus->RefreshL();
  2403         menus->RefreshL();
  2384         }
  2404         }
  2385 	__VTPRINTEXIT( "VtUi.DynInitMenuPaneL" )
  2405     __VTPRINTEXIT( "VtUi.DynInitMenuPaneL" )
  2386     }
  2406     }
  2387 
  2407 
  2388 // -----------------------------------------------------------------------------
  2408 // -----------------------------------------------------------------------------
  2389 // CVtUiAppUi::HandleKeyEventL
  2409 // CVtUiAppUi::HandleKeyEventL
  2390 // Handles key events.
  2410 // Handles key events.
  2849 // -----------------------------------------------------------------------------
  2869 // -----------------------------------------------------------------------------
  2850 // VtUiAppUi::CmdSnapshotL
  2870 // VtUiAppUi::CmdSnapshotL
  2851 // -----------------------------------------------------------------------------
  2871 // -----------------------------------------------------------------------------
  2852 //
  2872 //
  2853 void CVtUiAppUi::CmdSnapshotL()
  2873 void CVtUiAppUi::CmdSnapshotL()
  2854 	{
  2874     {
  2855 	__VTPRINTENTER( "VtUi.CmdSnapshotL" )
  2875     __VTPRINTENTER( "VtUi.CmdSnapshotL" )
  2856 	
  2876     
  2857 	// zoom mode must be set on before capture mode is set on
  2877     // zoom mode must be set on before capture mode is set on
  2858     SetZoomModeL( ETrue, ETrue );
  2878     SetZoomModeL( ETrue, ETrue );
  2859 
  2879     
  2860 	// if outgoing video is already frozen
  2880     // set capture mode on
       
  2881     iUiStates->SetCaptureModeOn( ETrue );
       
  2882 
       
  2883     // if outgoing video is already frozen
  2861     MVtEngMedia& media = Model().Media();
  2884     MVtEngMedia& media = Model().Media();
  2862     const TBool isFrozen( VtUiUtility::GetFreezeState( media ) );
  2885     const TBool isFrozen( VtUiUtility::GetFreezeState( media ) );
  2863     if ( isFrozen )
  2886     if ( isFrozen )
  2864     	{
  2887         {
  2865     	ExecuteCmdL( KVtEngUnfreeze );
  2888         ExecuteCmdL( KVtEngUnfreeze );
  2866 	    }
  2889         }
  2867 	if ( !IsViewFinderInMainPane() )
  2890     if ( !IsViewFinderInMainPane() )
  2868 	    {
  2891         {
  2869 	    SwitchViewFinderToMainPaneL( !isFrozen );
  2892         SwitchViewFinderToMainPaneL( !isFrozen );
  2870 	    }
  2893         }
  2871 	else if ( !isFrozen )
  2894     else if ( !isFrozen )
  2872 	    {
  2895         {
  2873 	    iUiStates->SetViewFindersInitialPlaceContextPane( EFalse );
  2896         iUiStates->SetViewFindersInitialPlaceContextPane( EFalse );
  2874 	    }
  2897         }
  2875   
  2898     
  2876     // set capture mode on
       
  2877 
       
  2878     iUiStates->SetCaptureModeOn( ETrue );
       
  2879     RefreshStatesL();
  2899     RefreshStatesL();
  2880     RefreshBlind();
  2900     RefreshBlind();
  2881     __VTPRINTEXIT( "VtUi.CmdSnapshotL" )
  2901     __VTPRINTEXIT( "VtUi.CmdSnapshotL" )
  2882     }
  2902     }
  2883 
  2903 
  2890     __VTPRINTENTER( "VtUi.CmdCancelCaptureL" )
  2910     __VTPRINTENTER( "VtUi.CmdCancelCaptureL" )
  2891     // end capture mode, image capture canceled
  2911     // end capture mode, image capture canceled
  2892     iUiStates->SetCaptureModeOn( EFalse );
  2912     iUiStates->SetCaptureModeOn( EFalse );
  2893     SetZoomModeL( EFalse, ETrue );
  2913     SetZoomModeL( EFalse, ETrue );
  2894     RefreshStatesL();
  2914     RefreshStatesL();
  2895 	RestoreViewFinderL();
  2915     RestoreViewFinderL();
  2896     RefreshBlind();
  2916     RefreshBlind();
  2897     __VTPRINTEXIT( "VtUi.CmdCancelCaptureL" )
  2917     __VTPRINTEXIT( "VtUi.CmdCancelCaptureL" )
  2898     }
  2918     }
  2899 
  2919 
  2900 // -----------------------------------------------------------------------------
  2920 // -----------------------------------------------------------------------------
  2901 // CVtUiAppUi::CmdEnableVideoL
  2921 // CVtUiAppUi::CmdEnableVideoL
  2902 // -----------------------------------------------------------------------------
  2922 // -----------------------------------------------------------------------------
  2903 //
  2923 //
  2904 void CVtUiAppUi::CmdEnableVideoL()
  2924 void CVtUiAppUi::CmdEnableVideoL()
  2905     {
  2925     {
  2906 	// if outgoing video is frozen
  2926     // if outgoing video is frozen
  2907     MVtEngMedia& media = Model().Media();
  2927     MVtEngMedia& media = Model().Media();
  2908     if ( VtUiUtility::GetFreezeState( media ) )
  2928     if ( VtUiUtility::GetFreezeState( media ) )
  2909     	{
  2929         {
  2910     	ExecuteCmdL( KVtEngUnfreeze );
  2930         ExecuteCmdL( KVtEngUnfreeze );
  2911     	// swap images if needed
  2931         // swap images if needed
  2912         RestoreViewFinderL();
  2932         RestoreViewFinderL();
  2913     	}
  2933         }
  2914     else
  2934     else
  2915         {
  2935         {
  2916         ExecuteCmdL( KVtEngStopViewFinder );
  2936         ExecuteCmdL( KVtEngStopViewFinder );
  2917         iUplinkWindow->SetStreamBitmap( NULL );
  2937         iUplinkWindow->SetStreamBitmap( NULL );
  2918         MVtEngMedia::TMediaSource source = MVtEngMedia::EMediaCamera;
  2938         MVtEngMedia::TMediaSource source = MVtEngMedia::EMediaCamera;
  2941 // CVtUiAppUi::CmdDisableVideoL
  2961 // CVtUiAppUi::CmdDisableVideoL
  2942 // -----------------------------------------------------------------------------
  2962 // -----------------------------------------------------------------------------
  2943 //
  2963 //
  2944 void CVtUiAppUi::CmdDisableVideoL()
  2964 void CVtUiAppUi::CmdDisableVideoL()
  2945     {
  2965     {
  2946     	
  2966         
  2947 		if( iUiStates->IsZoomModeOn() )
  2967         if( iUiStates->IsZoomModeOn() )
  2948 	        {
  2968             {
  2949 	        // if zoom feature is active, stop that
  2969             // if zoom feature is active, stop that
  2950 	        MVtUiFeature* zm = iFeatureManager->GetFeatureById( EVtUiFeatureIdZoom );
  2970             MVtUiFeature* zm = iFeatureManager->GetFeatureById( EVtUiFeatureIdZoom );
  2951 	        if ( zm )
  2971             if ( zm )
  2952 	            {
  2972                 {
  2953 	            if ( zm->State() ==  MVtUiFeature::EActive )
  2973                 if ( zm->State() ==  MVtUiFeature::EActive )
  2954 	                {
  2974                     {
  2955 	                __VTPRINT( DEBUG_GEN, "VtUi.CmdDisableVideoL zm->STOP" )
  2975                     __VTPRINT( DEBUG_GEN, "VtUi.CmdDisableVideoL zm->STOP" )
  2956 	                zm->Stop();
  2976                     zm->Stop();
  2957 	                }
  2977                     }
  2958 	            }
  2978                 }
  2959 	        }
  2979             }
  2960     	
  2980         
  2961     ExecuteCmdL( KVtEngStopViewFinder );
  2981     ExecuteCmdL( KVtEngStopViewFinder );
  2962 
  2982 
  2963     iUplinkWindow->SetStreamBitmap( NULL );
  2983     iUplinkWindow->SetStreamBitmap( NULL );
  2964 
  2984 
  2965     TInt err = KErrNotFound;
  2985     TInt err = KErrNotFound;
  3138         if ( viewFinderStarted )
  3158         if ( viewFinderStarted )
  3139             {
  3159             {
  3140             // Start viewfinder.
  3160             // Start viewfinder.
  3141             ExecuteCmdL( KVtEngStartViewFinder );
  3161             ExecuteCmdL( KVtEngStartViewFinder );
  3142             }
  3162             }
  3143         User::Leave ( err );	
  3163         User::Leave ( err );    
  3144         }
  3164         }
  3145     // Start remote render.
  3165     // Start remote render.
  3146     __VTPRINT( DEBUG_GEN, "VtUi.Swap.RR.up" )
  3166     __VTPRINT( DEBUG_GEN, "VtUi.Swap.RR.up" )
  3147     if ( remoteRenderStarted )
  3167     if ( remoteRenderStarted )
  3148         {
  3168         {
  3305 // CVtUiAppUi::CmdGoToIdleL
  3325 // CVtUiAppUi::CmdGoToIdleL
  3306 // -----------------------------------------------------------------------------
  3326 // -----------------------------------------------------------------------------
  3307 //
  3327 //
  3308 void CVtUiAppUi::CmdGoToIdleL()
  3328 void CVtUiAppUi::CmdGoToIdleL()
  3309     {
  3329     {
  3310 	__VTPRINTENTER( "VtUi.CmdGoToIdleL" )
  3330     __VTPRINTENTER( "VtUi.CmdGoToIdleL" )
  3311     TInt idleUid = 0;
  3331     TInt idleUid = 0;
  3312     if ( RProperty::Get(
  3332     if ( RProperty::Get(
  3313              KPSUidAiInformation,
  3333              KPSUidAiInformation,
  3314              KActiveIdleUid,
  3334              KActiveIdleUid,
  3315              idleUid ) == KErrNone )
  3335              idleUid ) == KErrNone )
  3316         {
  3336         {
  3317 		__VTPRINT2( DEBUG_GEN, "Idle UID: %d", idleUid )
  3337         __VTPRINT2( DEBUG_GEN, "Idle UID: %d", idleUid )
  3318         TApaTaskList taskList( iEikonEnv->WsSession() );
  3338         TApaTaskList taskList( iEikonEnv->WsSession() );
  3319         TApaTask task = taskList.FindApp( TUid::Uid( idleUid ) );
  3339         TApaTask task = taskList.FindApp( TUid::Uid( idleUid ) );
  3320         if ( task.Exists() )
  3340         if ( task.Exists() )
  3321             {
  3341             {
  3322 			__VTPRINT( DEBUG_GEN, "Idle task found")
  3342             __VTPRINT( DEBUG_GEN, "Idle task found")
  3323             RProperty::Set( KPSUidUikon, KUikVideoCallTopApp, KVtUiAppUid.iUid );
  3343             RProperty::Set( KPSUidUikon, KUikVideoCallTopApp, KVtUiAppUid.iUid );
  3324             task.BringToForeground();
  3344             task.BringToForeground();
  3325             }
  3345             }
  3326         }
  3346         }
  3327 	__VTPRINTEXIT( "VtUi.CmdGoToIdleL" )
  3347     __VTPRINTEXIT( "VtUi.CmdGoToIdleL" )
  3328     }
  3348     }
  3329 
  3349 
  3330 // -----------------------------------------------------------------------------
  3350 // -----------------------------------------------------------------------------
  3331 // CVtUiAppUi::CmdInitializeShareImageL
  3351 // CVtUiAppUi::CmdInitializeShareImageL
  3332 // -----------------------------------------------------------------------------
  3352 // -----------------------------------------------------------------------------
  3417 // -----------------------------------------------------------------------------
  3437 // -----------------------------------------------------------------------------
  3418 //
  3438 //
  3419 void CVtUiAppUi::CmdStopShareImageL( TBool& aNeedRefresh )
  3439 void CVtUiAppUi::CmdStopShareImageL( TBool& aNeedRefresh )
  3420     {
  3440     {
  3421     ExecuteCmdL( KVtEngStopShareImage );
  3441     ExecuteCmdL( KVtEngStopShareImage );
  3422 	RestoreViewFinderL();
  3442     RestoreViewFinderL();
  3423     aNeedRefresh = ETrue;
  3443     aNeedRefresh = ETrue;
  3424     // update VB settings
  3444     // update VB settings
  3425     UpdateVBSettingL();
  3445     UpdateVBSettingL();
  3426     }
  3446     }
  3427 
  3447 
  3428 // -----------------------------------------------------------------------------
  3448 // -----------------------------------------------------------------------------
  3429 // CVtUiAppUi::HandleWaitingStateChange
  3449 // CVtUiAppUi::HandleWaitingStateChange
  3430 // -----------------------------------------------------------------------------
  3450 // -----------------------------------------------------------------------------
  3431 //
  3451 //
  3432 void CVtUiAppUi::HandleWaitingStateChange( TBool aIsWaiting )
  3452 void CVtUiAppUi::HandleWaitingStateChange( TBool aIsWaiting )
  3433 	{
  3453     {
  3434     // Dialer must be closed in case of waiting call
  3454     // Dialer must be closed in case of waiting call
  3435     MVtUiFeature* dialer =
  3455     MVtUiFeature* dialer =
  3436         iFeatureManager->GetFeatureById( EVtUiFeatureIdDialer );
  3456         iFeatureManager->GetFeatureById( EVtUiFeatureIdDialer );
  3437     if ( dialer )
  3457     if ( dialer )
  3438         {
  3458         {
  3445         {
  3465         {
  3446         iIsWaitingCallState = EFalse;
  3466         iIsWaitingCallState = EFalse;
  3447         ChangeApplicationFocus( ETrue );
  3467         ChangeApplicationFocus( ETrue );
  3448         TRAP_IGNORE ( SetHiddenL( EFalse ) );
  3468         TRAP_IGNORE ( SetHiddenL( EFalse ) );
  3449         }
  3469         }
  3450 	}
  3470     }
  3451 
  3471 
  3452 // -----------------------------------------------------------------------------
  3472 // -----------------------------------------------------------------------------
  3453 // CVtUiAppUi::ActiveExecInitExecuteL
  3473 // CVtUiAppUi::ActiveExecInitExecuteL
  3454 // -----------------------------------------------------------------------------
  3474 // -----------------------------------------------------------------------------
  3455 //
  3475 //
  3747             else
  3767             else
  3748                 {
  3768                 {
  3749                 iIsWaitingCallState = ETrue;
  3769                 iIsWaitingCallState = ETrue;
  3750                 }
  3770                 }
  3751 
  3771 
  3752 			// User selectable call answer mute.
  3772             // User selectable call answer mute.
  3753 			// In GS one can set call ansewer status
  3773             // In GS one can set call ansewer status
  3754 			// eighter to query user, allways show, allways mute.
  3774             // eighter to query user, allways show, allways mute.
  3755 			// GS values are checked from CR key ( KSettingsVTVideoSending )
  3775             // GS values are checked from CR key ( KSettingsVTVideoSending )
  3756 			// (default value is 0 = allways query).
  3776             // (default value is 0 = allways query).
  3757 			TVtUiGsMuteVariation camute;
  3777             TVtUiGsMuteVariation camute;
  3758     		__VTPRINT2( DEBUG_GEN, "VtUi.InitExe GS CR key KSettingsVTVideoSending querystate=%d", camute.GsMuteState() )
  3778             __VTPRINT2( DEBUG_GEN, "VtUi.InitExe GS CR key KSettingsVTVideoSending querystate=%d", camute.GsMuteState() )
  3759 			if ( camute.GsMuteState() == KAllwaysQuery && !iUiStates->IsDeviceLockOn() && EPSCTsyCallStateRinging != state)
  3779             if ( camute.GsMuteState() == KAllwaysQuery && !iUiStates->IsDeviceLockOn() && EPSCTsyCallStateRinging != state)
  3760 				{
  3780                 {
  3761             	CVtUiAllowVideoDialog* dialog =
  3781                 CVtUiAllowVideoDialog* dialog =
  3762                 	new ( ELeave ) CVtUiAllowVideoDialog(
  3782                     new ( ELeave ) CVtUiAllowVideoDialog(
  3763                     	&iExecDialog,
  3783                         &iExecDialog,
  3764                     	CAknQueryDialog::ENoTone );
  3784                         CAknQueryDialog::ENoTone );
  3765             	dialog->ExecuteDialogLD( aRequest );
  3785                 dialog->ExecuteDialogLD( aRequest );
  3766             	iExecDialog = dialog;
  3786                 iExecDialog = dialog;
  3767             	aNextState = EVtUiAppUiAnsweredQueryDecide;
  3787                 aNextState = EVtUiAppUiAnsweredQueryDecide;
  3768 				}
  3788                 }
  3769 			else if ( camute.GsMuteState() == KAllwaysAllow )
  3789             else if ( camute.GsMuteState() == KAllwaysAllow )
  3770 				{
  3790                 {
  3771                 aNextState = EVtUiAppUiAnsweredDoPrepareCamera;
  3791                 aNextState = EVtUiAppUiAnsweredDoPrepareCamera;
  3772 				synch = ETrue;
  3792                 synch = ETrue;
  3773 				}
  3793                 }
  3774 			else
  3794             else
  3775 				{
  3795                 {
  3776 				aNextState = EVtUiAppUiNone;
  3796                 aNextState = EVtUiAppUiNone;
  3777 				synch = ETrue;
  3797                 synch = ETrue;
  3778 				}
  3798                 }
  3779 
  3799 
  3780             }
  3800             }
  3781             break;
  3801             break;
  3782 
  3802 
  3783         case EVtUiAppUiAnsweredQueryDecide:
  3803         case EVtUiAppUiAnsweredQueryDecide:
  4588 void CVtUiAppUi::HandleShutdownReady()
  4608 void CVtUiAppUi::HandleShutdownReady()
  4589     {
  4609     {
  4590     __VTPRINTENTER( "VtUi.HandleShutdownReady" )
  4610     __VTPRINTENTER( "VtUi.HandleShutdownReady" )
  4591 
  4611 
  4592     if(iAsyncCallback->IsActive())
  4612     if(iAsyncCallback->IsActive())
  4593 	    {
  4613         {
  4594 		iAsyncCallback->Cancel();
  4614         iAsyncCallback->Cancel();
  4595 	    }
  4615         }
  4596 
  4616 
  4597     iAsyncCallback->Set(
  4617     iAsyncCallback->Set(
  4598         TCallBack( &DoExit, this ) );
  4618         TCallBack( &DoExit, this ) );
  4599     iAsyncCallback->CallBack();
  4619     iAsyncCallback->CallBack();
  4600     __VTPRINTEXIT( "VtUi.HandleShutdownReady" )
  4620     __VTPRINTEXIT( "VtUi.HandleShutdownReady" )
  4897         if( currentCamId == MVtEngMedia::EPrimaryCamera )
  4917         if( currentCamId == MVtEngMedia::EPrimaryCamera )
  4898             {
  4918             {
  4899             
  4919             
  4900             if( wb && ( wb->State() == MVtUiFeature::EActive ) )
  4920             if( wb && ( wb->State() == MVtUiFeature::EActive ) )
  4901                 {
  4921                 {
  4902                 	
  4922                     
  4903                 wb->Stop();
  4923                 wb->Stop();
  4904                 }
  4924                 }
  4905             
  4925             
  4906             if( ct && ( ct->State() == MVtUiFeature::EActive ) )
  4926             if( ct && ( ct->State() == MVtUiFeature::EActive ) )
  4907                 {                    
  4927                 {                    
  4980         {
  5000         {
  4981         __VTPRINT( DEBUG_GEN,
  5001         __VTPRINT( DEBUG_GEN,
  4982             "VtUi.DoLayoutChg KVtEngHandleLayoutChange == KErrNotReady (ok)" )
  5002             "VtUi.DoLayoutChg KVtEngHandleLayoutChange == KErrNotReady (ok)" )
  4983         TVtEngCommandId pendingCommand = Model().CommandHandler().PendingCommand();
  5003         TVtEngCommandId pendingCommand = Model().CommandHandler().PendingCommand();
  4984         TVtEngCommandId invalidCommand = Model().CommandHandler().InvalidCommand();
  5004         TVtEngCommandId invalidCommand = Model().CommandHandler().InvalidCommand();
       
  5005         
       
  5006         __VTPRINT2( DEBUG_GEN, "VtUi.DoLayoutChg pendingCommand=%d",
       
  5007                 pendingCommand )
       
  5008         
       
  5009         __VTPRINT2( DEBUG_GEN, "VtUi.DoLayoutChg invalidCommand=%d",
       
  5010                 invalidCommand )
       
  5011         
  4985         if ( pendingCommand  == KVtEngMuteOutgoingAudio || 
  5012         if ( pendingCommand  == KVtEngMuteOutgoingAudio || 
  4986                 pendingCommand  == KVtEngUnmuteOutgoingAudio ||
  5013                 pendingCommand  == KVtEngUnmuteOutgoingAudio ||
  4987                 pendingCommand  == KVtEngSetAudioRouting ||
  5014                 pendingCommand  == KVtEngSetAudioRouting ||
  4988                 pendingCommand  == KVtEngSetAudioVolume ||
  5015                 pendingCommand  == KVtEngSetAudioVolume ||
  4989                 pendingCommand  == KVtEngSetSource ||
  5016                 pendingCommand  == KVtEngSetSource ||
  4990                 pendingCommand  == KVtEngPrepareCamera ||
  5017                 pendingCommand  == KVtEngPrepareCamera ||
  4991                 pendingCommand  == KVtEngUnfreeze ||
  5018                 pendingCommand  == KVtEngUnfreeze ||
  4992                 invalidCommand  == KVtEngHandleLayoutChange )
  5019                 invalidCommand  == KVtEngHandleLayoutChange )
  4993             {
  5020             {
       
  5021             iPendingCmd = pendingCommand;
  4994             iUiStates->SetLayoutChangeNeeded( ETrue );
  5022             iUiStates->SetLayoutChangeNeeded( ETrue );
  4995             }
  5023             }
  4996         }
  5024         }
  4997     // Notify component manager
  5025     // Notify component manager
  4998     iComponentManager->HandleLayoutChangeL();
  5026     iComponentManager->HandleLayoutChangeL();
  5553             KVtEngStopRenderRemote );
  5581             KVtEngStopRenderRemote );
  5554     const TBool startRemoteRender =
  5582     const TBool startRemoteRender =
  5555         iEventObserver->CommandSupportedAndSynchronous(
  5583         iEventObserver->CommandSupportedAndSynchronous(
  5556             KVtEngStartRenderRemote );
  5584             KVtEngStartRenderRemote );
  5557     const TBool setUIForeground =
  5585     const TBool setUIForeground =
  5558     	iEventObserver->CommandSupportedAndSynchronous(
  5586         iEventObserver->CommandSupportedAndSynchronous(
  5559 			KVtEngSetUIForeground );
  5587             KVtEngSetUIForeground );
  5560 
  5588 
  5561 	TVtUiDPVariation dpvariation;
  5589     TVtUiDPVariation dpvariation;
  5562     TBool dpSupported( dpvariation.IsDPSupported() );
  5590     TBool dpSupported( dpvariation.IsDPSupported() );
  5563 
  5591 
  5564     if ( !prepareViewFinder ||
  5592     if ( !prepareViewFinder ||
  5565          ( !prepareRemoteRender && !prepareRemoteRenderDSA && !dpSupported ) ||
  5593          ( !prepareRemoteRender && !prepareRemoteRenderDSA && !dpSupported ) ||
  5566          ( !prepareRemoteRender && !prepareRemoteRenderDP && dpSupported ) ||
  5594          ( !prepareRemoteRender && !prepareRemoteRenderDP && dpSupported ) ||
  5960     {
  5988     {
  5961     __VTPRINTENTER( "VtUi.AsyncViewFinderToMainPaneAndShare" )
  5989     __VTPRINTENTER( "VtUi.AsyncViewFinderToMainPaneAndShare" )
  5962     CVtUiAppUi* self = reinterpret_cast< CVtUiAppUi* >( aPtr );
  5990     CVtUiAppUi* self = reinterpret_cast< CVtUiAppUi* >( aPtr );
  5963 
  5991 
  5964     TRAPD( result, { self->SwitchViewFinderToMainPaneL();
  5992     TRAPD( result, { self->SwitchViewFinderToMainPaneL();
  5965     								 self->CmdShareImageL();} );
  5993                                      self->CmdShareImageL();} );
  5966     __VTPRINTEXITR( "VtUi.AsyncViewFinderToMainPaneAndShare %d", result )
  5994     __VTPRINTEXITR( "VtUi.AsyncViewFinderToMainPaneAndShare %d", result )
  5967     return result;
  5995     return result;
  5968     }
  5996     }
  5969 
  5997 
  5970 // -----------------------------------------------------------------------------
  5998 // -----------------------------------------------------------------------------
  6000 //
  6028 //
  6001 void CVtUiAppUi::GetCameraOrientations()
  6029 void CVtUiAppUi::GetCameraOrientations()
  6002     {
  6030     {
  6003     __VTPRINTENTER( "VtUi.GetCameraOrientations" )
  6031     __VTPRINTENTER( "VtUi.GetCameraOrientations" )
  6004     MVtEngMedia& media = Model().Media();
  6032     MVtEngMedia& media = Model().Media();
  6005  	media.GetCameraOrientations( iPrimaryCameraOrientation,
  6033      media.GetCameraOrientations( iPrimaryCameraOrientation,
  6006  	     iSecondaryCameraOrientation );
  6034           iSecondaryCameraOrientation );
  6007     __VTPRINTEXIT( "VtUi.GetCameraOrientations" )
  6035     __VTPRINTEXIT( "VtUi.GetCameraOrientations" )
  6008     }
  6036     }
  6009 
  6037 
  6010 // -----------------------------------------------------------------------------
  6038 // -----------------------------------------------------------------------------
  6011 // CVtUiAppUi::SetInitialCameraOrientationL
  6039 // CVtUiAppUi::SetInitialCameraOrientationL
  6050         switch ( cameraId )
  6078         switch ( cameraId )
  6051             {
  6079             {
  6052             case MVtEngMedia::EPrimaryCamera:
  6080             case MVtEngMedia::EPrimaryCamera:
  6053                 __VTPRINT( DEBUG_GEN, "VtUi.SetCameraOrient.Primary")
  6081                 __VTPRINT( DEBUG_GEN, "VtUi.SetCameraOrient.Primary")
  6054                 if( iCurrentCameraOrientation != iPrimaryCameraOrientation )
  6082                 if( iCurrentCameraOrientation != iPrimaryCameraOrientation )
  6055                 	{
  6083                     {
  6056                 	newOrientation = iPrimaryCameraOrientation;
  6084                     newOrientation = iPrimaryCameraOrientation;
  6057                 	}
  6085                     }
  6058                 break;
  6086                 break;
  6059 
  6087 
  6060             case MVtEngMedia::ESecondaryCamera:
  6088             case MVtEngMedia::ESecondaryCamera:
  6061             	__VTPRINT( DEBUG_GEN, "VtUi.SetCameraOrient.Secondary")
  6089                 __VTPRINT( DEBUG_GEN, "VtUi.SetCameraOrient.Secondary")
  6062             	if ( iCurrentCameraOrientation != iSecondaryCameraOrientation )
  6090                 if ( iCurrentCameraOrientation != iSecondaryCameraOrientation )
  6063                     {
  6091                     {
  6064                 	newOrientation = iSecondaryCameraOrientation;
  6092                     newOrientation = iSecondaryCameraOrientation;
  6065                 	}
  6093                     }
  6066                     break;
  6094                     break;
  6067 
  6095 
  6068             default:
  6096             default:
  6069                 break;
  6097                 break;
  6070             }
  6098             }
  6074         iCurrentCameraOrientation )
  6102         iCurrentCameraOrientation )
  6075     __VTPRINT2( DEBUG_GEN, "VtUi.SetCameraOrient.New=%d",
  6103     __VTPRINT2( DEBUG_GEN, "VtUi.SetCameraOrient.New=%d",
  6076         newOrientation )
  6104         newOrientation )
  6077 
  6105 
  6078     if ( iCurrentCameraOrientation != newOrientation )
  6106     if ( iCurrentCameraOrientation != newOrientation )
  6079         	{
  6107             {
  6080         	// map camera orientation to appui layout orientation
  6108             // map camera orientation to appui layout orientation
  6081         	TAppUiOrientation newAppUiOrientation;
  6109             TAppUiOrientation newAppUiOrientation;
  6082         	if ( newOrientation == MVtEngMedia::EOrientationLandscape )
  6110             if ( newOrientation == MVtEngMedia::EOrientationLandscape )
  6083         	    {
  6111                 {
  6084         	    __VTPRINT( DEBUG_GEN, "VtUi.SetCameraOrient=LS")
  6112                 __VTPRINT( DEBUG_GEN, "VtUi.SetCameraOrient=LS")
  6085         	    newAppUiOrientation = EAppUiOrientationLandscape;
  6113                 newAppUiOrientation = EAppUiOrientationLandscape;
  6086         	    }
  6114                 }
  6087         	else if ( newOrientation == MVtEngMedia::EOrientationPortrait )
  6115             else if ( newOrientation == MVtEngMedia::EOrientationPortrait )
  6088         	    {
  6116                 {
  6089         	    __VTPRINT( DEBUG_GEN, "VtUi.SetCameraOrient=PR")
  6117                 __VTPRINT( DEBUG_GEN, "VtUi.SetCameraOrient=PR")
  6090         	    newAppUiOrientation = EAppUiOrientationPortrait;
  6118                 newAppUiOrientation = EAppUiOrientationPortrait;
  6091         	    }
  6119                 }
  6092         	else
  6120             else
  6093         	    {
  6121                 {
  6094         	    __VTPRINT( DEBUG_GEN, "VtUi.SetCameraOrient=OL")
  6122                 __VTPRINT( DEBUG_GEN, "VtUi.SetCameraOrient=OL")
  6095         	    newAppUiOrientation = EAppUiOrientationUnspecified;
  6123                 newAppUiOrientation = EAppUiOrientationUnspecified;
  6096         	    }
  6124                 }
  6097         	SetOrientationL( newAppUiOrientation );
  6125             SetOrientationL( newAppUiOrientation );
  6098         	}
  6126             }
  6099     __VTPRINTEXIT( "VtUi.SetCameraOrientationL" )
  6127     __VTPRINTEXIT( "VtUi.SetCameraOrientationL" )
  6100     }
  6128     }
  6101 
  6129 
  6102 // -----------------------------------------------------------------------------
  6130 // -----------------------------------------------------------------------------
  6103 // CVtUiAppUi::RefreshStatesL
  6131 // CVtUiAppUi::RefreshStatesL
  6243             // The screen size mode has changed, for instance when  the cover on a phone 
  6271             // The screen size mode has changed, for instance when  the cover on a phone 
  6244             // that supports screen flipping is opened or closed. 
  6272             // that supports screen flipping is opened or closed. 
  6245             __VTPRINT( DEBUG_GEN, "VtUi.ProcessWsEventIfZoomModeIsActiveL.ScreenChanged" );
  6273             __VTPRINT( DEBUG_GEN, "VtUi.ProcessWsEventIfZoomModeIsActiveL.ScreenChanged" );
  6246             break;
  6274             break;
  6247 
  6275 
  6248 		case EVtUiWsEventNumberSourceDeactivate:
  6276         case EVtUiWsEventNumberSourceDeactivate:
  6249             // Number source deactivated
  6277             // Number source deactivated
  6250             __VTPRINT( DEBUG_GEN, "VtUi.ProWsEvtIfZoomActivedL.NumberDeactivate" );
  6278             __VTPRINT( DEBUG_GEN, "VtUi.ProWsEvtIfZoomActivedL.NumberDeactivate" );
  6251             break;
  6279             break;
  6252 
  6280 
  6253         default:
  6281         default:
  6277             if ( br->State() ==  MVtUiFeature::EActive )
  6305             if ( br->State() ==  MVtUiFeature::EActive )
  6278                 {
  6306                 {
  6279                 __VTPRINT( DEBUG_GEN, "VtUi.StopSliders br->STOP" )
  6307                 __VTPRINT( DEBUG_GEN, "VtUi.StopSliders br->STOP" )
  6280                 br->Stop();
  6308                 br->Stop();
  6281                 }
  6309                 }
  6282             }	
  6310             }
  6283         }
  6311         }
  6284     // if contrast feature is active, stop that
  6312     // if contrast feature is active, stop that
  6285     if( iUiStates->IsContrastModeOn() )
  6313     if( iUiStates->IsContrastModeOn() )
  6286         {
  6314         {
  6287         // if contrast feature is active, stop that
  6315         // if contrast feature is active, stop that
  6780     
  6808     
  6781     switch( aEvent )
  6809     switch( aEvent )
  6782         {
  6810         {
  6783         case KVtEngSessionWaitingCallActive:
  6811         case KVtEngSessionWaitingCallActive:
  6784         case KVtEngSessionWaitingCallInactive:
  6812         case KVtEngSessionWaitingCallInactive:
  6785         	iAppUi.HandleWaitingStateChange(
  6813             iAppUi.HandleWaitingStateChange(
  6786         		aEvent == KVtEngSessionWaitingCallActive );
  6814                 aEvent == KVtEngSessionWaitingCallActive );
  6787 	        break;
  6815             break;
  6788         default:
  6816         default:
  6789             break;
  6817             break;
  6790         }
  6818         }
  6791     switch( aEvent )
  6819     switch( aEvent )
  6792         {
  6820         {
  6946 void CVtUiAppUi::CEventObserver::HandleVTCommandPerformedL(
  6974 void CVtUiAppUi::CEventObserver::HandleVTCommandPerformedL(
  6947         TVtEngCommandId aCommand,
  6975         TVtEngCommandId aCommand,
  6948         const TInt aError )
  6976         const TInt aError )
  6949     {
  6977     {
  6950     __VTPRINTENTER( "VtUiComms.HandleVTCommandPerformedL" )
  6978     __VTPRINTENTER( "VtUiComms.HandleVTCommandPerformedL" )
  6951 
  6979     __VTPRINT2( DEBUG_GEN, "VtUiComms.HandleVTCommandPerformedL aCommand = %d",
       
  6980             aCommand )
       
  6981     
  6952     if ( iAppUi.iState &&
  6982     if ( iAppUi.iState &&
  6953          iAppUi.iState->HandleVTCommandPerformedL( aCommand, aError ) ==
  6983          iAppUi.iState->HandleVTCommandPerformedL( aCommand, aError ) ==
  6954          TVtUiAppStateBase::EEventHandled )
  6984          TVtUiAppStateBase::EEventHandled )
  6955         {
  6985         {
  6956         // state didn't allow further processing of command completion
  6986         // state didn't allow further processing of command completion
  7031                 }
  7061                 }
  7032             iAppUi.iAsyncCallback->CallBack();
  7062             iAppUi.iAsyncCallback->CallBack();
  7033             }
  7063             }
  7034         }
  7064         }
  7035     else if ( iAppUi.iUiStates->IsLayoutChangeNeeded() && 
  7065     else if ( iAppUi.iUiStates->IsLayoutChangeNeeded() && 
  7036             ( aCommand  == KVtEngMuteOutgoingAudio || 
  7066             ( aCommand  == KVtEngSetSource ||
  7037             aCommand  == KVtEngUnmuteOutgoingAudio ||
       
  7038             aCommand  == KVtEngSetAudioRouting ||
       
  7039             aCommand  == KVtEngSetAudioVolume ||
       
  7040             aCommand  == KVtEngSetSource ||
       
  7041             aCommand  == KVtEngPrepareCamera ||
  7067             aCommand  == KVtEngPrepareCamera ||
  7042             aCommand  == KVtEngUnfreeze ||
  7068             aCommand  == KVtEngUnfreeze ||
  7043             aCommand  == KVtEngHandleLayoutChange ) )
  7069             aCommand  == KVtEngHandleLayoutChange ) ||
  7044         {
  7070             ( ( aCommand  == KVtEngMuteOutgoingAudio || 
       
  7071               aCommand  == KVtEngUnmuteOutgoingAudio ||
       
  7072               aCommand  == KVtEngSetAudioRouting ||
       
  7073               aCommand  == KVtEngSetAudioVolume ) && 
       
  7074               ( aCommand == iAppUi.iPendingCmd ) ) )
       
  7075         {
       
  7076         iAppUi.iPendingCmd = KVtEngCommandNone;
  7045         iAppUi.iUiStates->SetLayoutChangeNeeded( EFalse );
  7077         iAppUi.iUiStates->SetLayoutChangeNeeded( EFalse );
  7046         iAppUi.DoHandleLayoutChangedL();
  7078         iAppUi.DoHandleLayoutChangedL();
  7047         }
  7079         }
  7048     __VTPRINTEXITR( "VtUiComms.HandleVTCommandPerformedL %d", 1 )
  7080     __VTPRINTEXITR( "VtUiComms.HandleVTCommandPerformedL %d", 1 )
  7049     }
  7081     }
  7087          }
  7119          }
  7088     else
  7120     else
  7089         {
  7121         {
  7090         flag = EFalse;
  7122         flag = EFalse;
  7091         }
  7123         }
  7092     	
  7124         
  7093     TBool local = EFalse;
  7125     TBool local = EFalse;
  7094     switch ( aType )
  7126     switch ( aType )
  7095         {
  7127         {
  7096         case ELocalVideoFrame:
  7128         case ELocalVideoFrame:
  7097             local = ETrue;
  7129             local = ETrue;
  7215     //      <Click> <0.6 sec pause> <Press> <indefinite pause> <Release>
  7247     //      <Click> <0.6 sec pause> <Press> <indefinite pause> <Release>
  7216 
  7248 
  7217     switch ( aButtonAct )
  7249     switch ( aButtonAct )
  7218         {
  7250         {
  7219         case ERemConCoreApiButtonPress:
  7251         case ERemConCoreApiButtonPress:
  7220         	__VTPRINT( DEBUG_GEN, "VtUi.HandleVolumeChange.ButtonPress" )
  7252             __VTPRINT( DEBUG_GEN, "VtUi.HandleVolumeChange.ButtonPress" )
  7221         	TRAP_IGNORE( iAppUi.AdjustVolumeL( iRCCAOperationId ) );
  7253             TRAP_IGNORE( iAppUi.AdjustVolumeL( iRCCAOperationId ) );
  7222 			TRAP_IGNORE( iAppUi.RefreshVolumeL() );
  7254             TRAP_IGNORE( iAppUi.RefreshVolumeL() );
  7223             TRAP_IGNORE( iAppUi.iInstance->VolumeKeyPressedL() );
  7255             TRAP_IGNORE( iAppUi.iInstance->VolumeKeyPressedL() );
  7224              
  7256              
  7225             iRemConVolumeRepeatTimer->Start(
  7257             iRemConVolumeRepeatTimer->Start(
  7226                 KVtUiVolumeRepeatLongDelay,
  7258                 KVtUiVolumeRepeatLongDelay,
  7227                 KVtUiVolumeRepeatDelay,
  7259                 KVtUiVolumeRepeatDelay,