email/imap4mtm/imapsession/inc/cimapheaderfields.h
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 #ifndef __CIMAPHEADERFIELDS_H__
       
    17 #define __CIMAPHEADERFIELDS_H__
       
    18 
       
    19 #include <e32base.h>
       
    20 
       
    21 /**
       
    22 Base class that is used by the RFC822 and MIME header fields parsers to store
       
    23 header field data. The data is stored as a simple array of heap descriptors,
       
    24 one for each field type.
       
    25 @internalTechnology
       
    26 @prototype
       
    27 */
       
    28 NONSHARABLE_CLASS(CImapHeaderFields) : public CBase
       
    29 	{
       
    30 public:
       
    31 	virtual ~CImapHeaderFields();
       
    32 
       
    33 	virtual TBool SetFieldL(const TDesC8& aFieldName, HBufC8* aValue);
       
    34 
       
    35 protected:
       
    36 	CImapHeaderFields();
       
    37 	void ConstructL(TInt aStartFieldCount);
       
    38 
       
    39 	const TDesC8& FieldValue(TInt aFieldId);
       
    40 	TBool FieldExists(TInt aFieldId);
       
    41 	HBufC8* StripSpacesL(const TDesC8& aBuffer);
       
    42 
       
    43 private:
       
    44 	virtual TInt Match(const TDesC8& aFieldName, TBool& aNeedToStripSpaces) = 0;
       
    45 
       
    46 	RPointerArray<HBufC8> iImapFieldValueArray;
       
    47 	};
       
    48 
       
    49 #endif // __CIMAPHEADERFIELDS_H__