diff -r a05c44bc3c61 -r d881023c13eb mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cmoveobject.h --- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cmoveobject.h Fri Apr 16 15:28:14 2010 +0300 +++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cmoveobject.h Mon May 03 12:58:40 2010 +0300 @@ -21,9 +21,7 @@ #include "crequestprocessor.h" -class CFileMan; class CMTPObjectMetaData; -class CMmMtpDpMetadataAccessWrapper; class CMTPTypeObjectPropList; class CMTPTypeObjectPropListElement; class MMmMtpDpConfig; @@ -35,18 +33,6 @@ { public: /** - * Two-phase construction method - * @param aFramework The data provider framework - * @param aConnection The connection from which the request comes - * @param aWrapper medadata access interface - * @return a pointer to the created request processor object - */ - //IMPORT_C static MMmRequestProcessor* NewL( - // MMTPDataProviderFramework& aFramework, - // MMTPConnection& aConnection, - // CMmMtpDpMetadataAccessWrapper& aWrapper ); - - /** * Destructor */ IMPORT_C virtual ~CMoveObject(); @@ -56,8 +42,8 @@ * Standard c++ constructor */ IMPORT_C CMoveObject( MMTPDataProviderFramework& aFramework, - MMTPConnection& aConnection, - MMmMtpDpConfig& aDpConfig ); + MMTPConnection& aConnection, + MMmMtpDpConfig& aDpConfig ); /** * Second phase constructor @@ -71,34 +57,18 @@ */ IMPORT_C void ServiceL(); - // from CActive - IMPORT_C void RunL(); - - IMPORT_C TInt RunError( TInt aError ); - - protected: // new virtuals /** * Set MetaData to CMetadataAccessWrapper, for internal use - * @param aPropCode, specify property code of aMediaProp - * @param aNewData, object property value which will be get from - * aObjectMetaData - * @param aObjectMetaData, owner of the property which should be + * @param aPropCode, specify property code of an object + * @param aHandle, object handles of which the properties are needed + * @param aObject, owner of the properties which should be * inserted or updated into database - * @return response code */ - IMPORT_C TMTPResponseCode ServiceMetaDataToWrapper( const TUint16 aPropCode, - MMTPType& aNewData, - const CMTPObjectMetaData& aObject ); - virtual void ServiceGetSpecificObjectPropertyL( TUint16 aPropCode, - TUint32 aHandle, - const CMTPObjectMetaData& aObject ) = 0; - - virtual TMTPResponseCode ServiceSetSpecificObjectPropertyL( TUint16 aPropCode, - const CMTPObjectMetaData& aObject, - const CMTPTypeObjectPropListElement& aElement ) = 0; + TUint32 aHandle, + const CMTPObjectMetaData& aObject ) = 0; private: /** @@ -115,13 +85,13 @@ * move object operations * @return A valid MTP response code. */ - TMTPResponseCode MoveObjectL(); + void MoveObjectL(); /** * Check if we can move the file to the new location */ TMTPResponseCode CanMoveObjectL( const TDesC& aOldName, - const TDesC& aNewName ) const; + const TDesC& aNewName ) const; /** * Save the object properties before moving @@ -131,8 +101,7 @@ /** * Set the object properties after moving */ - - void SetPreviousPropertiesL( const CMTPObjectMetaData& aObject ); + void SetPreviousPropertiesL(); /** * A helper function of MoveObjectL. * @param aNewFileName the new file name after the object is moved. @@ -140,32 +109,9 @@ void MoveFileL( const TDesC& aNewFileName ); /** - * A helper function of MoveObjectL - */ - void MoveFolderL(); - - /* Move the objects through iterations of RunL. It currently move 20 objects - * at a time and the number can be adjusted by changing - * "KMoveObjectGranularity" - */ - TBool MoveOwnedObjectsL(); - - /** * Set the object properties in the object property store. */ - void SetPropertiesL( const TDesC& aOldFileName, - const TDesC& aNewFileName, - const CMTPObjectMetaData& aNewObject ); - - /* - * This function will actually delete the orginal folders from the file system. - */ - TMTPResponseCode FinalPhaseMove(); - - /* - * Generate the list of handles that need to be moved to the new location. - */ - void GenerateObjectHandleListL( TUint32 aParentHandle ); + void SetPropertiesL( const TDesC& aNewFileName ); /* * Move a single object and update the database @@ -179,17 +125,12 @@ CMTPTypeObjectPropList* iPropertyList; private: TBool iSameStorage; - CFileMan* iFileMan; - CMTPObjectMetaData* iObjectInfo; //Not owned. + CMTPObjectMetaData* iObjectInfo; // Not owned HBufC* iDest; - HBufC* iNewRootFolder; TUint32 iNewParentHandle; TUint32 iStorageId; TTime iPreviousModifiedTime; - HBufC* iPathToMove; - RArray iObjectHandles; - TInt iMoveObjectIndex; - TInt iNumberOfObjects; + }; #endif // CMOVEOBJCT_H