email/pop3andsmtpmtm/popservermtm/inc/PopsTopPop.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 __POPSTOPPOP_H__
       
    21 #define __POPSTOPPOP_H__
       
    22 
       
    23 #include <pop3set.h>
       
    24 #include <popsmtm.h>
       
    25 
       
    26 class CImPop3Session;
       
    27 class CImLogMessage;
       
    28 class CImPop3Top;
       
    29 
       
    30 //
       
    31 // CImPop3TopPopulate 
       
    32 //
       
    33 // 
       
    34 //
       
    35 //
       
    36 class CImPop3TopPopulate : public  CMsgActive
       
    37 	{
       
    38 public:
       
    39 	static CImPop3TopPopulate *NewL(const CMsvEntrySelection&, CMsvServerEntry&, TInt aLimit, CImPop3Session*, RFs&, CImLogMessage* aLogMessage, TBool aDisconnectedMode, RArray<TUint>& aRemoteSizes);
       
    40 	~CImPop3TopPopulate();
       
    41 
       
    42 	void StartL(TRequestStatus& aStatus);
       
    43 	TPop3Progress Progress();
       
    44 	void Pause();
       
    45 	void ResumeL(CImPop3Session* aPopSession, TRequestStatus& aStatus);
       
    46 	void CancelAllowResume();
       
    47 	
       
    48 private:
       
    49 
       
    50 	CImPop3TopPopulate( CMsvServerEntry&, TInt aLimit, CImPop3Session*, RFs&, CImLogMessage* aLogMessage, TBool aDisconnectedMode, RArray<TUint>& aRemoteSizes);
       
    51 	void ConstructL( const CMsvEntrySelection& );
       
    52 
       
    53 	void DoTransferL(TMsvEntry& aEntry );
       
    54 	void DoRetrieveL();
       
    55 	void RetrievalCompleteL();
       
    56 
       
    57 	void DoRunL();
       
    58 	void DoComplete(TInt& aCompleteStatus);
       
    59 	void DoCancel();
       
    60 
       
    61 	void RunLProcessingL();
       
    62 	void LogFetchedMessageL();
       
    63 
       
    64 
       
    65 
       
    66 	enum 
       
    67 		{
       
    68 		EPopTopPopRetrieving, 
       
    69 		EPopTopPopDeleting,
       
    70 		EPopTopPopLogging
       
    71 		};	
       
    72 private:
       
    73 	CMsvEntrySelection*			iSource;
       
    74 	CMsvServerEntry&			iDestination;
       
    75 	CImPop3Session*				iPopSession;
       
    76 	CImPop3Top*					iTop;
       
    77 
       
    78 	TBool						iCopy;
       
    79 	RFs							iFs;
       
    80 	TPop3Progress				iProgress;
       
    81 	// CRecv things
       
    82 	CImRecvConvert*				iRecvConverter;
       
    83 	CImLogMessage*				iLogMessage;
       
    84 	TBool						iDisconnectedMode;
       
    85 	TMsvId						iServiceId;
       
    86 	TInt						iPopTopPopState;
       
    87 	TBool						iProcessComplete;
       
    88 	TBool						iAlreadyComplete;
       
    89 	TBool						iMessageMarkedForDelete;
       
    90 	TBool						iRetrieveMessage;
       
    91 	TInt						iMsgCtr;
       
    92 	TMsvId						iDestId;
       
    93 	TInt						iSavedError;
       
    94 	TInt						iTopLimit;
       
    95 	TInt						iCurrentMsgSize;
       
    96 	RArray<TUint>				iRemoteSizes;
       
    97 	TBool						iMigratingToNewBearer;
       
    98 	};
       
    99 #endif