65 // |
62 // |
66 // ----------------------------------------------------------------------------- |
63 // ----------------------------------------------------------------------------- |
67 // |
64 // |
68 CIAUpdateBGInternalFileHandler::CIAUpdateBGInternalFileHandler() |
65 CIAUpdateBGInternalFileHandler::CIAUpdateBGInternalFileHandler() |
69 : iLastTimeShowNewFeatureDialog( 0 ), iUserRejectNewFeatureDialog( EFalse ), |
66 : iLastTimeShowNewFeatureDialog( 0 ), iUserRejectNewFeatureDialog( EFalse ), |
70 iNextRemindTime(0), iIsReminderOn( EFalse ), iMode( EFirstTimeMode ), iFwVersion( NULL ), |
67 iMode( EFirstTimeMode ), iFwVersion( NULL ), |
71 iSNID(0), iRetryTimes(0) |
68 iSNID(0), iRetryTimes(0) |
72 { |
69 { |
73 } |
70 } |
74 |
71 |
75 // ----------------------------------------------------------------------------- |
72 // ----------------------------------------------------------------------------- |
213 void CIAUpdateBGInternalFileHandler::SetUserRejectNewFeatureDialog( TBool aUserDecision ) |
210 void CIAUpdateBGInternalFileHandler::SetUserRejectNewFeatureDialog( TBool aUserDecision ) |
214 { |
211 { |
215 iUserRejectNewFeatureDialog = aUserDecision; |
212 iUserRejectNewFeatureDialog = aUserDecision; |
216 } |
213 } |
217 |
214 |
218 |
|
219 // ----------------------------------------------------------------------------- |
|
220 // CIAUpdateBGInternalFileHandler::ReminderOn |
|
221 // |
|
222 // ----------------------------------------------------------------------------- |
|
223 // |
|
224 TBool CIAUpdateBGInternalFileHandler::ReminderOn() |
|
225 { |
|
226 return iIsReminderOn; |
|
227 } |
|
228 |
|
229 |
|
230 // ----------------------------------------------------------------------------- |
|
231 // CIAUpdateBGInternalFileHandler::SetReminder |
|
232 // |
|
233 // ----------------------------------------------------------------------------- |
|
234 // |
|
235 void CIAUpdateBGInternalFileHandler::SetReminder( TBool aOn ) |
|
236 { |
|
237 iIsReminderOn = aOn; |
|
238 } |
|
239 |
|
240 |
|
241 // ----------------------------------------------------------------------------- |
|
242 // CIAUpdateBGInternalFileHandler::NextRemindTime |
|
243 // |
|
244 // ----------------------------------------------------------------------------- |
|
245 // |
|
246 TTime CIAUpdateBGInternalFileHandler::NextRemindTime() |
|
247 { |
|
248 return iNextRemindTime; |
|
249 } |
|
250 |
|
251 |
|
252 // ----------------------------------------------------------------------------- |
|
253 // CIAUpdateBGInternalFileHandler::SetNextRemindTime |
|
254 // |
|
255 // ----------------------------------------------------------------------------- |
|
256 // |
|
257 void CIAUpdateBGInternalFileHandler::SetNextRemindTime( TTime aNextRemindTime ) |
|
258 { |
|
259 iNextRemindTime = aNextRemindTime; |
|
260 } |
|
261 |
|
262 |
|
263 // ----------------------------------------------------------------------------- |
|
264 // CIAUpdateBGInternalFileHandler::SetNextRemindTime |
|
265 // |
|
266 // ----------------------------------------------------------------------------- |
|
267 // |
|
268 void CIAUpdateBGInternalFileHandler::SetNextRemindTime( TInt64 aNextRemindTime ) |
|
269 { |
|
270 iNextRemindTime = aNextRemindTime; |
|
271 } |
|
272 |
|
273 |
|
274 // ----------------------------------------------------------------------------- |
215 // ----------------------------------------------------------------------------- |
275 // CIAUpdateBGInternalFileHandler::SetMode |
216 // CIAUpdateBGInternalFileHandler::SetMode |
276 // |
217 // |
277 // ----------------------------------------------------------------------------- |
218 // ----------------------------------------------------------------------------- |
278 // |
219 // |
380 |
321 |
381 TInt userDecision( aStream.ReadUint8L() ); |
322 TInt userDecision( aStream.ReadUint8L() ); |
382 // Static casting is safe to do here because enum and TInt are the same. |
323 // Static casting is safe to do here because enum and TInt are the same. |
383 SetUserRejectNewFeatureDialog( static_cast< TBool >( userDecision ) ); |
324 SetUserRejectNewFeatureDialog( static_cast< TBool >( userDecision ) ); |
384 |
325 |
|
326 /* |
385 TInt64 nextRemindTime( 0 ); |
327 TInt64 nextRemindTime( 0 ); |
386 aStream >> nextRemindTime; |
328 aStream >> nextRemindTime; |
387 SetNextRemindTime( nextRemindTime ); |
329 SetNextRemindTime( nextRemindTime ); |
388 |
330 |
389 TInt remindOn( aStream.ReadUint8L() ); |
331 TInt remindOn( aStream.ReadUint8L() ); |
390 // Static casting is safe to do here because enum and TInt are the same. |
332 // Static casting is safe to do here because enum and TInt are the same. |
391 SetReminder( static_cast< TBool >( remindOn ) ); |
333 SetReminder( static_cast< TBool >( remindOn ) ); |
|
334 */ |
392 |
335 |
393 TInt mode( aStream.ReadUint8L() ); |
336 TInt mode( aStream.ReadUint8L() ); |
394 SetMode( static_cast<TIAUpdateBGMode> (mode) ); |
337 SetMode( static_cast<TIAUpdateBGMode> (mode) ); |
395 |
338 |
396 //read the length of fw version string |
339 //read the length of fw version string |
422 aStream << lastshowTime; |
365 aStream << lastshowTime; |
423 |
366 |
424 TInt userDecision ( UserRejectNewFeatureDialog() ); |
367 TInt userDecision ( UserRejectNewFeatureDialog() ); |
425 aStream.WriteUint8L( userDecision ); |
368 aStream.WriteUint8L( userDecision ); |
426 |
369 |
|
370 /* |
427 TInt64 nextRemindTime( NextRemindTime().Int64() ); |
371 TInt64 nextRemindTime( NextRemindTime().Int64() ); |
428 aStream << nextRemindTime; |
372 aStream << nextRemindTime; |
429 |
373 |
430 TInt remindOn ( ReminderOn() ); |
374 TInt remindOn ( ReminderOn() ); |
431 aStream.WriteUint8L( remindOn ); |
375 aStream.WriteUint8L( remindOn ); |
|
376 */ |
432 |
377 |
433 TInt mode( Mode() ); |
378 TInt mode( Mode() ); |
434 aStream.WriteUint8L( mode ); |
379 aStream.WriteUint8L( mode ); |
435 |
380 |
436 //write length of fw string |
381 //write length of fw string |