--- a/meetingrequest/mricalviewer/src/cesmricalvieweropenmrcmd.cpp Mon Mar 15 12:39:10 2010 +0200
+++ b/meetingrequest/mricalviewer/src/cesmricalvieweropenmrcmd.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"
@@ -23,7 +23,7 @@
#include "cesmricalvieweremailasynccmd.h"
#include "cesmricalvieweremailsynccmd.h"
#include "cesmruilauncher.h"
-#include "cesmrattachmentinfo.h"
+#include "cmrattachmentinfofetcher.h"
#include "esmricalviewerutils.h"
//<cmail>
@@ -60,14 +60,13 @@
CancelCommand();
delete iLoadMRDataCmd;
delete iUILauncher;
-
- // <cmail>
+ delete iAttachmentInfoFetcher;
+
if( iEmailCommand )
{
delete iEmailCommand;
iEmailCommand = NULL;
}
- // </cmail>
}
// -----------------------------------------------------------------------------
@@ -216,13 +215,11 @@
TBool asyncCommand(
ESMRIcalViewerUtils::IsAsyncEmailCommand( iCurrentCbCommand ) );
-// <cmail>
if( iEmailCommand )
{
delete iEmailCommand;
iEmailCommand = NULL;
}
-// </cmail>
if ( asyncCommand )
{
@@ -287,6 +284,11 @@
else if ( aResult.iOpType == EESMRLoadMRData )
{
// MR data is loaded
+ FillAttachmentInfoL();
+ }
+ else if( aResult.iOpType == EESMRFetchAttachmentInfo )
+ {
+ // Attachment information is loaded
iInputParameters.iMailClient = &iMailClient;
iInputParameters.iMailMessage = Message();
iInputParameters.iCommand = EESMRCmdUndefined;
@@ -301,12 +303,10 @@
{
case EESMRCmdOpenAttachment://fallthrough
case EESMRCmdOpenAttachmentView://fallthrough
-// <cmail>
case EESMRCmdDownloadAttachment://fallthrough
case EESMRCmdDownloadAllAttachments://fallthrough
case EESMRCmdSaveAttachment://fallthrough
case EESMRCmdSaveAllAttachments://fallthrough
-// </cmail>
{
if ( ESMRIcalViewerUtils::ContainsAttachments(iInputParameters) &&
iMRViewerCommand != iCurrentCbCommand )
@@ -316,7 +316,7 @@
iMRViewerCommand);
}
iCurrentCbCommand = EESMREmailCommand;
- //LaunchUIL();
+ LaunchUIL();
}
break;
@@ -359,7 +359,8 @@
}
if ( !iUILauncher &&
- EESMREmailCommand == iCurrentCbCommand )
+ EESMREmailCommand == iCurrentCbCommand &&
+ aResult.iOpType != EESMRLoadMRData)
{
iResult.iAttendeeStatus =
ESMRIcalViewerUtils::UserResponsedToMRL(
@@ -400,5 +401,26 @@
iUILauncher->ExecuteCommandL( *Message(), *this );
}
+// ---------------------------------------------------------------------------
+// CESMRIcalViewerOpenMRCmd::FillAttachmentInfoL
+// ---------------------------------------------------------------------------
+//
+void CESMRIcalViewerOpenMRCmd::FillAttachmentInfoL()
+ {
+ FUNC_LOG;
+
+ if ( !iAttachmentInfoFetcher )
+ {
+ iAttachmentInfoFetcher =
+ CMRAttachmentInfoFetcher::NewL(
+ iMailClient,
+ CalSession(),
+ *(iInputParameters.iCalEntry) );
+ }
+
+ iAttachmentInfoFetcher->ExecuteCommandL( *Message(), *this );
+ }
+
// EOF
+