1 /* |
1 /* |
2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008-2009 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 |
29 #include "iaupdatebgremindertimer.h" |
30 #include "iaupdatebginternalfilehandler.h" |
|
31 #include "iaupdatebgcontrollerfile.h" |
30 #include "iaupdatebgcontrollerfile.h" |
32 #include "iaupdatebgsoftnotification.h" |
31 #include "iaupdatebgsoftnotification.h" |
33 #include "iaupdatebgcheckermode.h" |
32 #include "iaupdatebgcheckermode.h" |
34 |
33 |
35 #include "iaupdatebgnotifyhandler.h" |
|
36 |
|
37 // FORWARD DECLARATIONS |
34 // FORWARD DECLARATIONS |
38 class CIAUpdate; |
35 class CIAUpdate; |
39 class CIAUpdateParameters; |
36 class CIAUpdateParameters; |
|
37 class CAknSoftNotifier; |
40 class CInternalFileHandler; |
38 class CInternalFileHandler; |
41 class CIdleObserver; |
39 class CIdleObserver; |
42 |
40 |
43 // CLASS DECLARATION |
41 // CLASS DECLARATION |
44 /** |
42 /** |
49 */ |
47 */ |
50 |
48 |
51 class CIAUpdateBGTimer : public CTimer, |
49 class CIAUpdateBGTimer : public CTimer, |
52 public MIAUpdateObserver, |
50 public MIAUpdateObserver, |
53 public MCenRepNotifyHandlerCallback, |
51 public MCenRepNotifyHandlerCallback, |
54 public MIAUpdateBGSoftNotificationCallBack, |
52 public MIAUpdateBGSoftNotificationCallBack, |
55 public MIAUpdateBGNotifyObserver |
53 public MIAUpdateBGReminderTimerCallBack |
56 |
54 |
57 { |
55 { |
58 public: |
56 public: |
59 |
57 |
60 static CIAUpdateBGTimer* NewL(); |
58 static CIAUpdateBGTimer* NewL(); |
125 TTimeIntervalMinutes TimeIntervalFromNextRefreshL(); |
119 TTimeIntervalMinutes TimeIntervalFromNextRefreshL(); |
126 |
120 |
127 TTimeIntervalMinutes TimeIntervalFromNextShowOfNewFeatureDialogL(); |
121 TTimeIntervalMinutes TimeIntervalFromNextShowOfNewFeatureDialogL(); |
128 |
122 |
129 TBool IsAgreementAcceptedL(); |
123 TBool IsAgreementAcceptedL(); |
130 |
124 |
|
125 TBool IsAskedAlreadyL(); |
|
126 |
131 void HandlerFirstTimeL(); |
127 void HandlerFirstTimeL(); |
132 |
128 |
133 TTime GetLastTimeShowNewFeatureDialogL(); |
129 TTime GetLastTimeShowNewFeatureDialogL(); |
134 |
130 |
135 TInt SetLastTimeShowNewFeatureDialogL( TTime aTime ); |
131 TInt SetLastTimeShowNewFeatureDialogL( TTime aTime ); |
136 |
132 |
137 TBool GetUserDecisionL(); |
133 TBool GetUserDecisionL(); |
138 |
134 |
139 TInt SetUserDecisionL( TBool aDecision ); |
135 TInt SetUserDecisionL( TBool aDecision ); |
140 |
136 |
|
137 TBool ReminderOnL(); |
|
138 |
|
139 TInt SetReminderL( TBool aOn ); |
|
140 |
|
141 TTime NextRemindTimeL(); |
|
142 |
|
143 TInt SetNextRemindTimeL( TTime aTime ); |
|
144 |
141 TIAUpdateBGMode ModeL(); |
145 TIAUpdateBGMode ModeL(); |
142 |
146 |
143 TInt SetModeL( TIAUpdateBGMode aMode ); |
147 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 |
153 void StartIaupdateL() const; |
155 void StartIaupdateL() const; |
154 |
156 |
155 void LaunchNotificationL( const int aNrOfUpdates ); |
157 void LaunchSoftNotificationL( const TInt& aResourceId, const TInt& SK1, const TInt& SK2 ); |
156 |
158 |
157 TBool IsAutoUpdateDisabledL(); |
159 TBool IsAutoUpdateDisabledL(); |
158 |
160 |
159 void ListenAutoUpdateSettingsL(); |
161 void ListenAutoUpdateSettingsL(); |
160 |
162 |
164 |
166 |
165 void DoCheckUpdatesCompleteL( TInt aErrorCode, TInt aAvailableUpdates ); |
167 void DoCheckUpdatesCompleteL( TInt aErrorCode, TInt aAvailableUpdates ); |
166 |
168 |
167 void DoSoftNotificationCallBackL( TBool aIsAccepted ); |
169 void DoSoftNotificationCallBackL( TBool aIsAccepted ); |
168 |
170 |
|
171 void DoReminderTimerCallBackL(); |
|
172 |
169 void StartUpdatesCheckingL(); |
173 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; |
170 |
182 |
171 TBool IAUpdateEnabledL() const; |
183 TBool IAUpdateEnabledL() const; |
172 |
184 |
173 void Shutdown(); |
185 void Shutdown(); |
174 |
186 |
175 private: |
187 private: |
176 // Data |
188 // Data |
177 CIAUpdate* iUpdate; |
189 CIAUpdate* iUpdate; |
178 CIAUpdateParameters* iParameters; |
190 CIAUpdateParameters* iParameters; |
|
191 CIAUpdateBGReminderTimer* iReminderTimer; |
179 CRepository* iIAUpdateCRSession; |
192 CRepository* iIAUpdateCRSession; |
180 CCenRepNotifyHandler* iNotifyHandler; |
193 CCenRepNotifyHandler* iNotifyHandler; |
181 TInt iRuns; |
194 TInt iRuns; |
182 TInt iLastRunLength; |
195 TInt iLastRunLength; |
183 CIAUpdateBGControllerFile* iControllerFile; |
196 CIAUpdateBGControllerFile* iControllerFile; |
184 CIAUpdateBGInternalFileHandler* iInternalFile; |
197 CIAUpdateBGInternalFileHandler* iInternalFile; |
185 TIAUpdateBGMode iMode; |
198 TIAUpdateBGMode iMode; |
186 CIAUpdateBGSoftNotification* iSoftNotification; |
199 CIAUpdateBGSoftNotification* iSoftNotification; |
187 |
200 RResourceFile iResourceFile; |
188 CIAUpdateBGNotifyHandler* iIndicatorNotifyHandler; |
201 RFs iFs; |
189 }; |
202 }; |
190 |
203 |
191 #endif //IAUPDATEBGREFRESHTIMER_H |
204 #endif //IAUPDATEBGREFRESHTIMER_H |