messagingfw/msgsrvnstore/server/inc/cmsvcopystoreoperation.h
changeset 62 db3f5fa34ec7
parent 0 8e480a14352b
equal deleted inserted replaced
60:9f5ae1728557 62:db3f5fa34ec7
       
     1 // Copyright (c) 2004-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 #include <f32file.h>
       
    17 
       
    18 /**
       
    19 @internalComponent
       
    20 @released
       
    21 */
       
    22 class CMsvCopyStoreOperation : public CMsvServerOperation, public MFileManObserver
       
    23 	{
       
    24 public:
       
    25 	static CMsvCopyStoreOperation* NewL(const RMessage2& aMessage, CMsvServer& aServer);
       
    26 	~CMsvCopyStoreOperation();
       
    27 	//
       
    28 	const virtual TDesC8& Progress(); // Inherited from CMsvServerOperation
       
    29 	void StartL();
       
    30 	//
       
    31 private:
       
    32 	CMsvCopyStoreOperation(const RMessage2& aMessage, CMsvServer& aServer);
       
    33 	void DoCancel(); // Inherited from CActive
       
    34 	void RunL();	 // Inherited from CActive
       
    35 	TInt RunError(TInt aError);
       
    36 	
       
    37 	void InitCopyStoreL();
       
    38 	void CopySourceL();
       
    39 	void FinishCopyStoreL();
       
    40 	void LockMailStoreL();
       
    41 	void UnlockMailStore();
       
    42 	void CompleteSelf();
       
    43 	void Completed(TInt aError);
       
    44 	void CheckDiskSpaceL();
       
    45 	MFileManObserver::TControl NotifyFileManOperation();
       
    46 	MFileManObserver::TControl NotifyFileManEnded();
       
    47 private:
       
    48 	TPckgBuf<TMsvCopyProgress> iProgress;
       
    49 	TDriveUnit iDrive;
       
    50 	TInt iPos;
       
    51 	CMsvServer& iServer;
       
    52 	TFileName iDest;
       
    53 	TFileName iIndex;
       
    54 	TFileName iSrc;
       
    55 	CDir* 	  iDir;
       
    56 	CFileMan*	  iFileMan;
       
    57 	TBool 	iCopyCancel;
       
    58 	};