camerauis/cameraxui/cxui/tsrc/cxuifakeviewfindercontrol.h
branchRCL_3
changeset 24 bac7acad7cb3
parent 23 61bc0f252b2b
child 25 2c87b2808fd7
equal deleted inserted replaced
23:61bc0f252b2b 24:bac7acad7cb3
     1 /*
       
     2 * Copyright (c) 2009 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:
       
    15 *
       
    16 */
       
    17 #ifndef __CXUIFAKEVIEWFINDERCONTROL_H__
       
    18 #define __CXUIFAKEVIEWFINDERCONTROL_H__
       
    19 
       
    20 //  Include Files
       
    21 #include "cxeviewfindercontrolsymbian.h"
       
    22 #include "cxestatemachine.h"
       
    23 #include "cxesettings.h"
       
    24 
       
    25 //  Constants
       
    26 
       
    27 
       
    28 //  Class Definitions
       
    29 
       
    30 class CxeCameraDeviceControlSymbian;
       
    31 class CxeCameraDevice;
       
    32 class RWindowBase;
       
    33 
       
    34 class CxuiFakeViewfinderControl : public CxeViewfinderControlSymbian
       
    35 
       
    36 {
       
    37     Q_OBJECT
       
    38 
       
    39 public:
       
    40 
       
    41     CxuiFakeViewfinderControl( CxeCameraDevice &cameraDevice,
       
    42             CxeCameraDeviceControlSymbian &mCameraDeviceControl);
       
    43     virtual ~CxuiFakeViewfinderControl();
       
    44 
       
    45 public: // from base class
       
    46 
       
    47     /*
       
    48     * stops the view finder.
       
    49     */
       
    50     void stop();
       
    51     
       
    52     /*
       
    53     * Get current state of view finder control
       
    54     * returns one of Vf states defined above.
       
    55     */
       
    56     State state() const;
       
    57     
       
    58     /*
       
    59     * Start view finder
       
    60     * @return CxeEngine specific error code
       
    61     */
       
    62     CxeError::Id start();
       
    63 
       
    64     /*
       
    65     * Removes Viewfinder instance
       
    66     */
       
    67     void releaseCurrentViewfinder();
       
    68 
       
    69 protected: // from CxeStateMachine
       
    70     void handleStateChanged( int newStateId, CxeError::Id error );
       
    71 
       
    72 private:
       
    73     /*
       
    74     * Intializes viewfinder based on VF mode
       
    75     * returns CxeEngine Std error code
       
    76     */
       
    77    int initViewfinder();
       
    78 
       
    79 private:
       
    80 
       
    81     CxeCameraDevice &mCameraDevice;
       
    82     CxeCameraDeviceControlSymbian &mCameraDeviceControl;
       
    83     
       
    84     RWindowBase *mWindow;
       
    85     TRect mWindowRect;
       
    86     CCamera::CCameraDirectViewFinder *mDirectViewfinder;
       
    87     
       
    88     bool mDirectViewfinderInUse;
       
    89 };
       
    90 
       
    91 
       
    92 
       
    93 #endif  // __CXUIFAKEVIEWFINDERCONTROL_H__
       
    94