email/imap4mtm/imapsession/src/cimapfetchbody.cpp
changeset 34 84197e66a4bd
parent 0 72b543305e3a
child 60 7fdbb852d323
equal deleted inserted replaced
31:ebfee66fde93 34:84197e66a4bd
    64 	iImapSettings(aImapSettings),
    64 	iImapSettings(aImapSettings),
    65 	iFetchBodyInfo(aFetchBodyInfo),
    65 	iFetchBodyInfo(aFetchBodyInfo),
    66 	iImapMailStore(aImapMailStore),
    66 	iImapMailStore(aImapMailStore),
    67 	iParent(aParent),
    67 	iParent(aParent),
    68 	iFetchBodyResponse(aFetchBodyResponse),
    68 	iFetchBodyResponse(aFetchBodyResponse),
    69 	iSendFetch(ETrue)
    69 	iSendFetch(ETrue),
       
    70 	iCancelled(EFalse)
    70 	{
    71 	{
    71 	}
    72 	}
    72 	
    73 	
    73 CImapFetchBody::~CImapFetchBody()
    74 CImapFetchBody::~CImapFetchBody()
    74 	{
    75 	{
    84 Overrides CImapCommand::Cancel() by cancelling any outstanding mail store operation.
    85 Overrides CImapCommand::Cancel() by cancelling any outstanding mail store operation.
    85 */
    86 */
    86 void CImapFetchBody::Cancel()
    87 void CImapFetchBody::Cancel()
    87 	{
    88 	{
    88 	__LOG_TEXT(iLogId, "CImapFetchBody::Cancel()"); // Overrides CImapCommand::Cancel()
    89 	__LOG_TEXT(iLogId, "CImapFetchBody::Cancel()"); // Overrides CImapCommand::Cancel()
    89 	
    90 	iCancelled = ETrue;
    90 	iImapMailStore.CancelRequest(*this);
    91 	iImapMailStore.CancelRequest(*this);
    91 	CImapCommand::Cancel();
    92 	CImapCommand::Cancel();
    92 	}
    93 	}
    93 
    94 
    94 void CImapFetchBody::StoreOperationComplete(TMsvId /*aId*/,TInt aErrorCode)
    95 void CImapFetchBody::StoreOperationComplete(TMsvId /*aId*/,TInt aErrorCode)
   224 */
   225 */
   225 void CImapFetchBody::SendMessageL(TInt aTagId, MOutputStream& aStream)
   226 void CImapFetchBody::SendMessageL(TInt aTagId, MOutputStream& aStream)
   226 	{	
   227 	{	
   227 	iOutStream=&aStream;
   228 	iOutStream=&aStream;
   228 	
   229 	
       
   230 	if(iCancelled)
       
   231 	{
       
   232 	   return; 
       
   233 	}
   229 #if (defined SYMBIAN_EMAIL_CAPABILITY_SUPPORT)		
   234 #if (defined SYMBIAN_EMAIL_CAPABILITY_SUPPORT)		
   230 	// check for BINARY capability
   235 	// check for BINARY capability
   231 	const CImapCapabilityInfo& capabilityInfo = iParent.CapabilityInfo();
   236 	const CImapCapabilityInfo& capabilityInfo = iParent.CapabilityInfo();
   232 	TBool binaryCapExist = capabilityInfo.QueryFlag(CImapCapabilityInfo::EBinaryCap);		
   237 	TBool binaryCapExist = capabilityInfo.QueryFlag(CImapCapabilityInfo::EBinaryCap);		
   233 	if(binaryCapExist && iFetchBodyInfo.IsText())
   238 	if(binaryCapExist && iFetchBodyInfo.IsText())