messagingfw/wappushfw/MiscPushMsgUtils/inc/cmultipartiteratorbase.h
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     1 // Copyright (c) 2003-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 __CMULTIPARTITERATORBASE_H__
       
    17 #define __CMULTIPARTITERATORBASE_H__
       
    18 
       
    19 /** @file
       
    20 @internalTechnology
       
    21 @released
       
    22 */
       
    23 
       
    24 #include <e32std.h>
       
    25 #include <e32base.h>
       
    26 
       
    27 #include <push/pushmessage.h>
       
    28 
       
    29 _LIT8(KBoundaryParam, "boundary");
       
    30 _LIT8(KBoundaryStartEnd, "--");
       
    31 _LIT8(KCRLF, "\r\n");
       
    32 _LIT8(KHdrSeparator, "\r\n\r\n");
       
    33 
       
    34 
       
    35 // panics
       
    36 #ifdef _DEBUG
       
    37 _LIT(KPushInvalidContentType,"Invalid Content-Type");
       
    38 _LIT(KPushPartIndexOutOfRange,"Part Index Out of range!");
       
    39 #endif
       
    40 
       
    41 
       
    42 class CMultipartIteratorBase : public CBase
       
    43 /** WAP Push multipart message splitter base class. 
       
    44 
       
    45 This class defines an abstract interface for iterating through multipart messages 
       
    46 to return the message parts. 
       
    47 @internalTechnology
       
    48 @released
       
    49 */
       
    50 	{
       
    51 public:
       
    52 	/** Moves the iterator to the next message part.
       
    53 	
       
    54 	@return ETrue if there is a next part, EFalse otherwise */
       
    55 	virtual TBool NextL() = 0;
       
    56 	/** Resets the iterator the beginning of the message. */
       
    57 	virtual void FirstL() = 0;
       
    58 	/** Gets the current message part.
       
    59 	
       
    60 	@return Message part */
       
    61 	virtual CPushMessage* PartL() = 0;
       
    62 
       
    63 protected:
       
    64 	CMultipartIteratorBase(CPushMessage& aPushMessage);
       
    65 
       
    66 protected:
       
    67 	CPushMessage& iPushMessage;
       
    68 	TUint iCurrentPartStart;
       
    69 	};
       
    70 
       
    71 #endif // __CMULTIPARTITERATORBASE_H__
       
    72