equal
deleted
inserted
replaced
19 #include <hwrmlight.h> |
19 #include <hwrmlight.h> |
20 |
20 |
21 #ifndef TMACTIVITYMANAGER_H |
21 #ifndef TMACTIVITYMANAGER_H |
22 #define TMACTIVITYMANAGER_H |
22 #define TMACTIVITYMANAGER_H |
23 |
23 |
|
24 //5.0 and 9.2 behaves totally different way, |
|
25 //! uncomment on 5.0 ! |
|
26 #define MONITOR_LIGHTS |
|
27 |
24 |
28 |
25 class MTMActivityManagerObserver |
29 class MTMActivityManagerObserver |
26 |
30 |
27 { |
31 { |
28 public : |
32 public : |
29 virtual void ActivityChanged(const TBool aActive) = 0; |
33 virtual void ActivityChanged(const TBool aActive) = 0; |
30 }; |
34 }; |
31 |
35 |
32 |
36 |
33 class CTMActivityManager : public CActive, |
37 class CTMActivityManager : public CActive |
34 public MHWRMLightObserver |
38 #ifdef MONITOR_LIGHTS |
|
39 ,public MHWRMLightObserver |
|
40 #endif |
35 |
41 |
36 { |
42 { |
37 public: |
43 public: |
38 |
44 |
39 /** |
45 /** |
65 protected: |
71 protected: |
66 CTMActivityManager(MTMActivityManagerObserver* aObserver, TInt aTimeout); |
72 CTMActivityManager(MTMActivityManagerObserver* aObserver, TInt aTimeout); |
67 void ConstructL(); |
73 void ConstructL(); |
68 void NotifyObserver(); |
74 void NotifyObserver(); |
69 |
75 |
|
76 #ifdef MONITOR_LIGHTS |
70 private: //From MHWRMLightObserver |
77 private: //From MHWRMLightObserver |
71 void LightStatusChanged(TInt aTarget, CHWRMLight::TLightStatus aStatus); |
78 void LightStatusChanged(TInt aTarget, CHWRMLight::TLightStatus aStatus); |
|
79 #endif |
72 |
80 |
73 protected: |
81 protected: |
74 enum TWatch { ENone = 0, EWaitingForInactivity, EWaitingForActivity }; |
82 enum TWatch { ENone = 0, EWaitingForInactivity, EWaitingForActivity }; |
75 |
83 |
76 protected: |
84 protected: |
77 RTimer iTimer; |
85 RTimer iTimer; |
78 TWatch iWatch; |
86 TWatch iWatch; |
79 MTMActivityManagerObserver* iObserver; ///The observer of activity status |
87 MTMActivityManagerObserver* iObserver; ///The observer of activity status |
80 TInt iTimeout; ///Current inactivity period |
88 TInt iTimeout; ///Current inactivity period |
81 |
89 |
|
90 #ifdef MONITOR_LIGHTS |
82 //Backlight control |
91 //Backlight control |
83 CHWRMLight* iLight; |
92 CHWRMLight* iLight; |
84 //backlight status |
93 //backlight status |
85 TBool iLights; |
94 TBool iLights; |
86 |
95 #endif |
87 //previous status |
96 //previous status |
88 TInt iPreviousStatus; |
97 TInt iPreviousStatus; |
89 TBool iFirstRound; |
98 TBool iFirstRound; |
90 }; |
99 }; |
91 |
100 |