220 void CIAUpdateBGInternalFileHandler::SetMode( TIAUpdateBGMode aMode ) |
220 void CIAUpdateBGInternalFileHandler::SetMode( TIAUpdateBGMode aMode ) |
221 { |
221 { |
222 iMode = aMode; |
222 iMode = aMode; |
223 } |
223 } |
224 |
224 |
225 |
|
226 // ----------------------------------------------------------------------------- |
225 // ----------------------------------------------------------------------------- |
227 // CIAUpdateBGInternalFileHandler::Mode |
226 // CIAUpdateBGInternalFileHandler::Mode |
228 // |
227 // |
229 // ----------------------------------------------------------------------------- |
228 // ----------------------------------------------------------------------------- |
230 // |
229 // |
231 TIAUpdateBGMode CIAUpdateBGInternalFileHandler::Mode() |
230 TIAUpdateBGMode CIAUpdateBGInternalFileHandler::Mode() |
232 { |
231 { |
233 return iMode; |
232 return iMode; |
234 } |
233 } |
235 |
234 |
236 |
|
237 // ----------------------------------------------------------------------------- |
235 // ----------------------------------------------------------------------------- |
238 // CIAUpdateBGInternalFileHandler::FwVersion |
236 // CIAUpdateBGInternalFileHandler::FwVersion |
239 // |
237 // |
240 // ----------------------------------------------------------------------------- |
238 // ----------------------------------------------------------------------------- |
241 // |
239 // |
242 HBufC* CIAUpdateBGInternalFileHandler::FwVersion() |
240 HBufC* CIAUpdateBGInternalFileHandler::FwVersion() |
243 { |
241 { |
244 return iFwVersion; |
242 return iFwVersion; |
245 } |
243 } |
246 |
|
247 |
244 |
248 // ---------------------------------------------------------- |
245 // ---------------------------------------------------------- |
249 // CIAUpdateBGInternalFileHandler::SetFwVersionL() |
246 // CIAUpdateBGInternalFileHandler::SetFwVersionL() |
250 // ---------------------------------------------------------- |
247 // ---------------------------------------------------------- |
251 TInt CIAUpdateBGInternalFileHandler::SetFwVersionL( const TDesC& aFwVersion ) |
248 TInt CIAUpdateBGInternalFileHandler::SetFwVersionL( const TDesC& aFwVersion ) |
304 { |
301 { |
305 iRetryTimes = aRetry; |
302 iRetryTimes = aRetry; |
306 } |
303 } |
307 |
304 |
308 // ----------------------------------------------------------------------------- |
305 // ----------------------------------------------------------------------------- |
|
306 // CIAUpdateBGInternalFileHandler::NrOfIndicatorEntries |
|
307 // |
|
308 // ----------------------------------------------------------------------------- |
|
309 // |
|
310 TInt CIAUpdateBGInternalFileHandler::NrOfIndicatorEntries() |
|
311 { |
|
312 return iNrOfIndicatiorEntries; |
|
313 } |
|
314 |
|
315 |
|
316 // ----------------------------------------------------------------------------- |
|
317 // CIAUpdateBGInternalFileHandler::SetNrOfIndicatorEntries |
|
318 // |
|
319 // ----------------------------------------------------------------------------- |
|
320 // |
|
321 void CIAUpdateBGInternalFileHandler::SetNrOfIndicatorEntries( TInt aEntries ) |
|
322 { |
|
323 iNrOfIndicatiorEntries = aEntries; |
|
324 } |
|
325 // ----------------------------------------------------------------------------- |
309 // CIAUpdateBGInternalFileHandler::InternalizeL |
326 // CIAUpdateBGInternalFileHandler::InternalizeL |
310 // |
327 // |
311 // ----------------------------------------------------------------------------- |
328 // ----------------------------------------------------------------------------- |
312 // |
329 // |
313 void CIAUpdateBGInternalFileHandler::InternalizeL( RReadStream& aStream ) |
330 void CIAUpdateBGInternalFileHandler::InternalizeL( RReadStream& aStream ) |
321 |
338 |
322 TInt userDecision( aStream.ReadUint8L() ); |
339 TInt userDecision( aStream.ReadUint8L() ); |
323 // Static casting is safe to do here because enum and TInt are the same. |
340 // Static casting is safe to do here because enum and TInt are the same. |
324 SetUserRejectNewFeatureDialog( static_cast< TBool >( userDecision ) ); |
341 SetUserRejectNewFeatureDialog( static_cast< TBool >( userDecision ) ); |
325 |
342 |
326 /* |
|
327 TInt64 nextRemindTime( 0 ); |
|
328 aStream >> nextRemindTime; |
|
329 SetNextRemindTime( nextRemindTime ); |
|
330 |
|
331 TInt remindOn( aStream.ReadUint8L() ); |
|
332 // Static casting is safe to do here because enum and TInt are the same. |
|
333 SetReminder( static_cast< TBool >( remindOn ) ); |
|
334 */ |
|
335 |
|
336 TInt mode( aStream.ReadUint8L() ); |
343 TInt mode( aStream.ReadUint8L() ); |
337 SetMode( static_cast<TIAUpdateBGMode> (mode) ); |
344 SetMode( static_cast<TIAUpdateBGMode> (mode) ); |
338 |
345 |
339 //read the length of fw version string |
346 //read the length of fw version string |
340 TInt fwlength ( aStream.ReadUint8L() ); |
347 TInt fwlength ( aStream.ReadUint8L() ); |
346 TInt snid ( aStream.ReadUint16L() ); |
353 TInt snid ( aStream.ReadUint16L() ); |
347 SetSoftNotificationID( snid ); |
354 SetSoftNotificationID( snid ); |
348 |
355 |
349 TInt retry ( aStream.ReadUint8L() ); |
356 TInt retry ( aStream.ReadUint8L() ); |
350 SetRetryTimes( retry ); |
357 SetRetryTimes( retry ); |
|
358 |
|
359 TInt entries ( aStream.ReadUint8L() ); |
|
360 SetNrOfIndicatorEntries( entries ); |
|
361 |
351 } |
362 } |
352 |
363 |
353 |
364 |
354 // ----------------------------------------------------------------------------- |
365 // ----------------------------------------------------------------------------- |
355 // CIAUpdateBGInternalFileHandler::ExternalizeL |
366 // CIAUpdateBGInternalFileHandler::ExternalizeL |
364 TInt64 lastshowTime( LastTimeShowNewFeatureDialog().Int64() ); |
375 TInt64 lastshowTime( LastTimeShowNewFeatureDialog().Int64() ); |
365 aStream << lastshowTime; |
376 aStream << lastshowTime; |
366 |
377 |
367 TInt userDecision ( UserRejectNewFeatureDialog() ); |
378 TInt userDecision ( UserRejectNewFeatureDialog() ); |
368 aStream.WriteUint8L( userDecision ); |
379 aStream.WriteUint8L( userDecision ); |
369 |
|
370 /* |
|
371 TInt64 nextRemindTime( NextRemindTime().Int64() ); |
|
372 aStream << nextRemindTime; |
|
373 |
|
374 TInt remindOn ( ReminderOn() ); |
|
375 aStream.WriteUint8L( remindOn ); |
|
376 */ |
|
377 |
380 |
378 TInt mode( Mode() ); |
381 TInt mode( Mode() ); |
379 aStream.WriteUint8L( mode ); |
382 aStream.WriteUint8L( mode ); |
380 |
383 |
381 //write length of fw string |
384 //write length of fw string |
386 TInt snid ( SoftNotificationID() ); |
389 TInt snid ( SoftNotificationID() ); |
387 aStream.WriteUint16L( snid ); |
390 aStream.WriteUint16L( snid ); |
388 |
391 |
389 TInt retry ( RetryTimes() ); |
392 TInt retry ( RetryTimes() ); |
390 aStream.WriteUint8L( retry ); |
393 aStream.WriteUint8L( retry ); |
|
394 |
|
395 TInt entries ( NrOfIndicatorEntries() ); |
|
396 aStream.WriteUint8L( entries ); |
|
397 |
391 } |
398 } |
392 |
399 |
393 //EOF |
400 //EOF |