email/imap4mtm/imapsession/src/cimapfetchbodyresponse.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 // this class
       
    17 #include "cimapfetchbodyresponse.h"
       
    18 #include "cimapmimeheaderfields.h"
       
    19 
       
    20 	
       
    21 EXPORT_C CImapFetchBodyResponse* CImapFetchBodyResponse::NewL()
       
    22 	{
       
    23 	return new(ELeave)CImapFetchBodyResponse();
       
    24 	}
       
    25 
       
    26 CImapFetchBodyResponse::~CImapFetchBodyResponse()
       
    27 	{
       
    28 	delete iHeaderFields;
       
    29 	}
       
    30 
       
    31 /**
       
    32 Returns the header information.
       
    33 @return A pointer to the header information object or NULL.  Ownership is NOT transferred.
       
    34 */	
       
    35 EXPORT_C CImapMimeHeaderFields* CImapFetchBodyResponse::HeaderFields()
       
    36 	{
       
    37 	return iHeaderFields;
       
    38 	}
       
    39 
       
    40 /**
       
    41 Sets the header fields object and takes ownership of it.
       
    42 This operation will panic if the header fields object is already set.
       
    43 @param aHeaderFields The header fields object, representing RFC822 header information.
       
    44 */
       
    45 void CImapFetchBodyResponse::SetHeaderFields(CImapMimeHeaderFields* aHeaderFields)
       
    46 	{
       
    47 	if (iHeaderFields != NULL)
       
    48 		{
       
    49 		delete iHeaderFields;
       
    50 		}
       
    51 
       
    52 	iHeaderFields = aHeaderFields;
       
    53 	}
       
    54 
       
    55 /**
       
    56 Copies the supplied message flag and uid info into this object
       
    57 @param the supplied message flag and uid info
       
    58 */
       
    59 void CImapFetchBodyResponse::SetMessageFlagInfo(const TMessageFlagInfo& aMessageFlagInfo)
       
    60 	{
       
    61 	iMessageFlagInfo = aMessageFlagInfo;
       
    62 	}
       
    63 
       
    64 /**
       
    65 @return The message flags information for this response.
       
    66 */
       
    67 EXPORT_C TMessageFlagInfo& CImapFetchBodyResponse::MessageFlagInfo()
       
    68 	{
       
    69 	return iMessageFlagInfo;
       
    70 	}