|
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 CXUIFAKEAUTOFOCUSCONTROL_H |
|
19 #define CXUIFAKEAUTOFOCUSCONTROL_H |
|
20 |
|
21 #include "cxeautofocuscontrolsymbian.h" |
|
22 #include "cxestatemachine.h" |
|
23 |
|
24 //forward declarations |
|
25 class CxeCameraDevice; |
|
26 class CxeAutoFocusControlSymbian; |
|
27 |
|
28 |
|
29 /** |
|
30 * CxeAutoFocusControl is responsible for handling Autofocus events from the camera adaptation. |
|
31 * It also routes the Autofocus successful and failed events to the clients interested in Žknowing the |
|
32 * status of Autofocus. |
|
33 */ |
|
34 class CxuiFakeAutoFocusControl : public CxeAutoFocusControlSymbian |
|
35 { |
|
36 Q_OBJECT |
|
37 public: |
|
38 |
|
39 CxuiFakeAutoFocusControl( CxeCameraDevice &cameraDevice ); |
|
40 virtual ~CxuiFakeAutoFocusControl(); |
|
41 |
|
42 CxeError::Id start(); |
|
43 void cancel(); |
|
44 void setMode( CxeAutoFocusControl::Mode newMode ); |
|
45 CxeAutoFocusControl::Mode mode() const; |
|
46 |
|
47 CxeAutoFocusControl::State state() const; |
|
48 bool supported() const; |
|
49 int setFakeState(CxeAutoFocusControl::State); |
|
50 |
|
51 protected: // from CxeStateMachine |
|
52 void handleStateChanged( int newStateId, CxeError::Id error ); |
|
53 |
|
54 |
|
55 private: |
|
56 // handles to-do things if the event is AF event |
|
57 void handleAfEvent(int eventUid, int error); |
|
58 |
|
59 private: |
|
60 CxeCameraDevice &mCameraDevice; |
|
61 CCamera::CCameraAdvancedSettings *mAdvancedSettings; // not owned |
|
62 CxeAutoFocusControl::Mode mAfMode; |
|
63 CCamera::CCameraAdvancedSettings::TFocusRange mAFRange; |
|
64 }; |
|
65 |
|
66 #endif // CXUIFAKEAUTOFOCUSCONTROL_H |