|
1 /*------------------------------------------------------------------ |
|
2 - |
|
3 * Software Name : UserEmulator |
|
4 * Version : v4.2.1309 |
|
5 * |
|
6 * Copyright (c) 2009 France Telecom. All rights reserved. |
|
7 * This software is distributed under the License |
|
8 * "Eclipse Public License - v 1.0" the text of which is available |
|
9 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
10 * |
|
11 * Initial Contributors: |
|
12 * France Telecom |
|
13 * |
|
14 * Contributors: |
|
15 *------------------------------------------------------------------ |
|
16 - |
|
17 * File Name: CameraAppTimer.h |
|
18 * |
|
19 * Created: 13/08/2009 |
|
20 * Author(s): Marcell Kiss |
|
21 * |
|
22 * Description: |
|
23 * Camera app's timer CActive class |
|
24 *------------------------------------------------------------------ |
|
25 - |
|
26 * |
|
27 */ |
|
28 |
|
29 #ifndef CCAMERAAPPTIMER_H_ |
|
30 #define CCAMERAAPPTIMER_H_ |
|
31 |
|
32 // System Includes |
|
33 #include <E32BASE.H> |
|
34 |
|
35 // Class Declarations |
|
36 /** |
|
37 * Camera observer interface |
|
38 */ |
|
39 class MCameraAppObserver |
|
40 { |
|
41 public: |
|
42 /** |
|
43 * Callback function. Called when timer is expired |
|
44 */ |
|
45 virtual void CheckCameraAppL() = 0; |
|
46 }; |
|
47 |
|
48 /** |
|
49 * Timer active object |
|
50 */ |
|
51 class CCameraAppTimer: public CActive |
|
52 { |
|
53 public: |
|
54 /** |
|
55 * Static constructor |
|
56 * @param aNotify A reference to the camera app. related timer observer. |
|
57 * @return CCameraAppTimer* A pointer to the newly allocated CCameraAppTimer class. |
|
58 * NULL, if the class cannot be created |
|
59 */ |
|
60 static CCameraAppTimer* NewL(MCameraAppObserver& aNotify); |
|
61 /** |
|
62 * Destructor |
|
63 */ |
|
64 ~CCameraAppTimer(); |
|
65 public: |
|
66 /** |
|
67 * Start timer |
|
68 * @param aInterval Microsecs after timer supposed to be expired |
|
69 */ |
|
70 void After(TTimeIntervalMicroSeconds32 aInterval); |
|
71 protected: |
|
72 /** |
|
73 * RunL from CActive class |
|
74 */ |
|
75 void RunL(); |
|
76 /** |
|
77 * DoCancel from CActive class |
|
78 */ |
|
79 void DoCancel(); |
|
80 private: |
|
81 /** |
|
82 * Constructor |
|
83 * @param aNotify A reference to the camera app. related timer observer. |
|
84 */ |
|
85 CCameraAppTimer(MCameraAppObserver& aNotify); |
|
86 /** |
|
87 * Second phase constructor |
|
88 */ |
|
89 void ConstructL(); |
|
90 private: |
|
91 /** |
|
92 * RTimer object member |
|
93 */ |
|
94 RTimer iTimer; |
|
95 /** |
|
96 * Reference to camera app. related timer observer |
|
97 */ |
|
98 MCameraAppObserver& iNotify; |
|
99 }; |
|
100 |
|
101 #endif /* CCAMERAAPPTIMER_H_ */ |