email/imap4mtm/imapprotocolcontroller/inc/cimapcompoundcreate.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 __CIMAPCOMPOUNDCREATE_H__
       
    17 #define __CIMAPCOMPOUNDCREATE_H__
       
    18 
       
    19 #include "cimapcompoundbase.h"
       
    20 #include "cimaplistfolderinfo.h"
       
    21 
       
    22 /**
       
    23 Encapsulates the creating of a remote mailbox and the local mirror folder.
       
    24 
       
    25 Stop For Migrate Policy:
       
    26 	The operation shall be allowed to complete.
       
    27 
       
    28 @internalTechnology
       
    29 @prototype
       
    30 */
       
    31 class CImapCompoundCreate : public CImapCompoundBase
       
    32 	{
       
    33 public:
       
    34 	~CImapCompoundCreate();
       
    35 	
       
    36 	static CImapCompoundCreate* NewL( CImapSyncManager& aSyncManager,
       
    37 						 			  CMsvServerEntry& aServerEntry,
       
    38 						 			  CImapSettings& aImapSettings,
       
    39 						 			  const TMsvId aParent,
       
    40 						 			  const TDesC& aLeafName,
       
    41 						 			  const TBool aIsFolder);
       
    42 	
       
    43 	virtual void StartOperation(TRequestStatus& aStatus, CImapSession& aSession);
       
    44 	virtual void Progress(TImap4CompoundProgress& aCompoundProgress);
       
    45 	
       
    46 	// Support for Bearer Mobility
       
    47 	virtual void ResumeOperationL(TRequestStatus& aStatus, CImapSession& aSession);
       
    48 	
       
    49 private:
       
    50 	CImapCompoundCreate( CImapSyncManager& aSyncManager,
       
    51 						 CMsvServerEntry& aServerEntry,
       
    52 						 CImapSettings& aImapSettings,
       
    53 						 const TMsvId aParent,
       
    54 						 const TBool aIsFolder);
       
    55 	void ConstructL(const TDesC& aLeafName);
       
    56 
       
    57 	TBool DoRunLoopL();
       
    58 	void DoCancel();
       
    59 
       
    60 	virtual TInt ProcessNegativeServerResponse();
       
    61 						 
       
    62 	HBufC* MakeFolderNameL(const TMsvId aParent, const TDesC& aLeafName, const TBool aIsFolder);
       
    63 	void CreateLocalFolderL();
       
    64 
       
    65 private:
       
    66 	TMsvId 		iParentId;
       
    67 	HBufC*		iLeafName;
       
    68 	TBool		iIsFolder;
       
    69 
       
    70 	// Stores result of calling list command 
       
    71 	RArrayImapListFolderInfo iFolderList;
       
    72 	
       
    73 	// MsvId of newly created folder.
       
    74 	TMsvId 		iNewFolderId;
       
    75 	};
       
    76 
       
    77 #endif	// __CIMAPCOMPOUNDCREATE_H__