email/imap4mtm/imapsession/inc/cimapstatus.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 __IMAPSTATUS_H__
       
    17 #define __IMAPSTATUS_H__
       
    18 
       
    19 #include <e32std.h>
       
    20 #include "cimapcommand.h"
       
    21 #include "cimapfolderinfo.h"
       
    22 #include "cimapatomparser.h"
       
    23 
       
    24 /**
       
    25 The CImapStatus class encapsulates the sending of the IMAP STATUS
       
    26 command to the remote server. It will also parse the response data from the remote server.
       
    27 @internalTechnology
       
    28 @prototype
       
    29 */
       
    30 class CImapStatus : public CImapCommandEx
       
    31 	{
       
    32 public:
       
    33 	// Construction and Destruction
       
    34 	static CImapStatus* NewL(CImapFolderInfo* aSelectedFolderData, TInt aLogId, const TDesC& aMailboxName, const TDesC8& aStatusDataItemNames, CImapFolderInfo& aFolderInfo);
       
    35 	~CImapStatus();
       
    36 	
       
    37 private:
       
    38 	CImapStatus(CImapFolderInfo* aSelectedFolderData, TInt aLogId, CImapFolderInfo& aFolderInfo);
       
    39 	void ConstructL(const TDesC& aMailboxName, const TDesC8& aStatusDataItemNames);	
       
    40 	
       
    41 	// Implements CImapCommand
       
    42 	void SendMessageL(TInt aTagId, MOutputStream& aStream);	
       
    43 	
       
    44 	TParseBlockResult ParseUntaggedResponseL();
       
    45 	void ParseLiteralBlockL();
       
    46 	TBool ParseLineFollowingLiteralL();
       
    47 	
       
    48 	void ParseStatusResponseL();
       
    49 	void ParseStatusAttributeL(const TDesC8& aAttribute, const TDesC8& aValue);
       
    50 	
       
    51 private:
       
    52 	// Data for send
       
    53 	HBufC8* 		iMailboxName;
       
    54 	HBufC8* 		iStatusDataItemNames;
       
    55 	TInt 		iLiteralSize;
       
    56 	CImapFolderInfo& iFolderInfo;
       
    57 	CImapAtomParser* iAtomParser;
       
    58 	};
       
    59 			 
       
    60 #endif // __IMAPSTATUS_H__