equal
deleted
inserted
replaced
466 else |
466 else |
467 { |
467 { |
468 HandleAttachmentCommandInternalL( |
468 HandleAttachmentCommandInternalL( |
469 EESMRViewerSaveAttachment, attachmentIndex ); |
469 EESMRViewerSaveAttachment, attachmentIndex ); |
470 |
470 |
471 if ( EESMRViewerSaveAllAttachments == iCommandInProgress && |
471 if ( EESMRViewerSaveAllAttachments == iCommandInProgress ) |
472 iAttachmentInfo->AttachmentCount() ) |
|
473 { |
472 { |
474 iCommandInProgress = 0; |
473 iCommandInProgress = 0; |
475 |
474 |
476 // There are more attachments to be downloaded --> Download next |
475 if ( iAttachmentInfo->AttachmentCount() > 0 ) |
477 SaveNextRemoteAttachmentL(); |
476 { |
|
477 // There are more attachments to be downloaded --> Download next |
|
478 SaveNextRemoteAttachmentL(); |
|
479 } |
|
480 else |
|
481 { |
|
482 // All remote attachments have been saved. Show info note. |
|
483 ShowInfoNoteL( iEntry.AttachmentCountL() ); |
|
484 } |
478 } |
485 } |
479 else |
486 else |
480 { |
487 { |
481 if ( !iAttachmentInfo->AttachmentCount() ) |
|
482 { |
|
483 // All remote attachments have been saved. Show info note. |
|
484 ShowInfoNoteL( iEntry.AttachmentCountL() ); |
|
485 } |
|
486 iCommandInProgress = 0; |
488 iCommandInProgress = 0; |
487 } |
489 } |
488 } |
490 } |
489 } |
491 } |
490 |
492 |
553 ExecuteCommandL( aCommandId, *command, aAttachmentIndex ) ) |
555 ExecuteCommandL( aCommandId, *command, aAttachmentIndex ) ) |
554 |
556 |
555 if ( error != KErrCancel ) |
557 if ( error != KErrCancel ) |
556 { |
558 { |
557 User::LeaveIfError( error ); |
559 User::LeaveIfError( error ); |
558 |
560 |
559 if ( aCommandId == EESMRViewerSaveAttachment |
561 if ( aCommandId == EESMRViewerSaveAttachment |
560 && iCommandInProgress != EESMRViewerSaveAllAttachments ) |
562 && iCommandInProgress != EESMRViewerSaveAllAttachments ) |
561 { |
563 { |
562 ShowInfoNoteL(); |
564 ShowInfoNoteL(); |
563 } |
565 } |
831 { |
833 { |
832 // Check if error happened during local attachment saving |
834 // Check if error happened during local attachment saving |
833 User::LeaveIfError( error ); |
835 User::LeaveIfError( error ); |
834 |
836 |
835 // Proceed with remote attachments |
837 // Proceed with remote attachments |
836 if ( iAttachmentInfo->AttachmentCount() > 0 ) |
838 if ( iAttachmentInfo && iAttachmentInfo->AttachmentCount() > 0 ) |
837 { |
839 { |
838 SaveNextRemoteAttachmentL(); |
840 SaveNextRemoteAttachmentL(); |
839 } |
841 } |
840 else // Show Save all info note |
842 else // Show Save all info note |
841 { |
843 { |
842 ShowInfoNoteL( iEntry.AttachmentCountL() ); |
844 ShowInfoNoteL( iEntry.AttachmentCountL() ); |
843 } |
845 } |
844 } |
846 } |
845 } |
847 } |
846 |
848 |
847 // --------------------------------------------------------------------------- |
849 // --------------------------------------------------------------------------- |
850 // |
852 // |
851 void CMRAttachmentCommandHandler::SaveNextRemoteAttachmentL() |
853 void CMRAttachmentCommandHandler::SaveNextRemoteAttachmentL() |
852 { |
854 { |
853 __ASSERT_DEBUG( iAttachmentInfo->AttachmentCount() > 0, |
855 __ASSERT_DEBUG( iAttachmentInfo->AttachmentCount() > 0, |
854 Panic( EMRAttachmentCommandHandlerRemoteAttachmentNotFound ) ); |
856 Panic( EMRAttachmentCommandHandlerRemoteAttachmentNotFound ) ); |
855 |
857 |
856 // Save first remote attachment of attachment info |
858 // Save first remote attachment of attachment info |
857 RPointerArray<MCalRemoteAttachment> attachmentArray; |
859 RPointerArray<MCalRemoteAttachment> attachmentArray; |
858 CleanupClosePushL( attachmentArray ); |
860 CleanupClosePushL( attachmentArray ); |
859 const MCalRemoteAttachment& remoteAttachment( |
861 const MCalRemoteAttachment& remoteAttachment( |
860 iAttachmentInfo->AttachmentL( 0 ) ); |
862 iAttachmentInfo->AttachmentL( 0 ) ); |