|
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 CXUIFAKEENGINE_H |
|
18 #define CXUIFAKEENGINE_H |
|
19 |
|
20 #include <QObject> |
|
21 #include "cxeengine.h" |
|
22 #include "cxestillcapturecontrolsymbian.h" |
|
23 #include "cxevideocapturecontrolsymbian.h" |
|
24 #include "cxeautofocuscontrolsymbian.h" |
|
25 #include "cxecameradevicecontrolsymbian.h" |
|
26 #include "cxezoomcontrolsymbian.h" |
|
27 #include "cxeimagedataqueuesymbian.h" |
|
28 #include "cxefilenamegeneratorsymbian.h" |
|
29 #include "cxuifakestillcapturecontrol.h" |
|
30 #include "cxuifakecameradevicecontrol.h" |
|
31 |
|
32 |
|
33 class CxeCameraDeviceControl; |
|
34 class CxeCameraDeviceControlSymbian; |
|
35 class CxeViewfinderControl; |
|
36 class CxuiFakeViewfinderControl; |
|
37 class CxeStillCaptureControl; |
|
38 class CxeStillCaptureControlSymbian; |
|
39 class CxeVideoCaptureControl; |
|
40 class CxeVideoCaptureControlSymbian; |
|
41 class CxeAutoFocusControl; |
|
42 class CxeFeatureManager; |
|
43 class CxeAutoFocusControlSymbian; |
|
44 class CxeSettings; |
|
45 class CxeFeatureManager; |
|
46 class CxeSettingsModel; |
|
47 class CxuiFakeStillCaptureControl; |
|
48 class CxuiFakeAutoFocusControl; |
|
49 |
|
50 class CxuiFakeEngine : public CxeEngine |
|
51 { |
|
52 Q_OBJECT |
|
53 public: |
|
54 CxuiFakeEngine(); |
|
55 ~CxuiFakeEngine(); |
|
56 |
|
57 CxeCameraDeviceControl &cameraDeviceControl(); |
|
58 CxeViewfinderControl &viewfinderControl(); |
|
59 CxeStillCaptureControlSymbian &stillCaptureControl(); |
|
60 CxeVideoCaptureControlSymbian &videoCaptureControl(); |
|
61 CxeAutoFocusControlSymbian &autoFocusControl(); |
|
62 CxeZoomControlSymbian &zoomControl(); |
|
63 CxeSettings &settings(); |
|
64 CxeFeatureManager &featureManager(); |
|
65 Cxe::CameraMode mode() const; |
|
66 void initMode( Cxe::CameraMode cameraMode ); |
|
67 |
|
68 // Added for testing purposes |
|
69 void initModeFake(Cxe::CameraMode cameraMode); |
|
70 static CxuiFakeEngine* createFakeEngine(); |
|
71 CxuiFakeStillCaptureControl &fakeStillCaptureControl(); |
|
72 |
|
73 private slots: |
|
74 /** |
|
75 * Prepare current capture control (CxeVideoCaptureControl in video mode, |
|
76 * CxeStillCaptureControl in still image mode). |
|
77 */ |
|
78 void doInit(); |
|
79 |
|
80 private: |
|
81 |
|
82 /** |
|
83 * Used by initMode() to check if we need to prepare image/video |
|
84 * capture using doInit(). |
|
85 */ |
|
86 bool initNeeded(); |
|
87 |
|
88 /** |
|
89 * Used by initMode() to check if we need to start viewfinder. |
|
90 */ |
|
91 bool startViewfinderNeeded(); |
|
92 /** |
|
93 * Used by initMode() to check if we need to reserve camera. |
|
94 */ |
|
95 bool reserveNeeded(); |
|
96 |
|
97 |
|
98 private: |
|
99 //CxeCameraDeviceControlSymbian *mCameraDeviceControl; |
|
100 CxuiFakeCameraDeviceControl *mFakeCameraDeviceControl; |
|
101 CxuiFakeViewfinderControl *mViewfinderControl; |
|
102 //CxeStillCaptureControlSymbian *mStillCaptureControl; |
|
103 CxeVideoCaptureControlSymbian *mVideoCaptureControl; |
|
104 CxuiFakeAutoFocusControl *mFakeAutoFocusControl; |
|
105 //CxeAutoFocusControlSymbian *mAutoFocusControl; |
|
106 CxeZoomControlSymbian *mZoomControl; |
|
107 CxeSettings *mSettings; |
|
108 CxeFeatureManager *mFeatureManager; |
|
109 CxeSettingsModel *mSettingsModel; |
|
110 CxeSoundPlayerSymbian *mSoundPlayer; |
|
111 CxeFilenameGeneratorSymbian *mFilenameGenerator; |
|
112 |
|
113 // Members created for testing purposes |
|
114 CxuiFakeStillCaptureControl *mFakeStillCaptureControl; |
|
115 }; |
|
116 |
|
117 |
|
118 #endif // CXUIFAKEENGINE_H |
|
119 |