email/pop3andsmtpmtm/popservermtm/inc/PopsCpMv.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 // popservermtm module header
       
    15 // @internalComponent
       
    16 // @released
       
    17 // 
       
    18 //
       
    19 
       
    20 #ifndef __POPSCPMV_H__
       
    21 #define __POPSCPMV_H__
       
    22 
       
    23 #include <pop3set.h>
       
    24 
       
    25 class CImPop3Session;
       
    26 class CImLogMessage;
       
    27 class CImppServerMtm;
       
    28 class CImPop3Delete;
       
    29 class CImPop3Retr;
       
    30 class CImPop3TransferMessage;
       
    31 class CRichText;
       
    32 class CParaFormatLayer;
       
    33 class CCharFormatLayer;	
       
    34 
       
    35 //
       
    36 // CImPop3CopyMove
       
    37 //
       
    38 // 
       
    39 //
       
    40 //
       
    41 class CImPop3CopyMove : public  CMsgActive
       
    42 	{
       
    43 public:
       
    44 	static CImPop3CopyMove *NewL(const CMsvEntrySelection&, CMsvServerEntry&, CImPop3Session*, TBool, RFs&, TMsvId, CImLogMessage* aLogMessage, TBool aDisconnectedMode);
       
    45 	static CImPop3CopyMove *NewL(const CMsvEntrySelection&, CMsvServerEntry&, CImPop3Session*, TBool, RFs&, CImLogMessage* aLogMessage, TBool aDisconnectedMode);
       
    46 	~CImPop3CopyMove();
       
    47 
       
    48 	void StartL(TRequestStatus& aStatus);
       
    49 	TPop3Progress Progress();
       
    50 	void Pause();
       
    51 	void ResumeL(CImPop3Session* aPopSession, TRequestStatus& aStatus);
       
    52 	void CancelAllowResume();
       
    53 
       
    54 private:
       
    55 	CImPop3CopyMove( CMsvServerEntry&, CImPop3Session*, TBool, RFs&, TMsvId, CImLogMessage* aLogMessage, TBool aDisconnectedMode);
       
    56 	CImPop3CopyMove( CMsvServerEntry&, CImPop3Session*, TBool, RFs&, CImLogMessage* aLogMessage, TBool aDisconnectedMode);
       
    57 	void ConstructL( const CMsvEntrySelection& );
       
    58 
       
    59 	void DoTransferL(TMsvEntry& aEntry );
       
    60 	void DoRetrieveL();
       
    61 	void RetrievalCompleteL();
       
    62 
       
    63 	void DoRunL();
       
    64 	void DoComplete(TInt& aCompleteStatus);
       
    65 	void DoCancel();
       
    66 
       
    67 	void RunLProcessingL();
       
    68 	void LogFetchedMessageL();
       
    69 	void LeaveIfLowDiskL(const CMsvEntrySelection& aMsgSelection);
       
    70 	
       
    71 private:
       
    72 
       
    73 	CMsvEntrySelection*			iSource;
       
    74 	CMsvServerEntry&			iDestination;
       
    75 	
       
    76 	CImPop3Session*				iPopSession;
       
    77 	CImPop3Delete*				iDelete;
       
    78 	CImPop3Retr*				iRetrieve;
       
    79 
       
    80 	TBool						iCopy;
       
    81 	RFs							iFs;
       
    82 	TPop3Progress				iProgress;
       
    83 	// CRecv things
       
    84 	CImRecvConvert*				iRecvConverter;
       
    85 	CImPop3TransferMessage*		iTransfer;
       
    86 
       
    87 	TInt						iMsgCtr;
       
    88 	TInt						iPopCopyMoveState;
       
    89 	TBool						iRetrieveMessage;
       
    90 	TBool						iProcessComplete;
       
    91 	TMsvId						iServiceId;
       
    92 	TMsvId						iDestId;
       
    93 	TMsvEntry					iEntry;
       
    94 	TBool						iPopulate;
       
    95 	CImLogMessage*				iLogMessage;
       
    96 	TInt						iSavedError;
       
    97 	TBool						iDoingTransfer;
       
    98 	TBool						iDisconnectedMode;
       
    99 	TBool						iAlreadyComplete;
       
   100 	TBool						iMessageMarkedForDelete;
       
   101 	TBool						iMigratingToNewBearer;
       
   102 	};
       
   103 
       
   104 //
       
   105 // Defines copy/move from remote mailbox to remote collection
       
   106 //
       
   107 enum
       
   108 	{ EPopCpMvRetrieving, EPopCpMvDeleting, EPopCpMvLogging };
       
   109 #endif