email/imap4mtm/imapprotocolcontroller/inc/cimapcompoundcopyfromlocal.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 __CIMAPCOMPOUNDCOPYFROMLOCAL_H__
       
    17 #define __CIMAPCOMPOUNDCOPYFROMLOCAL_H__
       
    18 
       
    19 #include "cimapcompoundbase.h"
       
    20 
       
    21 // Forward declarations
       
    22 class CImapFolder;
       
    23 class CImSendMessage;
       
    24 
       
    25 /**
       
    26 The compound object for the copy or move from local operation. The 
       
    27 copy from local operation copies or moves a selection of messages 
       
    28 from a local folder to a remote folder.
       
    29 
       
    30 @internalTechnology
       
    31 @prototype
       
    32 */
       
    33 class CImapCompoundCopyFromLocal : public CImapCompoundBase
       
    34 	{
       
    35 public:
       
    36 	~CImapCompoundCopyFromLocal();
       
    37 	
       
    38 	static CImapCompoundCopyFromLocal* NewL( CImapSyncManager& aSyncManager,
       
    39 						 			  		 CMsvServerEntry& aServerEntry,
       
    40 						 			  		 CImapSettings& aImapSettings,
       
    41 						 			  		 TBool aIsMove,
       
    42 						 			  		 const CMsvEntrySelection& aSourceSel,
       
    43 						 			  		 const TMsvId aDestination);
       
    44 	
       
    45 	virtual void StartOperation(TRequestStatus& aStatus, CImapSession& aSession);
       
    46 	virtual void Progress(TImap4CompoundProgress& aCompoundProgress);
       
    47 	
       
    48 	// Support for Bearer Mobility
       
    49 	virtual void ResumeOperationL(TRequestStatus& aStatus, CImapSession& aSession);
       
    50 	
       
    51 private:
       
    52 	CImapCompoundCopyFromLocal(CImapSyncManager& aSyncManager,
       
    53 		  					   CMsvServerEntry& aServerEntry,
       
    54 		  					   CImapSettings& aImapSettings,
       
    55 		  					   TBool aIsMove,
       
    56 		  					   const TMsvId aDestination);
       
    57 	void ConstructL(const CMsvEntrySelection& aSourceSel);
       
    58 	
       
    59 	virtual TInt ProcessNegativeServerResponse();
       
    60 
       
    61 	TBool DoRunLoopL();
       
    62 	void DoCancel();
       
    63 private:
       
    64 	/** ETrue if it is a move operation. The value is set during
       
    65 	creation of the compound operation. */
       
    66 	TBool iIsMove;
       
    67 	
       
    68 	/** Selection of messages to operate on. */
       
    69 	CMsvEntrySelection* iSourceSel;
       
    70 	
       
    71 	// Progress Counts
       
    72 	TInt iTotalSize;
       
    73 	TInt iMessageSelection;
       
    74 	TInt iSelectionStillToCopy;
       
    75 	TInt iSelectionStillToDelete;
       
    76 	
       
    77 	/** Used for appending the message. */
       
    78 	CImSendMessage* iSendMessage;
       
    79 	
       
    80 	/** The destination folder. CImapCompoundCopyFromLocal does not
       
    81 	have ownership of this pointer. */
       
    82 	CImapFolder* iDestinationFolder;	// No ownership
       
    83 
       
    84 	/** The message ID of the message currently operating on. */
       
    85 	TMsvId  iCurrentMsgId;
       
    86 	
       
    87 	/** The ID of the destination folder were all messages in
       
    88 	iSourceSel will be copied/moved to. */
       
    89 	TMsvId 	iDestinationFolderId;
       
    90 	};
       
    91 
       
    92 #endif	// __CIMAPCOMPOUNDCOPYFROMLOCAL_H__