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 |
34 // FORWARD DECLARATIONS |
35 // FORWARD DECLARATIONS |
35 class CIAUpdate; |
36 class CIAUpdate; |
36 class CIAUpdateParameters; |
37 class CIAUpdateParameters; |
37 // class CAknSoftNotifier; |
|
38 class CInternalFileHandler; |
38 class CInternalFileHandler; |
39 class CIdleObserver; |
39 class CIdleObserver; |
40 |
40 |
41 // CLASS DECLARATION |
41 // CLASS DECLARATION |
42 /** |
42 /** |
47 */ |
47 */ |
48 |
48 |
49 class CIAUpdateBGTimer : public CTimer, |
49 class CIAUpdateBGTimer : public CTimer, |
50 public MIAUpdateObserver, |
50 public MIAUpdateObserver, |
51 public MCenRepNotifyHandlerCallback, |
51 public MCenRepNotifyHandlerCallback, |
52 public MIAUpdateBGSoftNotificationCallBack, |
52 public MIAUpdateBGSoftNotificationCallBack |
53 public MIAUpdateBGReminderTimerCallBack |
|
54 |
53 |
55 { |
54 { |
56 public: |
55 public: |
57 |
56 |
58 static CIAUpdateBGTimer* NewL(); |
57 static CIAUpdateBGTimer* NewL(); |
119 TTimeIntervalMinutes TimeIntervalFromNextRefreshL(); |
118 TTimeIntervalMinutes TimeIntervalFromNextRefreshL(); |
120 |
119 |
121 TTimeIntervalMinutes TimeIntervalFromNextShowOfNewFeatureDialogL(); |
120 TTimeIntervalMinutes TimeIntervalFromNextShowOfNewFeatureDialogL(); |
122 |
121 |
123 TBool IsAgreementAcceptedL(); |
122 TBool IsAgreementAcceptedL(); |
124 |
123 |
125 TBool IsAskedAlreadyL(); |
|
126 |
|
127 void HandlerFirstTimeL(); |
124 void HandlerFirstTimeL(); |
128 |
125 |
129 TTime GetLastTimeShowNewFeatureDialogL(); |
126 TTime GetLastTimeShowNewFeatureDialogL(); |
130 |
127 |
131 TInt SetLastTimeShowNewFeatureDialogL( TTime aTime ); |
128 TInt SetLastTimeShowNewFeatureDialogL( TTime aTime ); |
132 |
129 |
133 TBool GetUserDecisionL(); |
130 TBool GetUserDecisionL(); |
134 |
131 |
135 TInt SetUserDecisionL( TBool aDecision ); |
132 TInt SetUserDecisionL( TBool aDecision ); |
136 |
133 |
137 TBool ReminderOnL(); |
|
138 |
|
139 TInt SetReminderL( TBool aOn ); |
|
140 |
|
141 TTime NextRemindTimeL(); |
|
142 |
|
143 TInt SetNextRemindTimeL( TTime aTime ); |
|
144 |
|
145 TIAUpdateBGMode ModeL(); |
134 TIAUpdateBGMode ModeL(); |
146 |
135 |
147 TInt SetModeL( TIAUpdateBGMode aMode ); |
136 TInt SetModeL( TIAUpdateBGMode aMode ); |
148 |
137 |
149 TInt RetryTimesL(); |
138 TInt RetryTimesL(); |
150 |
139 |
151 TInt SetRetryTimesL( TInt aRetry ); |
140 TInt SetRetryTimesL( TInt aRetry ); |
152 |
141 |
153 // HBufC* ReadResourceLC( TInt aResourceId ); |
|
154 |
|
155 void StartIaupdateL() const; |
142 void StartIaupdateL() const; |
156 |
|
157 // void LaunchSoftNotificationL( const TInt& aResourceId, const TInt& SK1, const TInt& SK2 ); |
|
158 |
143 |
159 void LaunchNotificationL( const int aNrOfUpdates ); |
144 void LaunchNotificationL( const int aNrOfUpdates ); |
160 |
145 |
161 TBool IsAutoUpdateDisabledL(); |
146 TBool IsAutoUpdateDisabledL(); |
162 |
147 |
168 |
153 |
169 void DoCheckUpdatesCompleteL( TInt aErrorCode, TInt aAvailableUpdates ); |
154 void DoCheckUpdatesCompleteL( TInt aErrorCode, TInt aAvailableUpdates ); |
170 |
155 |
171 void DoSoftNotificationCallBackL( TBool aIsAccepted ); |
156 void DoSoftNotificationCallBackL( TBool aIsAccepted ); |
172 |
157 |
173 void DoReminderTimerCallBackL(); |
|
174 |
|
175 void StartUpdatesCheckingL(); |
158 void StartUpdatesCheckingL(); |
176 |
|
177 // HBufC8* LoadFileLC(const TDesC& aFile); |
|
178 |
|
179 TInt GetPrivatePathL( TFileName& aPath ); |
|
180 |
|
181 TInt SetSessionPrivatePathL( RFs& aFs, const TDesC& aPath ) const; |
|
182 |
|
183 void SetPrivateDriveL( RFs& aFs, const TDesC& aFileName ) const; |
|
184 |
159 |
185 TBool IAUpdateEnabledL() const; |
160 TBool IAUpdateEnabledL() const; |
186 |
161 |
187 void Shutdown(); |
162 void Shutdown(); |
188 |
163 |
189 private: |
164 private: |
190 // Data |
165 // Data |
191 CIAUpdate* iUpdate; |
166 CIAUpdate* iUpdate; |
192 CIAUpdateParameters* iParameters; |
167 CIAUpdateParameters* iParameters; |
193 CIAUpdateBGReminderTimer* iReminderTimer; |
|
194 CRepository* iIAUpdateCRSession; |
168 CRepository* iIAUpdateCRSession; |
195 CCenRepNotifyHandler* iNotifyHandler; |
169 CCenRepNotifyHandler* iNotifyHandler; |
196 TInt iRuns; |
170 TInt iRuns; |
197 TInt iLastRunLength; |
171 TInt iLastRunLength; |
198 CIAUpdateBGControllerFile* iControllerFile; |
172 CIAUpdateBGControllerFile* iControllerFile; |
199 CIAUpdateBGInternalFileHandler* iInternalFile; |
173 CIAUpdateBGInternalFileHandler* iInternalFile; |
200 TIAUpdateBGMode iMode; |
174 TIAUpdateBGMode iMode; |
201 CIAUpdateBGSoftNotification* iSoftNotification; |
175 CIAUpdateBGSoftNotification* iSoftNotification; |
202 // RResourceFile iResourceFile; |
|
203 RFs iFs; |
|
204 }; |
176 }; |
205 |
177 |
206 #endif //IAUPDATEBGREFRESHTIMER_H |
178 #endif //IAUPDATEBGREFRESHTIMER_H |