|
1 /* |
|
2 * Copyright (c) 2005 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 the License "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 |
|
18 |
|
19 |
|
20 #ifndef CMINIMAPTIMER_H |
|
21 #define CMINIMAPTIMER_H |
|
22 |
|
23 // INCLUDES |
|
24 |
|
25 #include <e32base.h> |
|
26 |
|
27 // CONSTANTS |
|
28 |
|
29 // MACROS |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 |
|
33 class CMinimap; |
|
34 |
|
35 // DATA TYPES |
|
36 |
|
37 typedef void (CMinimap::* TMinimapCb)(); |
|
38 |
|
39 // FUNCTION PROTOTYPES |
|
40 |
|
41 // CLASS DECLARATION |
|
42 |
|
43 /** |
|
44 * |
|
45 * |
|
46 * @lib pagescaler.dll |
|
47 * @since 3.1 |
|
48 */ |
|
49 class CMinimapTimer : public CActive |
|
50 { |
|
51 |
|
52 |
|
53 public: // Constructors and destructor |
|
54 |
|
55 /** |
|
56 * Two-phased constructor. |
|
57 */ |
|
58 static CMinimapTimer* NewL(CMinimap& aMinimap, TMinimapCb aCallback, |
|
59 TInt aPriority=CActive::EPriorityStandard); |
|
60 |
|
61 /** |
|
62 * Destructor. |
|
63 */ |
|
64 virtual ~CMinimapTimer(); |
|
65 |
|
66 public: // New functions |
|
67 |
|
68 /** |
|
69 * |
|
70 * @since 3.1 |
|
71 * @param |
|
72 * @return |
|
73 */ |
|
74 void Start(TTimeIntervalMicroSeconds32 aTime); |
|
75 |
|
76 /** |
|
77 * |
|
78 * @since 3.1 |
|
79 * @param |
|
80 * @return |
|
81 */ |
|
82 void StartOrContinue(TTimeIntervalMicroSeconds32 aTime); |
|
83 |
|
84 void StartOrContinue() { StartOrContinue(iTime); }; |
|
85 |
|
86 |
|
87 private: |
|
88 |
|
89 /** |
|
90 * C++ constructor. |
|
91 */ |
|
92 CMinimapTimer(CMinimap& aMinimap, TMinimapCb aCallback, TInt aPriority); |
|
93 |
|
94 /** |
|
95 * By default Symbian 2nd phase constructor is private. |
|
96 */ |
|
97 void ConstructL(); |
|
98 |
|
99 private: // from CActive |
|
100 |
|
101 void RunL(); |
|
102 void DoCancel(); |
|
103 |
|
104 |
|
105 private: // Data |
|
106 |
|
107 CMinimap* iMinimap; |
|
108 TMinimapCb iCb; |
|
109 RTimer iTimer; |
|
110 TTimeIntervalMicroSeconds32 iTime; |
|
111 }; |
|
112 |
|
113 #endif // CMINIMAPTIMER_H |
|
114 |
|
115 // End of File |