1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: Timer for Hight light listbox item Container |
|
14 // |
|
15 // |
|
16 |
|
17 |
|
18 #ifndef GSSIP_TIMER_H |
|
19 #define GSSIP_TIMER_H |
|
20 |
|
21 // INCLUDES |
|
22 |
|
23 #include <coecntrl.h> |
|
24 #include <eiklbi.h> |
|
25 #include <aknlists.h> |
|
26 |
|
27 /** |
|
28 * CGSSIPTimer class |
|
29 */ |
|
30 class CGSSIPTimer: public CBase, |
|
31 public MBeating |
|
32 { |
|
33 public: // Constructors and destructor |
|
34 |
|
35 /** |
|
36 * Two-phased constructor. |
|
37 * @return Pointer to created instance |
|
38 */ |
|
39 static CGSSIPTimer* NewL( const CCoeControl& aContainer, |
|
40 CListItemDrawer& aListItemDrawer ); |
|
41 |
|
42 /** |
|
43 * Destructor. |
|
44 */ |
|
45 virtual ~CGSSIPTimer(); |
|
46 |
|
47 /** |
|
48 * By default Symbian 2nd phase constructor is private. |
|
49 */ |
|
50 void ConstructL(); |
|
51 |
|
52 |
|
53 /** |
|
54 * Record beat count |
|
55 */ |
|
56 void Beat(); |
|
57 |
|
58 /** |
|
59 * Synchronize |
|
60 */ |
|
61 void Synchronize(); |
|
62 |
|
63 /** |
|
64 * Start timer |
|
65 */ |
|
66 void StartTimer(); |
|
67 |
|
68 /** |
|
69 * Stop timer |
|
70 */ |
|
71 void StopTimer(); |
|
72 |
|
73 /** |
|
74 * IsStarted() |
|
75 */ |
|
76 TBool IsStarted() const; |
|
77 |
|
78 |
|
79 private: |
|
80 |
|
81 /** |
|
82 * C++ default constructor. |
|
83 */ |
|
84 CGSSIPTimer( const CCoeControl& aContainer, |
|
85 CListItemDrawer& aListItemDrawer ); |
|
86 |
|
87 public: |
|
88 // Timer count |
|
89 TInt iTotal; |
|
90 |
|
91 private: |
|
92 |
|
93 // Timer |
|
94 CHeartbeat* iHeart; |
|
95 |
|
96 //parameter iContainer |
|
97 const CCoeControl& iContainer; |
|
98 |
|
99 //parameter iListItemDrawer |
|
100 CListItemDrawer& iListItemDrawer; |
|
101 |
|
102 |
|
103 // Check if timer is started |
|
104 TBool iIfStart; |
|
105 /** |
|
106 * For testing purposes |
|
107 */ |
|
108 friend class UT_GSSIPTimer; |
|
109 }; |
|
110 |
|
111 #endif // GSSIP_TIMER_H |
|
112 |
|
113 // End of File |
|