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 CXEFAKESTILLCAPTURECONTROL_H |
|
18 #define CXEFAKESTILLCAPTURECONTROL_H |
|
19 |
|
20 #include "cxestillcapturecontrol.h" |
|
21 #include "cxestatemachine.h" |
|
22 #include "cxenamespace.h" |
|
23 #include "cxequalitydetails.h" |
|
24 |
|
25 class CxeSoundPlayerSymbian; |
|
26 class CxeFilenameGenerator; |
|
27 class CxeCameraDevice; |
|
28 class CxeStillImageSymbian; |
|
29 class CxeImageDataQueue; |
|
30 class CxeImageDataQueueSymbian; |
|
31 class CxeViewfinderControl; |
|
32 class CxeCameraDeviceControl; |
|
33 |
|
34 class CxeFakeStillCaptureControl : public CxeStillCaptureControl, |
|
35 public CxeStateMachine |
|
36 |
|
37 { |
|
38 Q_OBJECT |
|
39 |
|
40 public: // constructors |
|
41 CxeFakeStillCaptureControl(); |
|
42 virtual ~CxeFakeStillCaptureControl(); |
|
43 |
|
44 public: // from CxeStillCaptureControl |
|
45 void capture(); |
|
46 State state() const; |
|
47 int imageCount() const; |
|
48 void reset(); |
|
49 void cancelAll(); |
|
50 void setMode(CaptureMode mode); |
|
51 CaptureMode mode() const; |
|
52 CxeStillImage &operator[](int index); |
|
53 CxeImageDataQueue &imageDataQueue(); |
|
54 QList<CxeImageDetails> supportedImageQualities(); |
|
55 int imagesLeft(); |
|
56 |
|
57 public slots: |
|
58 void init(); |
|
59 void deinit(); |
|
60 |
|
61 signals: |
|
62 void imagePrepareComplete(CxeError::Id error); |
|
63 |
|
64 public: // methods for unit testing |
|
65 enum MethodIndex |
|
66 { |
|
67 Capture, |
|
68 Reset, |
|
69 CancelAll, |
|
70 SetMode, |
|
71 Init, |
|
72 Deinit |
|
73 }; |
|
74 |
|
75 void setState(CxeStillCaptureControl::State newState); |
|
76 QList<MethodIndex> callHistory() const; |
|
77 void resetCallHistory(); |
|
78 |
|
79 protected: // from CxeStateMachine |
|
80 void handleStateChanged(int newStateId, CxeError::Id error); |
|
81 void initializeStates(); |
|
82 |
|
83 private: // data |
|
84 QList<MethodIndex> mCallHistory; |
|
85 }; |
|
86 |
|
87 #endif // CXEFAKESTILLCAPTURECONTROL_H |
|