camerauis/cameraxui/cxengine/tsrc/fakeclasses/cxefakeautofocuscontrol.h
changeset 19 d9aefe59d544
child 29 699651f2666f
child 43 0e652f8f1fbd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraxui/cxengine/tsrc/fakeclasses/cxefakeautofocuscontrol.h	Fri Apr 16 14:51:30 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef CXEFAKEAUTOFOCUSCONTROL_H
+#define CXEFAKEAUTOFOCUSCONTROL_H
+
+#include "cxeautofocuscontrol.h"
+#include "cxestatemachine.h"
+
+class CxeCameraDevice;
+
+class CxeFakeAutoFocusControl : public CxeAutoFocusControl,
+                                public CxeStateMachine
+{
+    Q_OBJECT
+
+public:
+    CxeFakeAutoFocusControl();
+    virtual ~CxeFakeAutoFocusControl();
+
+    CxeError::Id start();
+    void cancel();
+    void setMode(CxeAutoFocusControl::Mode newMode);
+    CxeAutoFocusControl::Mode mode() const;
+    CxeAutoFocusControl::State state() const;
+    bool supported() const;
+
+public: // methods for testing
+    void setFakeState(CxeAutoFocusControl::State);
+
+protected: // from CxeStateMachine
+    void handleStateChanged(int newStateId, CxeError::Id error);
+    void initializeStates();
+
+private:
+    CxeAutoFocusControl::Mode mAfMode;
+};
+
+#endif // CXEFAKEAUTOFOCUSCONTROL_H