vtuis/videotelui/inc/CVtUiAppUi.h
changeset 0 ed9695c8bcbe
child 3 b1602a5ab0a3
equal deleted inserted replaced
-1:000000000000 0:ed9695c8bcbe
       
     1 /*
       
     2 * Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Application UI class for Video Telephone application.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CVTUIAPPUI_H
       
    21 #define CVTUIAPPUI_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include    <aknappui.h>
       
    25 #include    <vtengcommands.h>
       
    26 #include    <mvtengmedia.h>
       
    27 #include    <tvtengrendering.h>
       
    28 #include    <tvtengrenderingdsa.h>
       
    29 #include    <tvtengrenderingdp.h>
       
    30 #include    <tvtengrenderingnga.h>
       
    31 #include    <aknprogressdialog.h>
       
    32 #include    <mvtengaudio.h>
       
    33 #include    <remconcoreapi.h>
       
    34 
       
    35 #include    "CVtUiActiveExec.h"
       
    36 #include    "tvtuilocalvariation.h"
       
    37 #include    "tvtuiappstatebase.h"
       
    38 
       
    39 
       
    40 // FORWARD DECLARATION
       
    41 class CVtUiBlankControl;
       
    42 class CAknNavigationControlContainer;
       
    43 class CAknTitlePane;
       
    44 class CVtEngModel;
       
    45 class MVtUiVideoWindow;
       
    46 class CRepository;
       
    47 class CAknQueryDialog;
       
    48 class CAknProgressDialog;
       
    49 class TVtUiStates;
       
    50 class CVtUiCommandManager;
       
    51 class CVtUiComponentManager;
       
    52 class CVtUiFeatureManager; // TOOLBAR MOD
       
    53 class MVtUiNumberSource;
       
    54 class CVtUiMainControl;
       
    55 class CVtUiContextControl;
       
    56 class CVtUiBitmapManager;
       
    57 class CVtUiVolumeControl;
       
    58 class CAknIncallBubble;
       
    59 class CVtUiRemoteVideoControl;
       
    60 
       
    61 // CLASS DECLARATION
       
    62 
       
    63 /**
       
    64 *  Application UI class for Video Telephone application.
       
    65 *
       
    66 *  @since Series 60 2.6
       
    67 */
       
    68 class CVtUiAppUi
       
    69     : public CAknAppUi,
       
    70       protected MVtUiActiveExec,
       
    71       public MVtUiStateContext,
       
    72       public MProgressDialogCallback
       
    73     {
       
    74     public:
       
    75 
       
    76         // Rendering modes
       
    77         enum TRenderingMode
       
    78             {
       
    79             ERenderingModeDefault,
       
    80             ERenderingModeDialer
       
    81             };
       
    82 
       
    83     public: // Constructors and destructor
       
    84 
       
    85         /**
       
    86         * C++ constructor.
       
    87         */
       
    88         CVtUiAppUi();
       
    89 
       
    90         /**
       
    91         * Symbian constructor.
       
    92         */
       
    93         void ConstructL();
       
    94 
       
    95         /**
       
    96         * C++ destructor.
       
    97         */
       
    98         ~CVtUiAppUi();
       
    99 
       
   100     public: // New functions
       
   101 
       
   102         /*
       
   103         *  This function decides possibility of swapimg image places.
       
   104         */
       
   105         TBool CanSwapImagePlaces();
       
   106 
       
   107         /*
       
   108         * Switches status pane between flat and normal one.
       
   109         */
       
   110         void SwitchLayoutToFlatStatusPaneL( TBool aSwitch );
       
   111 
       
   112         /**
       
   113         * Refreshes all.
       
   114         */
       
   115         void RefreshL();
       
   116 
       
   117         /**
       
   118         * Refreshes navi pane.
       
   119         */
       
   120         void RefreshNaviPaneL();
       
   121 
       
   122         /**
       
   123         * Refreshes softkeys.
       
   124         */
       
   125         void RefreshSoftkeysL();
       
   126         
       
   127         /**
       
   128         * Refreshes menu.
       
   129         */
       
   130         void RefreshMenuL();
       
   131 
       
   132         /**
       
   133         * Refresh zoom popup
       
   134         */
       
   135         void RefreshZoomPopupL();
       
   136         
       
   137         /**
       
   138         * Stop brightness or Contrast
       
   139         */        
       
   140         void StopBrightnessOrContrast();
       
   141         /**
       
   142         * Refreshes blind flags.
       
   143         */
       
   144         void RefreshBlind();
       
   145 
       
   146         /**
       
   147         * Refreshes synchronisation.
       
   148         */
       
   149         void RefreshSynchronise();
       
   150 
       
   151         /**
       
   152         * Opens number entry.
       
   153         * @return ETrue if number entry opened.
       
   154         */
       
   155         TBool OpenNumberEntryL();
       
   156 
       
   157         /**
       
   158         * Handles EKeyPhoneSend presses
       
   159         */
       
   160         TKeyResponse HandlePhoneSendKeyL( const TKeyEvent& aKeyEvent,
       
   161             TEventCode aType );
       
   162 
       
   163         /**
       
   164         * Returns pointer to cba.
       
   165         */
       
   166         CEikButtonGroupContainer* GetCba();
       
   167 
       
   168         /**
       
   169         * Sets zoom mode.
       
   170         * @param aEnableZoomMode Etrue if zoom mode is on.
       
   171         * EFalse otherwise.
       
   172         * @param aIsPermanent ETrue if zoomindicator's timeout
       
   173         * should be ignored. EFalse otherwise..
       
   174         */
       
   175         void SetZoomModeL( const TBool aEnableZoomMode,
       
   176             const TBool aIsPermanent = EFalse );
       
   177 
       
   178         /**
       
   179         * Checks if command is active.
       
   180         * @param aCommand Command id.
       
   181         * @return Etrue if command is active
       
   182         * EFalse otherwise.
       
   183         */
       
   184         TBool IsActiveCommand( TInt aCommand ) const;
       
   185 
       
   186         TVtUiAppStateBase& State();
       
   187 
       
   188         /**
       
   189         * Returns reference to bitmap manager.
       
   190         */
       
   191         CVtUiBitmapManager& BitmapManager();
       
   192 
       
   193         /**
       
   194         * Sets given zoom step, if it allowed.
       
   195         * @param aZoomStep New zoom step to be set.
       
   196         */
       
   197         void SetZoomFactorL( TInt aZoomStep );
       
   198 
       
   199     public: // Functions from base classes
       
   200 
       
   201         /**
       
   202         * From CAknAppUi, handles window server events.
       
   203         * @param aEvent event.
       
   204         * @param aDestination destination control.
       
   205         */
       
   206         virtual void HandleWsEventL(
       
   207             const TWsEvent& aEvent,
       
   208             CCoeControl* aDestination );
       
   209 
       
   210         /**
       
   211         * From CAknAppUi, processes commands.
       
   212         * @param aCommand the identifier of the command to be handled.
       
   213         */
       
   214         virtual void ProcessCommandL(
       
   215             TInt aCommand );
       
   216 
       
   217         /**
       
   218         * From CAknAppUi, handles commands.
       
   219         * @param aCommand the identifier of the command to be handled.
       
   220         */
       
   221         virtual void HandleCommandL(
       
   222             TInt aCommand );
       
   223 
       
   224         /**
       
   225         * From CAknAppUi, handles dynamic initialisation of menu panes.
       
   226         * @param aResourceId the resource identifier for the pane.
       
   227         * @param aMenuPane the menu pane corresponding to the resource.
       
   228         */
       
   229         virtual void DynInitMenuPaneL(
       
   230             TInt aResourceId,
       
   231             CEikMenuPane* aMenuPane );
       
   232 
       
   233         /**
       
   234         * From CAknAppUi, handles key events.
       
   235         * @param aKeyEvent event to be handled.
       
   236         * @param aType type of the key event.
       
   237         * @return response code (EKeyWasConsumed, EKeyWasNotConsumed)
       
   238         */
       
   239         virtual TKeyResponse HandleKeyEventL(
       
   240             const TKeyEvent& aKeyEvent,
       
   241             TEventCode aType );
       
   242 
       
   243         /**
       
   244         * From CAknAppUi, handles resouce changes.
       
   245         * @param aType type of resource change.
       
   246         */
       
   247         virtual void HandleResourceChangeL( TInt aType );
       
   248 
       
   249         /**
       
   250         * From CAknAppUi, handles foreground status changes.
       
   251         * @param aForeground ETrue if foreground.
       
   252         */
       
   253         virtual void HandleForegroundEventL( TBool aForeground );
       
   254 
       
   255         /**
       
   256         * Returns a pointer to CEikonEnv.
       
   257         */
       
   258         CEikonEnv* GetEikonEnv();
       
   259 
       
   260     protected: // Functions from base classes
       
   261 
       
   262         /**
       
   263         * From CAknAppUi, returns help context.
       
   264         * @return help context.
       
   265         */
       
   266         virtual CArrayFix<TCoeHelpContext>* HelpContextL() const;
       
   267 
       
   268         /**
       
   269         * @see MVtUiActiveExec::ActiveExecExecuteL.
       
   270         */
       
   271         virtual TBool ActiveExecExecuteL(
       
   272             CVtUiActiveExec& aActiveExec,
       
   273             const TInt aState,
       
   274             TInt& aNextState,
       
   275             TRequestStatus& aRequest );
       
   276 
       
   277         /**
       
   278         * @see MVtUiActiveExec::ActiveExecContinue.
       
   279         */
       
   280         virtual TBool ActiveExecContinue(
       
   281             CVtUiActiveExec& aActiveExec,
       
   282             TInt& aState,
       
   283             const TInt aError );
       
   284 
       
   285         /**
       
   286         * @see MVtUiActiveExec::ActiveExecCancel.
       
   287         */
       
   288         virtual void ActiveExecCancel(
       
   289             CVtUiActiveExec& aActiveExec,
       
   290             const TInt aState );
       
   291 
       
   292         /**
       
   293         * @see MVtUiActiveExec::ActiveExecDone.
       
   294         */
       
   295         virtual void ActiveExecDone(
       
   296             CVtUiActiveExec& aActiveExec,
       
   297             const TInt aInitialState );
       
   298 
       
   299     public: // from MVtUiStateContext
       
   300 
       
   301         /** @see MVtUiStateContext::StartupPhase1L */
       
   302         virtual void StartupPhase1L();
       
   303 
       
   304         /** @see MVtUiStateContext::ShutdownL */
       
   305         virtual void ShutdownL();
       
   306 
       
   307         /** @see MVtUiStateContext::StartupPhase2L */
       
   308         virtual void StartupPhase2L();
       
   309 
       
   310         /** @see MVtUiStateContext::ChangeApplicationFocus */
       
   311         virtual void ChangeApplicationFocus( const TBool aForeground );
       
   312 
       
   313         /** @see MVtUiStateContext::ChangeState */
       
   314         virtual void ChangeState( TVtUiAppStateBase* aState );
       
   315 
       
   316         /** @see MVtUiStateContext::StartTone */
       
   317         virtual void StartDtmfTone( const TChar& aTone );
       
   318 
       
   319         /** @see MVtUiStateContext::StopTone */
       
   320         virtual void StopDtmfTone();
       
   321 
       
   322         /** @see MVtUiStateContext::Model */
       
   323         virtual CVtEngModel& Model();
       
   324 
       
   325         /** @see MVtUiStateContext::VideoTelephonyVariation */
       
   326         virtual const TVtUiVideoTelephonyVariation&
       
   327             VideoTelephonyVariation() const;
       
   328 
       
   329         /** @see MVtUiStateContext::NumberSource*/
       
   330         virtual MVtUiNumberSource* NumberSource() const;
       
   331 
       
   332         /** @see MVtUiStateContext::RefreshL */
       
   333         virtual void RefreshL( const TInt aRefreshFlags );
       
   334 
       
   335         /** @see MVtUiStateContext::DoExecuteCmdL */
       
   336         virtual void DoExecuteCmdL(
       
   337             const TVtEngCommandId aCommand,
       
   338             TDesC8* aParams );
       
   339 
       
   340         /** @see MVtUiStateContext::DoHandleLayoutChangedL */
       
   341         virtual void DoHandleLayoutChangedL();
       
   342 
       
   343         /** From MVtUiShutterObserver via MVtUiStateContext
       
   344         *  Exits the application.
       
   345         */
       
   346         virtual void HandleShutdownReady();
       
   347 
       
   348         /**
       
   349         * Gets reference to context control.
       
   350         * @return reference to context control.
       
   351         */
       
   352         CVtUiContextControl& ContextControl();
       
   353 
       
   354         /**
       
   355         * Gets reference to main control.
       
   356         * @return reference to main control.
       
   357         */
       
   358         CVtUiMainControl& MainControl();
       
   359 
       
   360         /**
       
   361         * Gets reference to remote video control.
       
   362         * @return reference to remote video control.
       
   363         */        
       
   364         CVtUiRemoteVideoControl& RemoteVideoControl();
       
   365 
       
   366         /**
       
   367         * Switches viewfinder to main pane if it is currently in context
       
   368         * pane.
       
   369         */
       
   370         void SwitchViewFinderToMainPaneL( TBool aUpdateState = ETrue );
       
   371 
       
   372         /**
       
   373         * Switches viewfinder to context pane if it is currently in main
       
   374         * pane.
       
   375         */
       
   376         void SwitchViewFinderToContextPaneL( TBool aUpdateState = ETrue );
       
   377 
       
   378         /**
       
   379         * Restores viewfinder back to pane where it was prior to calling the
       
   380         * switch ViewFinderToMainPane() or ViewFinderToContextPane() methods.
       
   381         */
       
   382         void RestoreViewFinderL();
       
   383 
       
   384         /*
       
   385         * Updates volume to the Video Telephone engine.
       
   386         */
       
   387         void CmdUpdateVolumeL( MVtEngAudio::TVtEngOutputVolume aVolume );
       
   388 
       
   389         /**
       
   390         * Increases "command activating" ref.count and adds cleanup item
       
   391         * to decrease it. Refreshes commands in case of first increment from
       
   392         * zero. When PopAndDestroy() is called, cleanup decreases reference
       
   393         * count and if it reduces back to zero command refresh is again done.
       
   394         */
       
   395         void EnableCommandActivatingAndCleanupPushL();
       
   396 
       
   397     private: // from MProgressDialogCallback
       
   398 
       
   399         /**
       
   400         * @see MProgressDialogCallback::DialogDismissedL
       
   401         */
       
   402         void DialogDismissedL( TInt aButtonId );
       
   403 
       
   404     private:
       
   405 
       
   406         // COMMAND HANDLING
       
   407 
       
   408         /**
       
   409         * Checks if command is allowed.
       
   410         * @param aCommand command identifier.
       
   411         * @return ETrue if allowed, EFalse otherwise.
       
   412         */
       
   413         TBool IsCommandAllowedL( const TInt aCommand );
       
   414 
       
   415         /**
       
   416         * Refreshes iDisabledFlags.
       
   417         */
       
   418         void RefreshDisabledFlagsL();
       
   419 
       
   420         /**
       
   421         * Refreshes camera option availability.
       
   422         * @param aUsePrimaryCameraNotAllowed it will be updated to ETrue if
       
   423         *        it is not allowed to activate primary camera.
       
   424         * @param aUseSecondaryCameraNotAllowed it will be updated to ETrue if
       
   425         *        it is not allowed to activate secondary camera.
       
   426         */
       
   427         void RefreshCameraOptionAvailability(
       
   428             TBool& aUsePrimaryCameraNotAllowed,
       
   429             TBool& aUseSecondaryCameraNotAllowed );
       
   430 
       
   431         /**
       
   432         * Enables capture mode.
       
   433         */
       
   434         void CmdSnapshotL();
       
   435 
       
   436         /**
       
   437         * Freezes outgoing video image.
       
   438         */
       
   439         void CmdCaptureL();
       
   440 
       
   441         /**
       
   442         * Disables capture mode.
       
   443         */
       
   444         void CmdCancelCaptureL();
       
   445 
       
   446 
       
   447         /**
       
   448         * Enables video.
       
   449         */
       
   450         void CmdEnableVideoL();
       
   451 
       
   452         /**
       
   453         * Enables audio (unmute microphone).
       
   454         */
       
   455         void CmdEnableAudioL();
       
   456 
       
   457         /**
       
   458         * Disables video.
       
   459         */
       
   460         void CmdDisableVideoL();
       
   461 
       
   462         /**
       
   463         * Disables audio (mute microphone).
       
   464         */
       
   465         void CmdDisableAudioL();
       
   466 
       
   467         /**
       
   468         * Activates Bluetooth handsfree.
       
   469         */
       
   470         void CmdActivateBtL();
       
   471 
       
   472         /**
       
   473         * Deactivates Bluetooth handsfree.
       
   474         */
       
   475         void CmdDeactivateBtL();
       
   476 
       
   477         /**
       
   478         * Activates loudspeaker.
       
   479         */
       
   480         void CmdActivateLoudspeakerL();
       
   481 
       
   482         /**
       
   483         * Deactivates loudspeaker.
       
   484         */
       
   485         void CmdDeactivateLoudspeakerL();
       
   486 
       
   487         /**
       
   488         * Ends active call.
       
   489         */
       
   490         void CmdEndActiveCallL();
       
   491 
       
   492         /**
       
   493         * Swaps images places.
       
   494         */
       
   495         void CmdSwapImagesPlacesL();
       
   496 
       
   497         /**
       
   498         * Switches used camera.
       
   499         * @param aPrimaryCamera ETrue if primary camera is to be selected,
       
   500         *        EFalse if secondary camera is to be selected.
       
   501         */
       
   502         void CmdUseCameraL( const TBool aPrimaryCamera );
       
   503 
       
   504         /**
       
   505         * Launches help application.
       
   506         */
       
   507         void CmdHelpL();
       
   508 
       
   509         /**
       
   510         * Prepare exiting the application.
       
   511         */
       
   512         void PrepareExitL();
       
   513 
       
   514         /**
       
   515         * Updates zoom step to Video Telephone engine.
       
   516         */
       
   517         void CmdUpdateZoomL();
       
   518 
       
   519         /**
       
   520         * Dials emergency call.
       
   521         */
       
   522         void CmdDialEmergencyL();
       
   523 
       
   524         /**
       
   525         * Goes to Idle.
       
   526         */
       
   527         void CmdGoToIdleL();
       
   528 
       
   529         /**
       
   530         * Initialize image sharing.
       
   531         */
       
   532         void CmdInitializeShareImageL( TBool& aNeedRefresh );
       
   533 
       
   534         /**
       
   535         * Start sharing image.
       
   536         */
       
   537         void CmdShareImageL();
       
   538 
       
   539         /**
       
   540         * Stops sharing image.
       
   541         */
       
   542         void CmdStopShareImageL( TBool& aNeedRefresh );
       
   543 
       
   544 		/**
       
   545         * Handles change in call waiting state.
       
   546         * @param aIsWaiting The state of call waiting.
       
   547         */
       
   548 	    void HandleWaitingStateChange( TBool aIsWaiting );
       
   549 
       
   550         // STATE TRANSITIONS
       
   551 
       
   552         /**
       
   553         * @see MVtUiActiveExec::ActiveExecExecuteL.
       
   554         */
       
   555         TBool ActiveExecInitExecuteL(
       
   556             const TInt aState,
       
   557             TInt& aNextState,
       
   558             TRequestStatus& aRequest );
       
   559 
       
   560         /**
       
   561         * @see MVtUiActiveExec::ActiveExecContinue.
       
   562         */
       
   563         TBool ActiveExecInitContinue(
       
   564             TInt& aState,
       
   565             const TInt aError );
       
   566 
       
   567         /**
       
   568         * @see MVtUiActiveExec::ActiveExecCancel.
       
   569         */
       
   570         void ActiveExecInitCancel(
       
   571             const TInt aState );
       
   572 
       
   573         /**
       
   574         * @see MVtUiActiveExec::ActiveExecDone.
       
   575         */
       
   576         void ActiveExecInitDone(
       
   577             const TInt aInitialState );
       
   578 
       
   579         /**
       
   580         * Executes command taking no parameters.
       
   581         * @param aCommand command to be performed.
       
   582         * @param aRequest request status.
       
   583         */
       
   584         void ActiveExecInitExecuteCommandL(
       
   585             const TVtEngCommandId aCommand,
       
   586             TRequestStatus& aRequest );
       
   587 
       
   588         /**
       
   589         * Executes command taking no parameters.
       
   590         * @param aCommand command to be performed.
       
   591         * @param aParam command parameters.
       
   592         * @param aRequest request status.
       
   593         */
       
   594         template < class T >
       
   595         void ActiveExecInitExecuteCommandL(
       
   596             const TVtEngCommandId aCommand,
       
   597             T& aParam,
       
   598             TRequestStatus& aRequest );
       
   599 
       
   600         /**
       
   601         * Executes 'prepare camera' command.
       
   602         * @param aSource source to be prepared.
       
   603         * @param aRequest request status.
       
   604         */
       
   605         void ActiveExecInitPrepareCameraL(
       
   606             const MVtEngMedia::TMediaSource aSource,
       
   607             TRequestStatus& aRequest );
       
   608 
       
   609         /**
       
   610         * Executes 'set source' command.
       
   611         * @param aSource source to be selected.
       
   612         * @param aRequest request status.
       
   613         */
       
   614         void ActiveExecInitSetSourceL(
       
   615             const MVtEngMedia::TMediaSource aSource,
       
   616             TRequestStatus& aRequest );
       
   617 
       
   618         /**
       
   619         * Executes prepare viewfinder command.
       
   620         * @param aRequest request status to be completed when finished.
       
   621         */
       
   622         void ActiveExecInitPrepareViewFinderL(
       
   623             TRequestStatus& aRequest );
       
   624 
       
   625         /**
       
   626         * Executes prepare remote render command.
       
   627         * @param aRequest request status to be completed when finished.
       
   628         */
       
   629         void ActiveExecInitPrepareRemoteRenderL(
       
   630             TRequestStatus& aRequest );
       
   631 
       
   632 
       
   633         /**
       
   634         * Executes command taking no parameters.
       
   635         * @param aCommand command to be performed.
       
   636         * @param aRequest request status.
       
   637         */
       
   638         void ActiveExecCmdExecuteCommandL(
       
   639             const TVtEngCommandId aCommand,
       
   640             TRequestStatus& aRequest );
       
   641 
       
   642         /**
       
   643         * Executes 'set source' command.
       
   644         * @param aSource source to be selected.
       
   645         * @param aRequest request status.
       
   646         */
       
   647         void ActiveExecCmdSetSourceL(
       
   648             const MVtEngMedia::TMediaSource aSource,
       
   649             TRequestStatus& aRequest );
       
   650 
       
   651         /**
       
   652         * Executes 'prepare camera' command.
       
   653         * @param aSource source to be selected.
       
   654         * @param aRequest request status.
       
   655         */
       
   656         void ActiveExecCmdPrepareCameraL(
       
   657             const MVtEngMedia::TMediaSource aSource,
       
   658             TRequestStatus& aRequest );
       
   659 
       
   660 
       
   661         /**
       
   662         * Determines main control options.
       
   663         * @param aRemoteVideo for remote video.
       
   664         * @return rendering options.
       
   665         */
       
   666         TVtEngRenderingOptions
       
   667             DetermineMainControlOptions( TBool aRemoteVideo );
       
   668 
       
   669         /**
       
   670         * Determines context control options.
       
   671         * @return rendering options.
       
   672         */
       
   673         TVtEngRenderingOptions DetermineContextControlOptions();
       
   674 
       
   675         /**
       
   676         * Determines dialer control options.
       
   677         * @return rendering options.
       
   678         */
       
   679         TVtEngRenderingOptions DetermineDialerControlOptions();
       
   680 
       
   681         /**
       
   682         * Determines main control DSA options.
       
   683         * @param aRemoteVideo for remote video.
       
   684         * @return rendering options.
       
   685         */
       
   686         TVtEngRenderingOptionsDSA
       
   687             DetermineMainControlOptionsDSA( TBool aRemoteVideo );
       
   688 
       
   689         /**
       
   690         * Determines context control DSA options.
       
   691         * @return rendering options.
       
   692         */
       
   693         TVtEngRenderingOptionsDSA DetermineContextControlOptionsDSA();
       
   694 
       
   695         /**
       
   696         * Determines dialer control DSA options.
       
   697         * @return rendering options.
       
   698         */
       
   699         TVtEngRenderingOptionsDSA DetermineDialerControlOptionsDSA();
       
   700 
       
   701         /**
       
   702         * Determines main control DP options.
       
   703         * @param aRemoteVideo for remote video.
       
   704         * @return rendering options.
       
   705         */
       
   706         TVtEngRenderingOptionsDP
       
   707             DetermineMainControlOptionsDP( TBool aRemoteVideo );
       
   708 
       
   709         /**
       
   710         * Determines context control DP options.
       
   711         * @return rendering options.
       
   712         */
       
   713         TVtEngRenderingOptionsDP DetermineContextControlOptionsDP();
       
   714 
       
   715         /**
       
   716         * Determines dialer control DP options.
       
   717         * @return rendering options.
       
   718         */
       
   719         TVtEngRenderingOptionsDP DetermineDialerControlOptionsDP();
       
   720 
       
   721         /**
       
   722         * Determines remote video  control options.
       
   723         * @return rendering options.
       
   724         */
       
   725         TVtEngRenderingOptionsNGA
       
   726             DetermineRemoteVideoControlOptionsNGA();
       
   727 
       
   728         // SYNCHRONOUS / BLOCKING EXECUTION:
       
   729 
       
   730         /**
       
   731         * Performs a command without any parameters.
       
   732         * @param aCommand command to be performed.
       
   733         */
       
   734         void ExecuteCmdL( const TVtEngCommandId aCommand );
       
   735 
       
   736         /**
       
   737         * Performs a command with a parameter.
       
   738         * @param aCommmand command to be performed.
       
   739         * @param aParam parameter.
       
   740         */
       
   741         template< class T >
       
   742         void ExecuteCmdL(
       
   743             const TVtEngCommandId aCommand,
       
   744             T& aParam );
       
   745 
       
   746         // ASYNCHRONOUS EXECUTION:
       
   747 
       
   748         /**
       
   749         * Performs a command without any parameters.
       
   750         * @param aDialogPtr pointer to which returned value is stored.
       
   751         * @param aCommand command to be performed.
       
   752         * @param aStatus request status.
       
   753         * @return dialog.
       
   754         */
       
   755         CEikDialog* ExecuteCmdAsyncL(
       
   756             CEikDialog** aDialogPtr,
       
   757             const TVtEngCommandId aCommand,
       
   758             TRequestStatus& aStatus );
       
   759 
       
   760         /**
       
   761         * Performs a command with a parameter.
       
   762         * @param aDialogPtr pointer to which returned value is stored.
       
   763         * @param aCommmand command to be performed.
       
   764         * @param aParam parameter.
       
   765         * @param aStatus request status.
       
   766         * @return dialog.
       
   767         */
       
   768         template< class T >
       
   769         CEikDialog* ExecuteCmdAsyncL(
       
   770             CEikDialog** aDialogPtr,
       
   771             const TVtEngCommandId aCommand,
       
   772             T& aParam,
       
   773             TRequestStatus& aStatus );
       
   774 
       
   775         /**
       
   776         * Performs a command.
       
   777         * @param aDialogPtr pointer to which returned value is stored.
       
   778         * @param aCommand command.
       
   779         * @param aParams parameter, optional.
       
   780         * @param aStatus request status.
       
   781         * @return dialog.
       
   782         */
       
   783         CEikDialog* DoExecuteCmdAsyncL(
       
   784             CEikDialog** aDialogPtr,
       
   785             const TVtEngCommandId aCommand,
       
   786             TDesC8* aParams,
       
   787             TRequestStatus& aStatus );
       
   788 
       
   789         /**
       
   790         * Executes command in TRAP harnness.
       
   791         * @param aCommand command identifier.
       
   792         * @param aParam optional, parameters.
       
   793         * @return error code.
       
   794         */
       
   795         TInt Execute( const TVtEngCommandId aCommand, TDesC8* aParam );
       
   796 
       
   797         // EVENT HANDLING
       
   798 
       
   799         /**
       
   800         * Handles foreground changed events.
       
   801         * @param aIsForeground ETrue if foreground, EFalse otherwise.
       
   802         */
       
   803         void HandleForegroundChangedL(
       
   804             TBool aIsForeground );
       
   805 
       
   806         /**
       
   807         * Handles engine reset.
       
   808         */
       
   809         void HandleEngineResetL();
       
   810 
       
   811         /**
       
   812         * Handles successful answer operation.
       
   813         */
       
   814         void HandleAnswerL();
       
   815 
       
   816         /**
       
   817         * Stops waiting image text showing.
       
   818         */
       
   819         void StopWaitingImage();
       
   820 
       
   821         /**
       
   822          * Stops white balance showing.
       
   823          */
       
   824         void StopWhiteBalanceOrColortone();
       
   825         
       
   826         /**
       
   827         * Handles layout changes basically calling HandleLayoutChangedL
       
   828         * in trap harness.
       
   829         * @return error code.
       
   830         */
       
   831         TInt HandleLayoutChanged();
       
   832 
       
   833         /**
       
   834         * Handles layout changes.
       
   835         */
       
   836         void HandleLayoutChangedL();
       
   837 
       
   838         /**
       
   839         * Handles video frame.
       
   840         * @param aLocal local frame if ETrue, EFalse if remote.
       
   841         * @param aBitmap frame, ownership not transferred.
       
   842         */
       
   843         void HandleVideoFrameL(
       
   844             const TBool aLocal,
       
   845             CFbsBitmap* aBitmap );
       
   846 
       
   847         void SetVideoFrame(
       
   848             const TBool aLocal,
       
   849             CFbsBitmap* aBitmap );
       
   850 
       
   851           /**
       
   852         * Handles video call details.
       
   853         * @param aCallID call id.
       
   854         * @param aCallName call name.
       
   855         * @param aIsPeerAddressAvailable is peer address available.
       
   856         */
       
   857         void HandleVideoCallDetailsL(
       
   858             const TInt aCallId,
       
   859             const TDesC& aCallName,
       
   860             const TBool aIsPeerAddressAvailable );
       
   861 
       
   862         /**
       
   863         * Checks if it's time to bring this application
       
   864         * to the foreground.
       
   865         */
       
   866         void CheckBringToForeground();
       
   867 
       
   868         /**
       
   869         * Checks if it's time to send this application
       
   870         * to the background.
       
   871         */
       
   872         void CheckSendToBackground();
       
   873 
       
   874         /**
       
   875         * Handles remote problem.
       
   876         */
       
   877         void HandleVideoFrameRemoteProblemL();
       
   878 
       
   879         /**
       
   880         * Handles local problem.
       
   881         */
       
   882         void HandleVideoFrameLocalProblemL();
       
   883 
       
   884         /**
       
   885         * Set a new remote video layout.
       
   886         */
       
   887         void ChangeRemoteVideoLayoutL();
       
   888 
       
   889         /**
       
   890         * Show image initialization progress dialog.
       
   891         */
       
   892         void ShowImageInitializeProgressL();
       
   893 
       
   894         /**
       
   895         * Hide image initialization progress dialog.
       
   896         */
       
   897         void HideImageInitializeProgressL();
       
   898 
       
   899         /**
       
   900         * Sets SQCif usage.
       
   901         * @param aUseSQCif SQCif is used.
       
   902         */
       
   903         void RemoteVideoIsSQCif( TBool aUseSQCif );
       
   904 
       
   905         /**
       
   906         * Sets SQCif usage to control.
       
   907         * @param aUseSQCif SQCif is used.
       
   908         */
       
   909         void ControlUsesSQCif( TBool aUseSQCif );
       
   910 
       
   911         /**
       
   912         * Checks if beating needs to be started.
       
   913         * @param aCallDurationEnabled call duration enabled status.
       
   914         */
       
   915         void CheckBeatL( const TBool aCallDurationEnabled );
       
   916 
       
   917         /**
       
   918         * Handles heart beats.
       
   919         */
       
   920         void HandleBeat();
       
   921 
       
   922         // UTILITY METHODS
       
   923 
       
   924         /**
       
   925         * Informs the user that camera is reserved by another application.
       
   926         */
       
   927         void ShowCameraInUseNoteL() const;
       
   928 
       
   929         /**
       
   930         * Informs the user that the selected operation is not allowed.
       
   931         */
       
   932         void ShowNotAllowedNoteL() const;
       
   933 
       
   934         /**
       
   935         * Informs the user that it is not allowed to create normal call.
       
   936         */
       
   937         void ShowCallNotAllowedNoteL() const;
       
   938 
       
   939         /**
       
   940         * Informs the user that the other camera is not usable.
       
   941         */
       
   942         void ShowOtherCameraNotUsableNoteL() const;
       
   943 
       
   944         /**
       
   945         * Informs the user that image loading failed.
       
   946         */
       
   947         void ShowUnableToOpenNoteL() const;
       
   948 
       
   949         /**
       
   950         * Informs the user that error happened during image decoding.
       
   951         * Note: Cannot be constant because DoExecuteL() is used for
       
   952         * calling this method.
       
   953         */
       
   954         void ShowImageDecodingErrorNoteL();
       
   955 
       
   956         /**
       
   957         * Informs the user that image is DRM protected and cannot be opened.
       
   958         */
       
   959         void ShowDRMNotAllowedNoteL() const;
       
   960 
       
   961         /**
       
   962         * Sets softkeys.
       
   963         * @param aSoftkeyResourceId softkey resource id.
       
   964         */
       
   965         void SetSoftkeysL( const TInt aSoftkeyResourceId );
       
   966 
       
   967         /**
       
   968         * Sets application hidden from fast swap window.
       
   969         * @param aHidden ETrue if to be hidden, EFalse if visible.
       
   970         */
       
   971         void SetHiddenL( const TBool aHidden );
       
   972 
       
   973         /**
       
   974         * Updates title pane to show call index.
       
   975         * @param aCallId call id.
       
   976         */
       
   977         void SetCallIdL( const TInt aCallId );
       
   978 
       
   979         /**
       
   980         * Updates title pane to show name.
       
   981         * @param aName name to be displayed in title pane.
       
   982         * @return ETrue if succeeded, EFalse if not enough memory.
       
   983         */
       
   984         TBool SetCallNameL( const TDesC& aName );
       
   985 
       
   986         /**
       
   987         * Brings Telephone application to the foreground.
       
   988         */
       
   989         void BringTelephoneToForeground();
       
   990 
       
   991         /**
       
   992         * Returns window group identifier of the principal
       
   993         * telephone application.
       
   994         * @return window group id or 0 if failed.
       
   995         */
       
   996         TInt TelephoneApplicationWgId();
       
   997 
       
   998         /**
       
   999         * Returns ETrue if number entry should be shown to the user.
       
  1000         * This can be called only after ReadTelephonyVariant has
       
  1001         * been called.
       
  1002         * @return ETrue if number entry should be shown to the user.
       
  1003         */
       
  1004         inline TBool ShowNumberEntry() const;
       
  1005 
       
  1006         /**
       
  1007         * Checks if active idle is enabled.
       
  1008         * @return ETrue if active idle is enabled.
       
  1009         */
       
  1010         TBool IsActiveIdleEnabledL() const;
       
  1011 
       
  1012         /**
       
  1013         * Checks engine functionality.
       
  1014         */
       
  1015         void CheckEngineFunctionality();
       
  1016 
       
  1017         /**
       
  1018         * Returns navi pane.
       
  1019         * @return navi pane instance. Ownership not transferred.
       
  1020         */
       
  1021         inline CAknNavigationControlContainer* NaviPaneL();
       
  1022 
       
  1023         /**
       
  1024         * Returns title pane.
       
  1025         * @return title pane instance. Ownership not transferred.
       
  1026         */
       
  1027         inline CAknTitlePane* TitlePaneL();
       
  1028 
       
  1029         /**
       
  1030         * Pushes item to cleanup stack to update softkeys.
       
  1031         */
       
  1032         inline void CleanupPushRefreshL();
       
  1033 
       
  1034         /**
       
  1035         * Pushes item to cleanup stack to enable blind status setting.
       
  1036         */
       
  1037         inline void CleanupPushEnableBlindL();
       
  1038 
       
  1039         /**
       
  1040         * Callback function to refresh navi pane and softkeys.
       
  1041         * @param aAny pointer to an instance of this class.
       
  1042         */
       
  1043         static void DoRefresh( TAny* aAny );
       
  1044 
       
  1045         /**
       
  1046         * Callback function to enable blind status checking.
       
  1047         * @param aAny pointer to an instance of this class.
       
  1048         */
       
  1049         static void DoEnableBlindSetting( TAny* aAny );
       
  1050 
       
  1051         /**
       
  1052         * Callback function to disable command activation
       
  1053         * state.
       
  1054         * @param aAny pointer to an instance of this class.
       
  1055         */
       
  1056         static void DoDisableCommandActivating( TAny* aAny );
       
  1057 
       
  1058         /**
       
  1059         * Decreases command activation ref.count and refreshes
       
  1060         * states if count gets zero.
       
  1061         */
       
  1062         void HandleCommandDeactivationL();
       
  1063 
       
  1064         /**
       
  1065         * Callback function to handle exit timeout.
       
  1066         * @param aAny pointer to instance of this class.
       
  1067         * @return KErrNone always.
       
  1068         */
       
  1069         static TInt DoHandleExitTimeout( TAny* aAny );
       
  1070 
       
  1071         /**
       
  1072         * Callback function to exit.
       
  1073         * @param aAny pointer to instance of this class.
       
  1074         * @return KErrNone always.
       
  1075         */
       
  1076         static TInt DoExit( TAny* aAny );
       
  1077 
       
  1078         /**
       
  1079         * Checks whether viewfinder is currently in main pane.
       
  1080         * @return ETrue if viewfinder is in main pane.
       
  1081         */
       
  1082         TBool IsViewFinderInMainPane() const;
       
  1083 
       
  1084 public:
       
  1085         /**
       
  1086         * Checks whether viewfinder is currently in context pane.
       
  1087         * @return ETrue if viewfinder is in context pane.
       
  1088         */
       
  1089         TBool IsViewFinderInContextPane() const;
       
  1090 private:
       
  1091         /**
       
  1092         * Updates context pane icon
       
  1093         */
       
  1094         void UpdateContextPaneIconL();
       
  1095 
       
  1096         /**
       
  1097         * Enables or disables the incall bubble.
       
  1098         */
       
  1099         void SetIncallBubbleAllowedInUsualL( TBool aAllowed );
       
  1100 
       
  1101         /**
       
  1102         * Shows progress dialog using given resource.
       
  1103         */
       
  1104         void ShowProgressDialogL( TInt aResourceId,
       
  1105             MProgressDialogCallback* aCallback = NULL );
       
  1106 
       
  1107         /**
       
  1108         * Hides (completes) progress dialog.
       
  1109         */
       
  1110         void HideProgressDialogL();
       
  1111 
       
  1112         /**
       
  1113         * Static async callback for switching viewfinder to MainPane, also
       
  1114         * starts image sharing.
       
  1115         */
       
  1116         static TInt AsyncViewFinderToMainPaneAndShare( TAny* aPtr );
       
  1117 
       
  1118         /**
       
  1119         * Static async callback for starting image share.
       
  1120         */
       
  1121         static TInt AsyncShare( TAny* aPtr );
       
  1122 
       
  1123         /**
       
  1124         * Static async callback for showing error note and resharing image.
       
  1125         */
       
  1126         static TInt AsyncShowErrorAndRestartShare( TAny* aPtr );
       
  1127 
       
  1128         /**
       
  1129         * Static async callback for handling layout change.
       
  1130         */
       
  1131         static TInt DelayedHandleLayoutChanged( TAny* aPtr );
       
  1132 
       
  1133         /**
       
  1134         * Gets current camera orientations for primary and secondary camera.
       
  1135         */
       
  1136         void GetCameraOrientations();
       
  1137 
       
  1138         /**
       
  1139         * Sets initial camera orientation.
       
  1140         */
       
  1141         void SetInitialCameraOrientationL();
       
  1142 
       
  1143         /**
       
  1144         * Sets current camera orientation.
       
  1145         */
       
  1146         void SetCameraOrientationL();
       
  1147 
       
  1148         /**
       
  1149         * Updates engine states.
       
  1150         */
       
  1151         void RefreshStatesL();
       
  1152 
       
  1153         /**
       
  1154         * Starts video preference feature specified by command id.
       
  1155         */
       
  1156         void CmdAdjustVideoL( TInt aCommand );
       
  1157 
       
  1158         /**
       
  1159         * AppUi has been initialized and its current state is EVtUiAppUiAnswered.
       
  1160         * Do any other needed initilization here e.g. start features.
       
  1161         */
       
  1162         void AppUiInitDoneDoPostInitL();
       
  1163 
       
  1164         /*
       
  1165         *  This function decides how the wsevent should be handled
       
  1166         * if zoom mode is on.
       
  1167         * @param  aEvent window server event.
       
  1168         * @return ETrue if caller function should return, EFalse otherwise.
       
  1169         */
       
  1170         TBool ProcessWsEventIfZoomModeIsActiveL( const TWsEvent& aEvent );
       
  1171 
       
  1172         /*
       
  1173         *  This function hides the brightness, contrast, volume slider if their mode is on.
       
  1174         */
       
  1175         void StopSliders();
       
  1176 
       
  1177         /**
       
  1178         * Does pre handling to key events, especially for Zoom in and Zoom out
       
  1179         * HW keys.
       
  1180         * @param aEvent event.
       
  1181         */
       
  1182         TBool PreHandleKeyEventL( const TWsEvent& aEvent );
       
  1183 
       
  1184         /**
       
  1185         * Calls SimulateKeyEventL() for stored zoom key event.
       
  1186         */
       
  1187         void SimulateStoredKeyEventL( const TEventCode aEventCode );
       
  1188 
       
  1189         /**
       
  1190         * Stores zoom key event. If there is different zoom key event
       
  1191         * already stored, keyup event is sent for that event before
       
  1192         * new event is stored.
       
  1193         */
       
  1194         void StoreKeyEventL( const TKeyEvent& aKeyEvent );
       
  1195 
       
  1196         /**
       
  1197         * Callback function that calls TryToStartTb function
       
  1198         */
       
  1199         static TInt DoTryToStartTbL( TAny* aAny );
       
  1200 
       
  1201         /*
       
  1202         * Tries to start toolbar. Toolbar is started if
       
  1203         * option menus is not visible.
       
  1204         */
       
  1205         void TryToStartTbL();
       
  1206 
       
  1207         /*
       
  1208         * Update video prefrence
       
  1209         */
       
  1210         void UpdateVBSettingL();
       
  1211 
       
  1212 
       
  1213         /**
       
  1214         * Sets current rendering mode (i.e. default or dialer)
       
  1215         */
       
  1216         void SetRenderingModeL( const TRenderingMode aMode,
       
  1217             MVtUiVideoWindow* aDownlink );
       
  1218 
       
  1219         /**
       
  1220         * Updates rendering parameters.
       
  1221         */
       
  1222         void UpdateRenderingParametersL();
       
  1223 
       
  1224         /*
       
  1225         * Media state has been changed
       
  1226         */
       
  1227         void MediaStateChangedL();
       
  1228 
       
  1229         /*
       
  1230         * Updates volume slider
       
  1231         */
       
  1232         void RefreshVolumeL();
       
  1233 
       
  1234         /*
       
  1235         * Adjusts volume up or down one step.
       
  1236         */
       
  1237         void AdjustVolumeL( TRemConCoreApiOperationId aOperationId );
       
  1238 
       
  1239     private:
       
  1240 
       
  1241         // Pointer to stored downlink window.
       
  1242         MVtUiVideoWindow* iStoredDownlinkWindow;
       
  1243 
       
  1244         // Current rendering mode
       
  1245         TRenderingMode iRenderingMode;
       
  1246 
       
  1247         // Command framework instance
       
  1248         CVtUiCommandManager* iCommandManager;
       
  1249 
       
  1250         // Inner class.
       
  1251         class CInstance;
       
  1252 
       
  1253         // Model instance. Exists only while there is a video call.
       
  1254         CInstance* iInstance;
       
  1255 
       
  1256         // Inner class to observe all events.
       
  1257         class CEventObserver;
       
  1258 
       
  1259         // Inner class for verifying media gallery objects
       
  1260         class CVtUiAppUiMGVerifier;
       
  1261 
       
  1262         // Owned event observer.
       
  1263         CEventObserver* iEventObserver;
       
  1264 
       
  1265         // Owned blank control for reset & shutdown.
       
  1266         CVtUiBlankControl* iBlankControl;
       
  1267 
       
  1268         /**
       
  1269         * Enumerates disabled flags:
       
  1270         * EDisabledVideo - video disabled,
       
  1271         * EDisabledAudio - audio disabled,
       
  1272         * EVideoOptionsDisabled - video options disabled.
       
  1273         */
       
  1274         enum TDisabledFlags
       
  1275             {
       
  1276             EDisabledVideo = 1,
       
  1277             EDisabledAudio = 2,
       
  1278             EVideoOptionsDisabled = 4
       
  1279             };
       
  1280 
       
  1281 		// The Ihf Note id.
       
  1282 		TInt iIhfNoteId;
       
  1283 
       
  1284         // Flags for disabled. Sum of subset of TDisabledFlags.
       
  1285         TInt iDisabledFlags;
       
  1286 
       
  1287         // Current softkey resource id.
       
  1288         TInt iCurrentSoftkeys;
       
  1289 
       
  1290         // Telephony variant.
       
  1291         TVtUiVideoTelephonyVariation iVTVariation;
       
  1292 
       
  1293         // Window group id of this application.
       
  1294         TInt iThisApplicationWgId;
       
  1295 
       
  1296         // Window group id of eikon server.
       
  1297         TInt iEikonServerWgId;
       
  1298 
       
  1299         // Window group id for AknCapServer
       
  1300         TInt iAknCapServerWgId;
       
  1301 
       
  1302         // Window group id for Akn Notifier Server
       
  1303         TInt iAknNfyServerWgId;
       
  1304 
       
  1305         // Owned active executor for initialisation / uninitialisation.
       
  1306         CVtUiActiveExec* iActiveExec;
       
  1307 
       
  1308         // Owned current dialog on execution.
       
  1309         CEikDialog* iExecDialog;
       
  1310 
       
  1311         // Owned blank dialog.
       
  1312         CEikDialog* iExecBlankDialog;
       
  1313 
       
  1314         // Reference to request status.
       
  1315         TRequestStatus* iShutdownRequest;
       
  1316 
       
  1317         // Owned active executor for command execution.
       
  1318         CVtUiActiveExec* iCmdActiveExec;
       
  1319 
       
  1320         // Owned current dialog on command execution.
       
  1321         CEikDialog* iCmdExecDialog;
       
  1322 
       
  1323         // Owned blank dialog on command execution.
       
  1324         CEikDialog* iCmdExecBlankDialog;
       
  1325 
       
  1326 
       
  1327         // Owned timer for making sure that
       
  1328         // the application is terminated in time.
       
  1329         CPeriodic* iExitTimer;
       
  1330 
       
  1331         // DTMF tone, used as parameter to KVtEngStartDtmfTone.
       
  1332         TPckgBuf< TChar > iDtmfTone;
       
  1333 
       
  1334         // Pointer to uplink window.
       
  1335         MVtUiVideoWindow* iUplinkWindow;
       
  1336 
       
  1337         // Pointer to downlink window.
       
  1338         MVtUiVideoWindow* iDownlinkWindow;
       
  1339 
       
  1340         // Query dialog for switching to voice call
       
  1341         CAknQueryDialog* iCreateVoiceCallDlg;
       
  1342 
       
  1343         // Progress dialog shown when initializing
       
  1344         CAknProgressDialog* iProgressDlg;
       
  1345 
       
  1346         // ASync callback.
       
  1347         CAsyncCallBack* iAsyncCallback;
       
  1348 
       
  1349         // Async callback for layout change
       
  1350         CAsyncCallBack* iLayoutChangeCallback;
       
  1351 
       
  1352         // Camera orientation for primary camera
       
  1353         MVtEngMedia::TCameraOrientation iPrimaryCameraOrientation;
       
  1354 
       
  1355         // Camera orientation for secondary camera
       
  1356         MVtEngMedia::TCameraOrientation iSecondaryCameraOrientation;
       
  1357 
       
  1358         // Currently used camera orientation
       
  1359         MVtEngMedia::TCameraOrientation iCurrentCameraOrientation;
       
  1360 
       
  1361         // Current loudspeaker volume
       
  1362         TInt iLoudspeakerVolume;
       
  1363 
       
  1364         // Current handset volume
       
  1365         TInt iHandsetVolume;
       
  1366 
       
  1367         // Ui states (media, audio, boolean variables)
       
  1368         TVtUiStates* iUiStates;
       
  1369 
       
  1370         // Component manager instance
       
  1371         CVtUiComponentManager* iComponentManager;
       
  1372 
       
  1373         // Feature manager instance
       
  1374         CVtUiFeatureManager* iFeatureManager;
       
  1375 
       
  1376         // Pointer to cba
       
  1377         CEikButtonGroupContainer* iCba;
       
  1378 
       
  1379         // Active number source
       
  1380         MVtUiNumberSource* iNumberSource;
       
  1381 
       
  1382         TVtUiAppStateBase*  iState;
       
  1383 
       
  1384         // Stored zoom key event
       
  1385         TKeyEvent iStoredKeyEvent;
       
  1386 
       
  1387         // ETrue if incoming call is waiting call
       
  1388         TBool iIsWaitingCallState;
       
  1389 
       
  1390         // ETrue if key event has been stored
       
  1391         TBool iIsStoredKeyEvent;
       
  1392 
       
  1393         // Timer for starting the toolbar
       
  1394         CPeriodic* iTbPeriodic;
       
  1395 
       
  1396         // Owned volume control class for adjusting
       
  1397         // engine side volume
       
  1398         CVtUiVolumeControl* iVolCtrl;
       
  1399 
       
  1400     private: // Friend classes
       
  1401 
       
  1402         // Inner class.
       
  1403         friend class CInstance;
       
  1404 
       
  1405         // Inner class.
       
  1406         friend class CEventObserver;
       
  1407 
       
  1408     private:
       
  1409 
       
  1410         // Class for active command handling
       
  1411         class TActiveCommand
       
  1412             {
       
  1413 
       
  1414         public:
       
  1415 
       
  1416             /**
       
  1417             * Constructor.
       
  1418             * @param aActiveCommands array of command ids.
       
  1419             * @param aCommand command id.
       
  1420             */
       
  1421             TActiveCommand( RArray< TInt >& aActiveCommands, TInt aCommandId );
       
  1422 
       
  1423             /**
       
  1424             * Destructor
       
  1425             */
       
  1426             ~TActiveCommand();
       
  1427 
       
  1428             /**
       
  1429             * Adds command to active commands
       
  1430             */
       
  1431             void OpenL();
       
  1432 
       
  1433         private:
       
  1434 
       
  1435             /**
       
  1436             * Removes command from active commands
       
  1437             */
       
  1438             void Close();
       
  1439 
       
  1440         private:
       
  1441 
       
  1442             // Reference to array of active command ids.
       
  1443             RArray< TInt >& iActiveCommands;
       
  1444 
       
  1445             // Command id.
       
  1446             const TInt iCommandId;
       
  1447 
       
  1448             };
       
  1449 
       
  1450 
       
  1451     private:
       
  1452         // Active command ids.
       
  1453         RArray< TInt > iActiveCommands;
       
  1454         // The last time swap image operation occured.
       
  1455         TTime iLastSwapTime;
       
  1456         // Incall bubble.
       
  1457         CAknIncallBubble* iIncallBubble;
       
  1458         //This flag is used to check if orientation changed before some action
       
  1459         //Currently is only used for prepare remote render and start remote render
       
  1460         TBool iIsLandScapeOrientation;
       
  1461         //flag indicates layoutchang session
       
  1462         TBool iLayoutChg;
       
  1463         //save cmd for later use 
       
  1464         TInt iDelayedCmd;
       
  1465     };
       
  1466 
       
  1467 #endif      // CVTUIAPPUI_H
       
  1468 
       
  1469 // End of File