1 /* |
|
2 * Copyright (c) 2007 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: Active object used to emulate the auto focus custom extension* |
|
15 */ |
|
16 |
|
17 |
|
18 #ifndef TESTAFEXTENSION_H |
|
19 #define TESTAFEXTENSION_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CCamAppControllerBase; |
|
27 |
|
28 #include "cam.hrh" |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Stub implementation for engine side autofocus notification |
|
34 */ |
|
35 class CTestAFExtension : public CTimer |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 /** |
|
39 * Symbian two-phased constructor. |
|
40 * @since 2.8 |
|
41 * @param aController reference to CamController |
|
42 * @param aFailAutoFocus if ETrue autofocus operations will fail |
|
43 * @return pointer to a newly instantiated CTestAFExtension object |
|
44 */ |
|
45 static CTestAFExtension* NewL( CCamAppControllerBase& aController, TBool aFailAutoFocus ); |
|
46 |
|
47 /** |
|
48 * Symbian two-phased constructor. |
|
49 * @since 2.8 |
|
50 * @param aController reference to CamController |
|
51 * @param aFailAutoFocus if ETrue autofocus operations will fail |
|
52 * @return pointer to a newly instantiated CTestAFExtension object |
|
53 */ |
|
54 static CTestAFExtension* NewLC( CCamAppControllerBase& aController, TBool aFailAutoFocus ); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 * @since 2.8 |
|
59 */ |
|
60 virtual ~CTestAFExtension(); |
|
61 |
|
62 public: // New functions |
|
63 /** |
|
64 * Start timer. |
|
65 * @since 2.8 |
|
66 */ |
|
67 void Start(); |
|
68 |
|
69 #ifdef CAMERAAPP_UNIT_TEST |
|
70 /** |
|
71 * Set whether or not the autofocus operation will fail |
|
72 * @since 2.8 |
|
73 * @param aFailAutoFocus autofocus fails if ETrue |
|
74 */ |
|
75 void SetFailAutoFocus( TBool aFailAutoFocus ); |
|
76 #endif |
|
77 |
|
78 public: // Functions from base classes |
|
79 /** |
|
80 * From CActive, handle timeout expiration |
|
81 * @since 2.8 |
|
82 */ |
|
83 void RunL(); |
|
84 |
|
85 private: // New functions |
|
86 /** |
|
87 * C++ constructor |
|
88 * @since 2.8 |
|
89 * @param aController reference to CamController |
|
90 * @param aFailAutoFocus if ETrue autofocus operations will fail |
|
91 */ |
|
92 CTestAFExtension( CCamAppControllerBase& aController, TBool aFailAutoFocus ); |
|
93 |
|
94 /** |
|
95 * Symbian 2nd phase constructor |
|
96 * @since 2.8 |
|
97 */ |
|
98 void ConstructL(); |
|
99 |
|
100 private: |
|
101 // Reference to the application controller |
|
102 CCamAppControllerBase& iController; |
|
103 // Whether or not autofocus operations should fail |
|
104 TBool iFailAutoFocus; |
|
105 }; |
|
106 |
|
107 #endif |
|
108 |
|
109 // End of File |
|