email/imap4mtm/imapsession/src/cimapfetchsinglebodystructure.cpp
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include "cimapfetchsinglebodystructure.h"
       
    17 #include "moutputstream.h"
       
    18 
       
    19 CImapFetchSingleBodyStructure* CImapFetchSingleBodyStructure::NewL(CImapFolderInfo* aSelectedFolderInfo, TInt aLogId, TInt aMsgUid, const TDesC8& aHeaderFields, CImapFetchResponse& aFetchResponse)
       
    20 	{		
       
    21 	CImapFetchSingleBodyStructure* self = new (ELeave) CImapFetchSingleBodyStructure(aSelectedFolderInfo, aLogId, aHeaderFields, aFetchResponse);
       
    22 	CleanupStack::PushL(self);
       
    23 	self->ConstructL(aMsgUid);
       
    24 	CleanupStack::Pop();
       
    25 	return self;
       
    26 	}
       
    27 
       
    28 CImapFetchSingleBodyStructure::CImapFetchSingleBodyStructure(CImapFolderInfo* aSelectedFolderInfo, TInt aLogId, const TDesC8& aHeaderFields, CImapFetchResponse& aFetchResponse)
       
    29 	: CImapFetchBodyStructureBase(aSelectedFolderInfo, aLogId, aHeaderFields)
       
    30 	{
       
    31 	iFetchResponse = &aFetchResponse;
       
    32 	}
       
    33 
       
    34 void CImapFetchSingleBodyStructure::ConstructL(TInt aMsgUid)
       
    35 	{
       
    36 	iUidBuf = HBufC8::NewL(32);
       
    37 	iUidBuf->Des().Num(aMsgUid);
       
    38 	iSequenceSet = &(*iUidBuf);
       
    39 	}
       
    40 
       
    41 CImapFetchSingleBodyStructure::~CImapFetchSingleBodyStructure()
       
    42 	{
       
    43 	delete iUidBuf;
       
    44 	}