mtpfws/mtpfw/dataproviders/dputility/inc/cmtpmoveobject.h
branchRCL_3
changeset 6 ef55b168cedb
parent 3 8b094906a049
equal deleted inserted replaced
5:3673b591050c 6:ef55b168cedb
    22 #define CMTPMOVEOBJECT_H
    22 #define CMTPMOVEOBJECT_H
    23 
    23 
    24 #include "rmtpframework.h"
    24 #include "rmtpframework.h"
    25 #include "cmtprequestprocessor.h"
    25 #include "cmtprequestprocessor.h"
    26 #include "mtpdebug.h"
    26 #include "mtpdebug.h"
       
    27 #include "rmtpdpsingletons.h"
    27 
    28 
    28 class CFileMan;
    29 class CFileMan;
    29 class CMTPObjectMetaData;
    30 class CMTPObjectMetaData;
       
    31 
       
    32 const TInt KMoveObjectTimeOut = 180000000; // 180s
    30 
    33 
    31 /** 
    34 /** 
    32 Defines data provider MoveObject request processor
    35 Defines data provider MoveObject request processor
    33 
    36 
    34 @internalTechnology
    37 @internalTechnology
    46 					MMTPDataProviderFramework& aFramework,
    49 					MMTPDataProviderFramework& aFramework,
    47 					MMTPConnection& aConnection);
    50 					MMTPConnection& aConnection);
    48 
    51 
    49 private:	//from CMTPRequestProcessor
    52 private:	//from CMTPRequestProcessor
    50 	virtual void ServiceL();
    53 	virtual void ServiceL();
    51     TMTPResponseCode CheckRequestL();
    54 	TMTPResponseCode CheckRequestL();
       
    55 	TBool DoHandleCompletingPhaseL();
       
    56 	TBool Match(const TMTPTypeRequest& aRequest, MMTPConnection& aConnection) const;
    52 	
    57 	
    53 private:
    58 private:
    54 	void ConstructL();
    59 	void ConstructL();
    55 	void GetParametersL();
    60 	void GetParametersL();
    56 	void SetDefaultParentObjectL();
    61 	void SetDefaultParentObjectL();
    58 	TMTPResponseCode CanMoveObjectL(const TDesC& aOldName, const TDesC& aNewName) const;
    63 	TMTPResponseCode CanMoveObjectL(const TDesC& aOldName, const TDesC& aNewName) const;
    59 	void GetPreviousPropertiesL(const TDesC& aFileName);
    64 	void GetPreviousPropertiesL(const TDesC& aFileName);
    60 	void SetPreviousPropertiesL(const TDesC& aFileName);
    65 	void SetPreviousPropertiesL(const TDesC& aFileName);
    61 	void MoveFileL(const TDesC& aNewFileName);
    66 	void MoveFileL(const TDesC& aNewFileName);
    62 	void MoveFolderL();
    67 	void MoveFolderL();
       
    68 	static TInt OnTimeoutL(TAny* aPtr);
       
    69 	void DoOnTimeoutL();
       
    70 	void RunL();
    63 	
    71 	
    64 private:	
    72 private:	
    65 	CFileMan*				iFileMan;
    73 	CFileMan*							iFileMan;
    66 	CMTPObjectMetaData*		iObjectInfo;	//Not owned.
    74 	CMTPObjectMetaData*		iObjectInfo;	//Not owned.
    67 	HBufC*					iDest;
    75 	HBufC*								iDest;
    68 	HBufC*					iNewRootFolder;
    76 	HBufC*								iNewRootFolder;
    69 	TUint32					iNewParentHandle;
    77 	TUint32								iNewParentHandle;
    70 	TUint32					iStorageId;
    78 	TUint32								iStorageId;
    71 	TTime					iPreviousModifiedTime;
    79 	TTime									iPreviousModifiedTime;
    72 	HBufC*					iPathToMove;
    80 	HBufC*								iPathToMove;
    73 	RArray<TUint>           iObjectHandles;
    81 	RArray<TUint>					iObjectHandles;
    74 	TInt                    iMoveObjectIndex;
    82 	TInt									iMoveObjectIndex;
    75     RMTPFramework           iSingletons;
    83 	RMTPFramework					iSingletons;
       
    84 	RMTPDpSingletons			iDpSingletons;
       
    85 	CPeriodic*						iTimer;
       
    86 	HBufC*								iNewFileName;
       
    87 	TBool									iIsFolder;
    76 	/**
    88 	/**
    77     FLOGGER debug trace member variable.
    89     FLOGGER debug trace member variable.
    78     */
    90     */
    79     __FLOG_DECLARATION_MEMBER_MUTABLE;
    91     __FLOG_DECLARATION_MEMBER_MUTABLE;
    80 	};
    92 	};