camerauis/cameraxui/cxengine/tsrc/fakeclasses/cxefakeautofocuscontrol.h
changeset 19 d9aefe59d544
child 29 699651f2666f
child 43 0e652f8f1fbd
equal deleted inserted replaced
3:8b2d6d0384b0 19:d9aefe59d544
       
     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 
       
    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();
       
    36     void cancel();
       
    37     void setMode(CxeAutoFocusControl::Mode newMode);
       
    38     CxeAutoFocusControl::Mode mode() const;
       
    39     CxeAutoFocusControl::State state() const;
       
    40     bool supported() const;
       
    41 
       
    42 public: // methods for testing
       
    43     void setFakeState(CxeAutoFocusControl::State);
       
    44 
       
    45 protected: // from CxeStateMachine
       
    46     void handleStateChanged(int newStateId, CxeError::Id error);
       
    47     void initializeStates();
       
    48 
       
    49 private:
       
    50     CxeAutoFocusControl::Mode mAfMode;
       
    51 };
       
    52 
       
    53 #endif // CXEFAKEAUTOFOCUSCONTROL_H