1 /* |
1 /* |
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
24 #include <cenrepnotifyhandler.h> |
24 #include <cenrepnotifyhandler.h> |
25 #include <centralrepository.h> |
25 #include <centralrepository.h> |
26 #include <iaupdateobserver.h> |
26 #include <iaupdateobserver.h> |
27 #include <barsc.h> |
27 #include <barsc.h> |
28 |
28 |
29 #include "iaupdatebgremindertimer.h" |
29 |
|
30 #include "iaupdatebginternalfilehandler.h" |
30 #include "iaupdatebgcontrollerfile.h" |
31 #include "iaupdatebgcontrollerfile.h" |
31 #include "iaupdatebgsoftnotification.h" |
32 #include "iaupdatebgsoftnotification.h" |
32 #include "iaupdatebgcheckermode.h" |
33 #include "iaupdatebgcheckermode.h" |
33 |
34 |
|
35 #include "iaupdatebgnotifyhandler.h" |
|
36 |
34 // FORWARD DECLARATIONS |
37 // FORWARD DECLARATIONS |
35 class CIAUpdate; |
38 class CIAUpdate; |
36 class CIAUpdateParameters; |
39 class CIAUpdateParameters; |
37 class CAknSoftNotifier; |
|
38 class CInternalFileHandler; |
40 class CInternalFileHandler; |
39 class CIdleObserver; |
41 class CIdleObserver; |
40 |
42 |
41 // CLASS DECLARATION |
43 // CLASS DECLARATION |
42 /** |
44 /** |
47 */ |
49 */ |
48 |
50 |
49 class CIAUpdateBGTimer : public CTimer, |
51 class CIAUpdateBGTimer : public CTimer, |
50 public MIAUpdateObserver, |
52 public MIAUpdateObserver, |
51 public MCenRepNotifyHandlerCallback, |
53 public MCenRepNotifyHandlerCallback, |
52 public MIAUpdateBGSoftNotificationCallBack, |
54 public MIAUpdateBGSoftNotificationCallBack, |
53 public MIAUpdateBGReminderTimerCallBack |
55 public MIAUpdateBGNotifyObserver |
54 |
56 |
55 { |
57 { |
56 public: |
58 public: |
57 |
59 |
58 static CIAUpdateBGTimer* NewL(); |
60 static CIAUpdateBGTimer* NewL(); |
119 TTimeIntervalMinutes TimeIntervalFromNextRefreshL(); |
125 TTimeIntervalMinutes TimeIntervalFromNextRefreshL(); |
120 |
126 |
121 TTimeIntervalMinutes TimeIntervalFromNextShowOfNewFeatureDialogL(); |
127 TTimeIntervalMinutes TimeIntervalFromNextShowOfNewFeatureDialogL(); |
122 |
128 |
123 TBool IsAgreementAcceptedL(); |
129 TBool IsAgreementAcceptedL(); |
124 |
130 |
125 TBool IsAskedAlreadyL(); |
|
126 |
|
127 void HandlerFirstTimeL(); |
131 void HandlerFirstTimeL(); |
128 |
132 |
129 TTime GetLastTimeShowNewFeatureDialogL(); |
133 TTime GetLastTimeShowNewFeatureDialogL(); |
130 |
134 |
131 TInt SetLastTimeShowNewFeatureDialogL( TTime aTime ); |
135 TInt SetLastTimeShowNewFeatureDialogL( TTime aTime ); |
132 |
136 |
133 TBool GetUserDecisionL(); |
137 TBool GetUserDecisionL(); |
134 |
138 |
135 TInt SetUserDecisionL( TBool aDecision ); |
139 TInt SetUserDecisionL( TBool aDecision ); |
136 |
140 |
137 TBool ReminderOnL(); |
|
138 |
|
139 TInt SetReminderL( TBool aOn ); |
|
140 |
|
141 TTime NextRemindTimeL(); |
|
142 |
|
143 TInt SetNextRemindTimeL( TTime aTime ); |
|
144 |
|
145 TIAUpdateBGMode ModeL(); |
141 TIAUpdateBGMode ModeL(); |
146 |
142 |
147 TInt SetModeL( TIAUpdateBGMode aMode ); |
143 TInt SetModeL( TIAUpdateBGMode aMode ); |
|
144 |
|
145 TInt NrOfIndicatorEntries(); |
|
146 |
|
147 TInt SetNrOfIndicatorEntriesL( TInt aEntries ); |
148 |
148 |
149 TInt RetryTimesL(); |
149 TInt RetryTimesL(); |
150 |
150 |
151 TInt SetRetryTimesL( TInt aRetry ); |
151 TInt SetRetryTimesL( TInt aRetry ); |
152 |
152 |
153 HBufC* ReadResourceLC( TInt aResourceId ); |
|
154 |
|
155 void StartIaupdateL() const; |
153 void StartIaupdateL() const; |
156 |
154 |
157 void LaunchSoftNotificationL( const TInt& aResourceId, const TInt& SK1, const TInt& SK2 ); |
155 void LaunchNotificationL( const int aNrOfUpdates ); |
158 |
156 |
159 TBool IsAutoUpdateDisabledL(); |
157 TBool IsAutoUpdateDisabledL(); |
160 |
158 |
161 void ListenAutoUpdateSettingsL(); |
159 void ListenAutoUpdateSettingsL(); |
162 |
160 |
166 |
164 |
167 void DoCheckUpdatesCompleteL( TInt aErrorCode, TInt aAvailableUpdates ); |
165 void DoCheckUpdatesCompleteL( TInt aErrorCode, TInt aAvailableUpdates ); |
168 |
166 |
169 void DoSoftNotificationCallBackL( TBool aIsAccepted ); |
167 void DoSoftNotificationCallBackL( TBool aIsAccepted ); |
170 |
168 |
171 void DoReminderTimerCallBackL(); |
|
172 |
|
173 void StartUpdatesCheckingL(); |
169 void StartUpdatesCheckingL(); |
174 |
|
175 HBufC8* LoadFileLC(const TDesC& aFile); |
|
176 |
|
177 TInt GetPrivatePathL( TFileName& aPath ); |
|
178 |
|
179 TInt SetSessionPrivatePathL( RFs& aFs, const TDesC& aPath ) const; |
|
180 |
|
181 void SetPrivateDriveL( RFs& aFs, const TDesC& aFileName ) const; |
|
182 |
170 |
183 TBool IAUpdateEnabledL() const; |
171 TBool IAUpdateEnabledL() const; |
184 |
172 |
185 void Shutdown(); |
173 void Shutdown(); |
186 |
174 |
187 private: |
175 private: |
188 // Data |
176 // Data |
189 CIAUpdate* iUpdate; |
177 CIAUpdate* iUpdate; |
190 CIAUpdateParameters* iParameters; |
178 CIAUpdateParameters* iParameters; |
191 CIAUpdateBGReminderTimer* iReminderTimer; |
|
192 CRepository* iIAUpdateCRSession; |
179 CRepository* iIAUpdateCRSession; |
193 CCenRepNotifyHandler* iNotifyHandler; |
180 CCenRepNotifyHandler* iNotifyHandler; |
194 TInt iRuns; |
181 TInt iRuns; |
195 TInt iLastRunLength; |
182 TInt iLastRunLength; |
196 CIAUpdateBGControllerFile* iControllerFile; |
183 CIAUpdateBGControllerFile* iControllerFile; |
197 CIAUpdateBGInternalFileHandler* iInternalFile; |
184 CIAUpdateBGInternalFileHandler* iInternalFile; |
198 TIAUpdateBGMode iMode; |
185 TIAUpdateBGMode iMode; |
199 CIAUpdateBGSoftNotification* iSoftNotification; |
186 CIAUpdateBGSoftNotification* iSoftNotification; |
200 RResourceFile iResourceFile; |
187 |
201 RFs iFs; |
188 CIAUpdateBGNotifyHandler* iIndicatorNotifyHandler; |
202 }; |
189 }; |
203 |
190 |
204 #endif //IAUPDATEBGREFRESHTIMER_H |
191 #endif //IAUPDATEBGREFRESHTIMER_H |