email/imap4mtm/imapsession/inc/cimapservereventwait.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 25 May 2010 12:38:02 +0300
branchRCL_3
changeset 19 7e4e4bcc75b6
parent 0 72b543305e3a
permissions -rw-r--r--
Revision: 201019 Kit: 2010121

// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//

#ifndef __CIMAPSERVEREVENTWAIT_H__
#define __CIMAPSERVEREVENTWAIT_H__

#include <e32std.h>

#include "cimapcommand.h"

/**
This class wait for and handles unsolicited untagged responses from the server.
See section 5.3 of RFC3501.
The base class handles receipt of untagged responses.
However in our constructor, we set iCompleteOnAnyResponse to ETrue, causing the command 
to complete upon receipt of any untagged response.
@internalTechnology
@prototype
*/
class CImapServerEventWait : public CImapCommandEx
	{
public:
	// Construction and Destruction
	static CImapServerEventWait* NewL(CImapFolderInfo* aSelectedFolderData, TInt aLogId);
	~CImapServerEventWait();
			
private:
	CImapServerEventWait(CImapFolderInfo* aSelectedFolderData, TInt aLogId);
	void ConstructL();
	
	// Implements CImapCommand
	TBool CanCompleteFlushNow() const;
	void SendMessageL(TInt aTagId, MOutputStream& aStream);
	TBool ParseTaggedResponseL(TInt aTagId);
	};
			 
#endif // __CIMAPSERVEREVENTWAIT_H__