equal
deleted
inserted
replaced
306 // ---------------------------------------------------------------------------- |
306 // ---------------------------------------------------------------------------- |
307 // ---------------------------------------------------------------------------- |
307 // ---------------------------------------------------------------------------- |
308 void CIpsPlgImap4FetchAttachmentOp::ReportProgressL() |
308 void CIpsPlgImap4FetchAttachmentOp::ReportProgressL() |
309 { |
309 { |
310 FUNC_LOG; |
310 FUNC_LOG; |
|
311 |
311 TInt error = KErrNone; |
312 TInt error = KErrNone; |
|
313 |
312 TFSProgress fsProgress = { TFSProgress::EFSStatus_Waiting, 0, 0, KErrNone }; |
314 TFSProgress fsProgress = { TFSProgress::EFSStatus_Waiting, 0, 0, KErrNone }; |
313 if ( iSubOperation && iState == EStateFetching ) |
315 if ( iSubOperation && iState == EStateFetching ) |
314 { |
316 { |
315 TRAP(error, iProgress.Copy( iSubOperation->ProgressL() ) ); |
317 TRAP(error, iProgress.Copy( iSubOperation->ProgressL() ) ); |
316 } |
318 } |
335 else |
337 else |
336 { |
338 { |
337 User::Leave( error ); |
339 User::Leave( error ); |
338 } |
340 } |
339 |
341 |
|
342 TInt fileSize( 0 ); |
|
343 |
|
344 if ( fsProgress.iMaxCount - fsProgress.iCounter > 0 ) |
|
345 { |
|
346 fileSize = fsProgress.iMaxCount - fsProgress.iCounter; |
|
347 } |
|
348 |
|
349 if ( EnoughDiskSpaceOnCurrentDrive( fileSize ) == EFalse ) |
|
350 { |
|
351 // Not enough space on the disk for the attachment! |
|
352 error = KErrDiskFull; |
|
353 fsProgress.iError = error; |
|
354 } |
|
355 |
340 // <qmail> |
356 // <qmail> |
341 // signal observer if it exists |
357 // signal observer if it exists |
342 if ( iFSOperationObserver ) |
358 if ( iFSOperationObserver ) |
343 { |
359 { |
344 iFSOperationObserver->RequestResponseL( fsProgress, iFSRequestId ); |
360 iFSOperationObserver->RequestResponseL( fsProgress, iFSRequestId ); |
345 } |
361 } |
346 // </qmail> |
362 // </qmail> |
|
363 |
|
364 if ( error == KErrDiskFull ) |
|
365 { |
|
366 Cancel(); |
|
367 } |
347 } |
368 } |
348 |
369 |
349 // ---------------------------------------------------------------------------- |
370 // ---------------------------------------------------------------------------- |
350 // ---------------------------------------------------------------------------- |
371 // ---------------------------------------------------------------------------- |
351 const TDesC8& CIpsPlgImap4FetchAttachmentOp::GetErrorProgressL(TInt /*aError*/ ) |
372 const TDesC8& CIpsPlgImap4FetchAttachmentOp::GetErrorProgressL(TInt /*aError*/ ) |