--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cmoveobject.h Tue Feb 02 00:27:58 2010 +0200
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/cmoveobject.h Fri Feb 19 23:18:32 2010 +0200
@@ -21,7 +21,6 @@
#include "crequestprocessor.h"
-class CFileMan;
class CMTPObjectMetaData;
class CMmMtpDpMetadataAccessWrapper;
class CMTPTypeObjectPropList;
@@ -35,18 +34,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 +43,8 @@
* Standard c++ constructor
*/
IMPORT_C CMoveObject( MMTPDataProviderFramework& aFramework,
- MMTPConnection& aConnection,
- MMmMtpDpConfig& aDpConfig );
+ MMTPConnection& aConnection,
+ MMmMtpDpConfig& aDpConfig );
/**
* Second phase constructor
@@ -71,34 +58,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 +86,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 +102,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 +110,10 @@
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 );
+ const TDesC& aNewFileName );
/*
* Move a single object and update the database
@@ -179,17 +127,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<TUint> iObjectHandles;
- TInt iMoveObjectIndex;
- TInt iNumberOfObjects;
+
};
#endif // CMOVEOBJCT_H