camerauis/cameraapp/generic/inc/CamVideoPreCaptureView.h
branchRCL_3
changeset 54 bac7acad7cb3
equal deleted inserted replaced
53:61bc0f252b2b 54:bac7acad7cb3
       
     1 /*
       
     2 * Copyright (c) 2007 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:  View class for video pre capture view*
       
    15 */
       
    16 
       
    17 
       
    18 #ifndef CAMVIDEOPRECAPTUREVIEW_H
       
    19 #define CAMVIDEOPRECAPTUREVIEW_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include "CamPreCaptureViewBase.h"
       
    23 
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CAknButton;
       
    27 class MAknsSkinInstance;
       
    28 class TAknsItemID;
       
    29 class CCamTimer;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 *  View class for video capture 
       
    35 *
       
    36 *  @since 2.8
       
    37 */
       
    38 class CCamVideoPreCaptureView : public CCamPreCaptureViewBase
       
    39     {
       
    40     public:  // Constructors and destructor
       
    41         
       
    42         /**
       
    43         * Two-phased constructor.
       
    44         * @param aController Reference to either the application controller 
       
    45         *        base class or test base class
       
    46         * @since 2.8
       
    47         * @return pointer to the created CCamVideoPreCaptureView object
       
    48         */
       
    49         static CCamVideoPreCaptureView* NewLC( CCamAppController& aController );
       
    50 
       
    51         /**
       
    52         * Destructor.
       
    53         * @since 2.8
       
    54         */
       
    55         virtual ~CCamVideoPreCaptureView();
       
    56 
       
    57     public: // Functions from base classes
       
    58 
       
    59         /**
       
    60         * From CAknView.
       
    61         * @since 2.8
       
    62         * @return UID of view
       
    63         */
       
    64         TUid Id() const;
       
    65 
       
    66         /**
       
    67         * From CAknView.
       
    68         * @since 2.8
       
    69         */
       
    70         void DoDeactivate();
       
    71 
       
    72         /**
       
    73         * From CAknView Handle commands
       
    74         * @since 2.8
       
    75         * @param aCommand command to be handled
       
    76         */
       
    77         void HandleCommandL( TInt aCommand );
       
    78 
       
    79         /**
       
    80         * From CAknView Handles the foreground/background event
       
    81         * @since 2.8
       
    82         * @param aForeground ETrue if this view is on foreground, else EFalse.
       
    83         */
       
    84         void HandleForegroundEventL( TBool aForeground );
       
    85 
       
    86         /**
       
    87         * From CCamViewBase
       
    88         * Handle change of focus to another application
       
    89         * This only handles another application coming to the foreground when
       
    90         * the camera application is already in the background behind an eikon
       
    91         * server window
       
    92         * @since 2.8
       
    93         */
       
    94         void HandleFocusLossL();
       
    95 
       
    96         /**
       
    97         * From MCamControllerObserver
       
    98         * @since 2.8
       
    99         * @param aEvent The enumerated code for the event received
       
   100         * @param aError The error code associated with the event
       
   101         */
       
   102         void HandleControllerEventL( TCamControllerEvent aEvent,
       
   103                                             TInt aError );
       
   104 
       
   105         /**
       
   106         * From CAknView.
       
   107         * @since 2.8
       
   108         * @param aPrevViewId the ID for previous view we are switching from
       
   109         * @param aCustomMessageId the Uid for message passed to this view
       
   110         * @param aCustomMessage descriptor containing data content for view specific message
       
   111         */
       
   112         void DoActivateL( const TVwsViewId& aPreViewId, TUid aCustomMessageId,
       
   113                                                     const TDesC8& aCustomMessage );
       
   114 
       
   115         /**
       
   116         * From CCamViewBase.
       
   117         * Called to identify the help context for this view
       
   118         * @since 2.8
       
   119         * @param aContext Help context object to populate with control context
       
   120         * information
       
   121         */
       
   122         virtual void GetHelpContext( TCoeHelpContext& aContext ) const;
       
   123         
       
   124 		/**
       
   125         * From CCamViewBase
       
   126         * Update the softkeys for the current situation.
       
   127         * @since 2.8
       
   128         */
       
   129         void UpdateCbaL();
       
   130 		
       
   131 		/*
       
   132 		* Hdmi Timer callback
       
   133 		*/        
       
   134         static TInt HdmiTimerCallback( TAny* aSelf );
       
   135 
       
   136 		/*
       
   137 		* Hdmi Timer callback handler
       
   138 		*/        
       
   139         void DoHdmiTimerCallbackL();
       
   140     
       
   141   
       
   142 
       
   143     protected:  // Functions from base classes
       
   144   
       
   145         /**
       
   146         * From CCamPreCaptureViewBase 
       
   147         * Set the menu bar resource.
       
   148         */
       
   149         virtual void SetMenuBar();
       
   150 
       
   151         /**
       
   152         * From CCamPreCaptureViewBase Handle commands
       
   153         * Creates a video capture setup menu
       
   154         * @since 2.8
       
   155         */
       
   156         void CreateCaptureSetupMenuL( );
       
   157 
       
   158         /**
       
   159         * Enter scene setting mode.
       
   160         * Creates a container to replace the normal container on the control stack. 
       
   161         * Updates the Cba, title pane and navi pane.
       
   162         * @since 2.8
       
   163         */
       
   164         void SwitchToSceneSettingModeL();
       
   165         
       
   166         
       
   167        /*
       
   168         *  Updates Video flash icon if supported
       
   169         */
       
   170         void UpdateVideoFlashIconsL();
       
   171 
       
   172        /*
       
   173         *  Updates Video flash icon if supported
       
   174         */
       
   175         void UpdateVideoSceneModeIconsL();
       
   176 
       
   177        /*
       
   178         *  Updates Video flash icon if supported
       
   179         */
       
   180         void UpdateVideoColorToneIconsL();
       
   181 
       
   182        /*
       
   183         *  Updates Video flash icon if supported
       
   184         */
       
   185         void UpdateVideoWhitebalanceIconsL();
       
   186 
       
   187     public:     // New functions		
       
   188 
       
   189         /**
       
   190         * Update fixed toolbar icons according to current settings
       
   191         * @since S60 5.0
       
   192         */
       
   193         void UpdateToolbarIconsL();
       
   194 
       
   195         /**
       
   196         * Try to start the capture with MSK command. 
       
   197         * @since 9.1
       
   198         * @return ETrue if started.
       
   199         */
       
   200         TBool StartMskCaptureL();
       
   201 
       
   202     private:    // New functions
       
   203 
       
   204         /**
       
   205         * C++ default constructor.
       
   206         * @param aController Reference to either the application controller 
       
   207         *        base class or test base class
       
   208         * @since 2.8
       
   209         */
       
   210         CCamVideoPreCaptureView( CCamAppController& aController );
       
   211 
       
   212         /**
       
   213         * By default Symbian 2nd phase constructor is private.
       
   214         * @since 2.8
       
   215         */
       
   216         void ConstructL();
       
   217         
       
   218     private:    // Functions from base classes
       
   219 
       
   220         /**
       
   221         * From CCamViewBase
       
   222         * Set the view's title text
       
   223         * @since 2.8
       
   224         */
       
   225         void SetTitlePaneTextL();
       
   226 
       
   227         /**
       
   228         * From CCamPreCaptureViewBase
       
   229         * Enter Viewfinder mode
       
   230         * @since 2.8
       
   231         */
       
   232         void StartViewFinder();
       
   233 
       
   234         /**
       
   235         * From CCamPreCaptureViewBase
       
   236         * Exit Viewfinder mode
       
   237         * @since 2.8
       
   238         */
       
   239         void StopViewFinder();
       
   240         
       
   241         /**
       
   242         * From CCamViewBase
       
   243         * Create the container associated with this view.
       
   244         * @since 2.8
       
   245         */
       
   246         void CreateContainerL();
       
   247 
       
   248         /**
       
   249         * Mute or unmute audio in embedded video
       
   250         * @since 2.8
       
   251         * @param aMuteAudio true or false
       
   252         */
       
   253         void MuteEmbeddedAudioL( TBool aMuteAudio );
       
   254 
       
   255 // from base class MAknToolbarObserver
       
   256 
       
   257         void DynInitToolbarL( TInt aResourceId, CAknToolbar* aToolbar );
       
   258 
       
   259         void OfferToolbarEventL( TInt aCommand );
       
   260 
       
   261     private:    // From MEikMenuObserver
       
   262         /**
       
   263         * From MEikMenuObserver Changes menu pane dynamically
       
   264         * @param Resource Id
       
   265         * @param Handle to menu pane
       
   266         * @since 2.8
       
   267         */
       
   268         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
   269 
       
   270     private:
       
   271         // Whether audio is enabled for video
       
   272         // Have mute/unmute option in embedded video menu
       
   273         TInt iAudioEnabled;
       
   274         
       
   275     	CCamTimer* iHdmiTimer;
       
   276     };
       
   277 
       
   278 #endif      // CAMVIDEOPRECAPTUREVIEW_H 
       
   279 
       
   280 // End of File