|
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 CXEFAKEVIEWFINDERCONTROL_H |
|
18 #define CXEFAKEVIEWFINDERCONTROL_H |
|
19 |
|
20 #include <e32cmn.h> |
|
21 |
|
22 #include "cxeviewfindercontrol.h" |
|
23 #include "cxestatemachine.h" |
|
24 |
|
25 |
|
26 class CxeFakeViewfinderControl : public CxeViewfinderControl, |
|
27 public CxeStateMachine |
|
28 |
|
29 { |
|
30 Q_OBJECT |
|
31 |
|
32 public: |
|
33 |
|
34 CxeFakeViewfinderControl(); |
|
35 virtual ~CxeFakeViewfinderControl(); |
|
36 |
|
37 public: // from CxeViewfinderControl |
|
38 void setWindow(WId windowId); |
|
39 CxeError::Id start(); |
|
40 void stop(); |
|
41 State state() const; |
|
42 QSize deviceDisplayResolution() const; |
|
43 |
|
44 public: // methods for unit testing |
|
45 enum MethodIndex |
|
46 { |
|
47 SetWindow, |
|
48 Start, |
|
49 Stop |
|
50 }; |
|
51 |
|
52 void setState(CxeViewfinderControl::State newState); |
|
53 QList<MethodIndex> callHistory() const; |
|
54 void resetCallHistory(); |
|
55 |
|
56 protected: // from CxeStateMachine |
|
57 void handleStateChanged(int newStateId, CxeError::Id error); |
|
58 void initializeStates(); |
|
59 |
|
60 private: // data |
|
61 QList<MethodIndex> mCallHistory; |
|
62 }; |
|
63 |
|
64 |
|
65 |
|
66 #endif // CXEFAKEVIEWFINDERCONTROL_H |
|
67 |