mtpfws/mtpfw/dataproviders/dputility/inc/cmtpcopyobject.h
changeset 0 d0791faffa3f
child 3 8b094906a049
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 // Copyright (c) 2007-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 /**
       
    17  @file
       
    18  @internalTechnology
       
    19 */
       
    20 
       
    21 #ifndef CMTPCOPYOBJECT_H
       
    22 #define CMTPCOPYOBJECT_H
       
    23 
       
    24 #include "cmtprequestprocessor.h"
       
    25 #include "mtpdebug.h"
       
    26 
       
    27 class RFs;
       
    28 class CFileMan;
       
    29 class CMTPObjectMetaData;
       
    30 class CMTPObjectPropertyMgr;
       
    31 
       
    32 /** 
       
    33 Defines data provider CopyObject request processor
       
    34 
       
    35 @internalTechnology
       
    36 */
       
    37 class CMTPCopyObject : public CMTPRequestProcessor
       
    38 	{
       
    39 public:
       
    40 	IMPORT_C static MMTPRequestProcessor* NewL(
       
    41 									MMTPDataProviderFramework& aFramework,
       
    42 									MMTPConnection& aConnection);	
       
    43 	IMPORT_C ~CMTPCopyObject();	
       
    44 
       
    45 	
       
    46 	
       
    47 private:	
       
    48 	CMTPCopyObject(
       
    49 					MMTPDataProviderFramework& aFramework,
       
    50 					MMTPConnection& aConnection);
       
    51 
       
    52 private:	//from CMTPRequestProcessor
       
    53 	virtual void ServiceL();
       
    54 
       
    55 private:
       
    56 	void ConstructL();
       
    57 	void GetParametersL();
       
    58 	void SetDefaultParentObjectL();
       
    59 	TMTPResponseCode CopyObjectL(TUint32& aNewHandle);
       
    60 	TMTPResponseCode CanCopyObjectL(const TDesC& aOldName, const TDesC& aNewName) const;
       
    61 	void GetPreviousPropertiesL(const TDesC& aFileName);
       
    62 	void SetPreviousPropertiesL(const TDesC& aFileName);
       
    63 	TUint32 CopyFileL(const TDesC& aNewFileName);
       
    64 	TUint32 CopyFolderL(const TDesC& aNewFolderName);
       
    65 	void SetPropertiesL(TUint32 aSourceHandle, const CMTPObjectMetaData& aTargetObject);	
       
    66 	TUint32 UpdateObjectInfoL(const TDesC& aNewObject);
       
    67 	
       
    68 private:
       
    69 	CFileMan*				iFileMan;
       
    70 	CMTPObjectMetaData*		iObjectInfo;	//Not owned.
       
    71 	HBufC*					iDest;
       
    72 	TUint32					iNewParentHandle;
       
    73 	TUint32					iStorageId;
       
    74 	TTime					iPreviousModifiedTime;
       
    75 	
       
    76 	/**
       
    77     FLOGGER debug trace member variable.
       
    78     */
       
    79     __FLOG_DECLARATION_MEMBER_MUTABLE;
       
    80 	};
       
    81 	
       
    82 #endif
       
    83