messagingfw/msgsrvnstore/server/inc/CCopyFiles.h
changeset 62 db3f5fa34ec7
parent 0 8e480a14352b
equal deleted inserted replaced
60:9f5ae1728557 62:db3f5fa34ec7
       
     1 // Copyright (c) 2000-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 __CCOPYFILES_H__
       
    17 #define __CCOPYFILES_H__
       
    18 
       
    19 #include <e32base.h>
       
    20 #include <f32file.h>
       
    21 
       
    22 class CCopyOneFile;
       
    23 
       
    24 class CCopyFiles : public CActive
       
    25 /**
       
    26 @internalComponent
       
    27 @released
       
    28 */
       
    29 	{
       
    30 public:
       
    31 	static CCopyFiles* NewL(RFs &aFs);
       
    32 
       
    33 	void CopyDir(const TFileName &aFrom, const TFileName &aTo,TRequestStatus& aStatus);
       
    34 
       
    35 	~CCopyFiles();
       
    36 
       
    37 private:
       
    38 	// From CActive;
       
    39 	void RunL();
       
    40 	void DoCancel();
       
    41 	TInt RunError(TInt aError);
       
    42 
       
    43 
       
    44 	void ConstructL();
       
    45 	CCopyFiles(RFs &aFs);
       
    46 	void NextDirL();
       
    47 	void CopyFileL();
       
    48 	void Complete(TInt aError);
       
    49 	void InitDirCopy();
       
    50 
       
    51 private:
       
    52 	RFs		&iFs;
       
    53 	CCopyOneFile *iCopyOneFile;
       
    54 	CDirScan     *iDirScan;
       
    55 	CDir		 *iNext;
       
    56 	TInt		  iPos;
       
    57 
       
    58 	// lets us know if this is the first time into the RunL
       
    59 	TBool		  iStartedCopy;
       
    60 
       
    61 	TFileName       *iFrom;
       
    62 	TFileName       *iTo;
       
    63 	const TFileName	 *iToPath;
       
    64 	const TFileName	 *iFromPath;
       
    65 
       
    66 	TRequestStatus *iReportStatus;
       
    67 	};
       
    68 
       
    69 #endif // __CCOPYFILES_H__