diff -r a3a1ae9acec6 -r da5135c61bad meetingrequest/mricalviewer/src/cesmrimapicalretriever.cpp --- a/meetingrequest/mricalviewer/src/cesmrimapicalretriever.cpp Mon Mar 15 12:39:10 2010 +0200 +++ b/meetingrequest/mricalviewer/src/cesmrimapicalretriever.cpp Wed Mar 31 21:08:33 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -19,7 +19,6 @@ #include "emailtrace.h" #include "cesmrimapicalretriever.h" #include "cesmrimapmailfetcher.h" -#include "cesmrattachmentinfo.h" #include "tesmrinputparams.h" #include "esmricalviewerutils.h" #include "esmrconfig.hrh" @@ -40,7 +39,7 @@ #include #include #include -#include +#include #include #include @@ -52,7 +51,7 @@ // Literal for received ics filename // hard coded path removal, store goes to process's own private directory -//_LIT( KTempReceivedIcsFile, +//_LIT( KTempReceivedIcsFile, // "c:\\temp\\tempreceived.ics" ); //codescanner::driveletters _LIT( KTempReceivedIcsFileName, "temp\\tempreceived.ics" ); // @@ -70,20 +69,6 @@ * * @param aArray Pointer to RPointerArray. */ -void MessagePartPointerArrayCleanup( TAny* aArray ) - { - RPointerArray* messagePartArray = - static_cast*>( aArray ); - - messagePartArray->ResetAndDestroy(); - messagePartArray->Close(); - } - -/** - * Cleanup operations for RPointerArray. - * - * @param aArray Pointer to RPointerArray. - */ void CalEntryPointerArrayCleanup( TAny* aArray ) { RPointerArray* entryArray = @@ -126,7 +111,6 @@ delete iMailFetcher; delete iConvertedEntry; delete iIcsFilename; - delete iAttachmentInfo; } // --------------------------------------------------------------------------- @@ -275,13 +259,11 @@ User::Leave( KErrNotFound ); } CleanupStack::PushL( calendarPart ); - + CreateEntryL( *calendarPart, *msg ); iInputParameters.iCalEntry = iConvertedEntry; iCalendarPartId = calendarPart->GetPartId(); - CheckAttachmentDataL( *message ); - CleanupStack::PopAndDestroy( calendarPart ); CleanupStack::PopAndDestroy( message ); } @@ -367,76 +349,5 @@ } } -// --------------------------------------------------------------------------- -// CESMRImapIcalRetriever::CheckAttachmentDataL -// --------------------------------------------------------------------------- -// -void CESMRImapIcalRetrieverCmd::CheckAttachmentDataL( - CFSMailMessage& aMessage ) - { - FUNC_LOG; - if ( aMessage.IsFlagSet( EFSMsgFlag_Attachments ) ) - { - RPointerArray attachmentParts; - CleanupStack::PushL( - TCleanupItem( - MessagePartPointerArrayCleanup, - &attachmentParts ) ); - - aMessage.AttachmentListL( attachmentParts ); - - TInt attachmentCount( attachmentParts.Count() ); - if ( attachmentCount > 0 ) - { - delete iAttachmentInfo; - iAttachmentInfo = NULL; - - iInputParameters.iAttachmentInfo = NULL; - - CESMRAttachmentInfo* attachmentInfo = CESMRAttachmentInfo::NewL(); - CleanupStack::PushL( attachmentInfo ); - - for( TInt i(0); i < attachmentCount; ++i ) - { - CESMRAttachment::TESMRAttachmentState state( - CESMRAttachment::EAttachmentStateDownloaded ); - - if ( EFSFull != attachmentParts[i]->FetchLoadState() ) - { - state = CESMRAttachment::EAttachmentStateNotDownloaded; - } - - TInt contentSize( attachmentParts[i]->ContentSize() ); - TPtrC attachmentName( attachmentParts[i]->AttachmentNameL() ); - - if ( contentSize >= 0 && attachmentName.Length() && - iCalendarPartId != attachmentParts[i]->GetPartId() ) - { - attachmentInfo->AddAttachmentInfoL( - attachmentName, - contentSize, - state ); - } - } - - if ( attachmentInfo->AttachmentCount() ) - { - iAttachmentInfo = attachmentInfo; - CleanupStack::Pop( attachmentInfo ); - // ownership does not change - iInputParameters.iAttachmentInfo = iAttachmentInfo; - } - else - { - CleanupStack::PopAndDestroy( attachmentInfo ); - } - - attachmentInfo = NULL; - - } - CleanupStack::PopAndDestroy(); // attachmentparts - } - } - // EOF