email/imap4mtm/imapprotocolcontroller/inc/cimapcompoundrename.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 __CIMAPCOMPOUNDRENAME_H__
       
    17 #define __CIMAPCOMPOUNDRENAME_H__
       
    18 
       
    19 #include "cimapcompoundbase.h"
       
    20 
       
    21 /**
       
    22 Compound operation object for renaming a specified mailbox.
       
    23 This class calls the sequence of IMAP Session calls necessary to
       
    24 rename a mailbox and also updates local mirror folders as necessary.
       
    25 Note that special behaviour is implemented when renaming the INBOX,
       
    26 as per RFC 3501.
       
    27 
       
    28 @internalTechnology
       
    29 @prototype
       
    30 */
       
    31 class CImapCompoundRename : public CImapCompoundBase
       
    32 	{
       
    33 public:
       
    34 	~CImapCompoundRename( );
       
    35 	
       
    36 	static CImapCompoundRename* NewL( CImapSyncManager& aSyncManager,
       
    37 						 			  CMsvServerEntry& aServerEntry,
       
    38 						 			  CImapSettings& aImapSettings,
       
    39 						 			  const TMsvId aTarget,
       
    40 						 			  const TDesC& aNewName  );
       
    41 	
       
    42 	virtual void StartOperation(TRequestStatus& aStatus, CImapSession& aSession);
       
    43 	virtual void Progress( TImap4CompoundProgress& aCompoundProgress );
       
    44 	
       
    45 	// Support for Bearer Mobility
       
    46 	virtual void ResumeOperationL(TRequestStatus& aStatus, CImapSession& aSession);
       
    47 	
       
    48 private:
       
    49 	CImapCompoundRename( CImapSyncManager& aSyncManager,
       
    50 						 CMsvServerEntry& aServerEntry,
       
    51 						 CImapSettings& aImapSettings,
       
    52 						 const TMsvId aTarget );
       
    53 	void ConstructL(const TDesC& aNewName);
       
    54 	
       
    55 	TBool DoRunLoopL();
       
    56 	void DoCancel();
       
    57 
       
    58 	virtual TInt ProcessNegativeServerResponse();
       
    59 
       
    60 	void IssueRenameL();
       
    61 	void RenameInboxL();
       
    62 	
       
    63 private:
       
    64 	TMsvId    iFolderId;
       
    65 	TMsvId    iNewFolderId;
       
    66 	HBufC16*  iNewLeafName;
       
    67 	CMsvEntrySelection* iMsgselection;
       
    68 	};
       
    69 
       
    70 #endif	// __CIMAPCOMPOUNDRENAME_H__