22 #define CMTPCOPYOBJECT_H |
22 #define CMTPCOPYOBJECT_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 RFs; |
29 class RFs; |
29 class CFileMan; |
30 class CFileMan; |
30 class CMTPObjectMetaData; |
31 class CMTPObjectMetaData; |
31 class CMTPObjectPropertyMgr; |
32 class CMTPObjectPropertyMgr; |
|
33 |
|
34 const TInt KCopyObjectTimeOut = 180000000; // 180s |
32 |
35 |
33 /** |
36 /** |
34 Defines data provider CopyObject request processor |
37 Defines data provider CopyObject request processor |
35 |
38 |
36 @internalTechnology |
39 @internalTechnology |
51 MMTPConnection& aConnection); |
54 MMTPConnection& aConnection); |
52 |
55 |
53 private: //from CMTPRequestProcessor |
56 private: //from CMTPRequestProcessor |
54 virtual void ServiceL(); |
57 virtual void ServiceL(); |
55 TMTPResponseCode CheckRequestL(); |
58 TMTPResponseCode CheckRequestL(); |
|
59 TBool DoHandleCompletingPhaseL(); |
|
60 TBool Match(const TMTPTypeRequest& aRequest, MMTPConnection& aConnection) const; |
56 |
61 |
57 private: |
62 private: |
58 void ConstructL(); |
63 void ConstructL(); |
59 void GetParametersL(); |
64 void GetParametersL(); |
60 void SetDefaultParentObjectL(); |
65 void SetDefaultParentObjectL(); |
61 TMTPResponseCode CopyObjectL(TUint32& aNewHandle); |
66 TMTPResponseCode CopyObjectL(TUint32& aNewHandle); |
62 TMTPResponseCode CanCopyObjectL(const TDesC& aOldName, const TDesC& aNewName) const; |
67 TMTPResponseCode CanCopyObjectL(const TDesC& aOldName, const TDesC& aNewName) const; |
63 void GetPreviousPropertiesL(const TDesC& aFileName); |
68 void GetPreviousPropertiesL(const TDesC& aFileName); |
64 void SetPreviousPropertiesL(const TDesC& aFileName); |
69 void SetPreviousPropertiesL(const TDesC& aFileName); |
65 TUint32 CopyFileL(const TDesC& aNewFileName); |
70 void CopyFileL(const TDesC& aNewFileName); |
66 TUint32 CopyFolderL(const TDesC& aNewFolderName); |
71 TUint32 CopyFolderL(const TDesC& aNewFolderName); |
67 void SetPropertiesL(TUint32 aSourceHandle, const CMTPObjectMetaData& aTargetObject); |
72 void SetPropertiesL(TUint32 aSourceHandle, const CMTPObjectMetaData& aTargetObject); |
68 TUint32 UpdateObjectInfoL(const TDesC& aNewObject); |
73 TUint32 UpdateObjectInfoL(const TDesC& aNewObject); |
|
74 static TInt OnTimeoutL(TAny* aPtr); |
|
75 void DoOnTimeoutL(); |
|
76 void RunL(); |
69 |
77 |
70 private: |
78 private: |
71 CFileMan* iFileMan; |
79 CFileMan* iFileMan; |
72 CMTPObjectMetaData* iObjectInfo; //Not owned. |
80 CMTPObjectMetaData* iObjectInfo; //Not owned. |
73 HBufC* iDest; |
81 HBufC* iDest; |
74 TUint32 iNewParentHandle; |
82 HBufC* iNewFileName; |
75 TUint32 iStorageId; |
83 TBool iIsFolder; |
76 TTime iPreviousModifiedTime; |
84 TUint32 iNewParentHandle; |
77 RMTPFramework iSingletons; |
85 TUint32 iStorageId; |
|
86 TTime iPreviousModifiedTime; |
|
87 RMTPFramework iSingletons; |
|
88 RMTPDpSingletons iDpSingletons; |
|
89 CPeriodic* iTimer; |
78 /** |
90 /** |
79 FLOGGER debug trace member variable. |
91 FLOGGER debug trace member variable. |
80 */ |
92 */ |
81 __FLOG_DECLARATION_MEMBER_MUTABLE; |
93 __FLOG_DECLARATION_MEMBER_MUTABLE; |
82 }; |
94 }; |