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 for implementing viewfinder timeout and* |
|
15 */ |
|
16 |
|
17 |
|
18 #ifndef CAMTIMER_H |
|
19 #define CAMTIMER_H |
|
20 |
|
21 // INCLUDES |
|
22 #include "CamTimerBase.h" |
|
23 |
|
24 // CONSTANTS |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * Active object for implementing viewfinder and post capture timeout |
|
32 */ |
|
33 class CCamTimer : public CCamTimerBase |
|
34 { |
|
35 public: // Constructors and destructor |
|
36 /** |
|
37 * Symbian two-phased constructor. |
|
38 * @since 2.8 |
|
39 * @param aTimeout timer period |
|
40 * @param aCallBack Method to call into when timer completes |
|
41 * @return pointer to the created CCamTimer |
|
42 */ |
|
43 static CCamTimer* NewL( TInt aTimeout, TCallBack aCallBack ); |
|
44 |
|
45 /** |
|
46 * Symbian two-phased constructor. |
|
47 * @since 2.8 |
|
48 * @param aTimeout timer period |
|
49 * @param aCallBack Method to call into when timer completes |
|
50 */ |
|
51 static CCamTimer* NewLC( TInt aTimeout, TCallBack aCallBack ); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 virtual ~CCamTimer(); |
|
57 |
|
58 public: // From CCamTimerBase |
|
59 /** |
|
60 * Start timer. |
|
61 */ |
|
62 void StartTimer(); |
|
63 |
|
64 /** |
|
65 * Set the timeout period |
|
66 * @since 3.0 |
|
67 * @param aTimeout new timer period |
|
68 */ |
|
69 void SetTimeout( TInt aTimeout ); |
|
70 |
|
71 private: // Functions from base classes |
|
72 /** |
|
73 * From CActive, handle timeout expiration |
|
74 */ |
|
75 void RunL(); |
|
76 |
|
77 private: // New functions |
|
78 /** |
|
79 * C++ constructor |
|
80 * @since 2.8 |
|
81 * @param aTimeout timer period |
|
82 * @param aCallBack Method to call into when timer completes |
|
83 */ |
|
84 CCamTimer( TInt aTimeout, TCallBack aCallBack ); |
|
85 |
|
86 /** |
|
87 * Symbian 2nd phase constructor |
|
88 * @since 2.8 |
|
89 */ |
|
90 void ConstructL(); |
|
91 |
|
92 private: |
|
93 TUint iTimeout; |
|
94 TCallBack iCallBack; |
|
95 }; |
|
96 |
|
97 #endif |
|
98 |
|
99 // End of File |
|