camerauis/cameraxui/cxengine/tsrc/fakeclasses/cxefakeautofocuscontrol.h
branchRCL_3
changeset 54 bac7acad7cb3
parent 53 61bc0f252b2b
child 57 2c87b2808fd7
equal deleted inserted replaced
53:61bc0f252b2b 54:bac7acad7cb3
     1 /*
       
     2 * Copyright (c) 2009-2010 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 
       
    18 #ifndef CXEFAKEAUTOFOCUSCONTROL_H
       
    19 #define CXEFAKEAUTOFOCUSCONTROL_H
       
    20 
       
    21 #include "cxeautofocuscontrol.h"
       
    22 #include "cxestatemachine.h"
       
    23 
       
    24 class CxeCameraDevice;
       
    25 
       
    26 class CxeFakeAutoFocusControl : public CxeAutoFocusControl,
       
    27                                 public CxeStateMachine
       
    28 {
       
    29     Q_OBJECT
       
    30 
       
    31 public:
       
    32     CxeFakeAutoFocusControl();
       
    33     virtual ~CxeFakeAutoFocusControl();
       
    34 
       
    35     CxeError::Id start(bool soundEnabled = true);
       
    36     void cancel();
       
    37     void setMode(CxeAutoFocusControl::Mode newMode);
       
    38     CxeAutoFocusControl::Mode mode() const;
       
    39     bool isFixedFocusMode(Mode mode) const;
       
    40     CxeAutoFocusControl::State state() const;
       
    41     bool supported() const;
       
    42     bool isSoundEnabled() const;
       
    43 
       
    44 public: // methods for testing
       
    45     void setFakeState(CxeAutoFocusControl::State);
       
    46 
       
    47 protected: // from CxeStateMachine
       
    48     void handleStateChanged(int newStateId, CxeError::Id error);
       
    49     void initializeStates();
       
    50 
       
    51 private:
       
    52     CxeAutoFocusControl::Mode mAfMode;
       
    53 };
       
    54 
       
    55 #endif // CXEFAKEAUTOFOCUSCONTROL_H