mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/csendobject.h
branchRCL_3
changeset 28 f56ec6ce2732
parent 14 05b0d2323768
--- a/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/csendobject.h	Tue Apr 27 17:09:22 2010 +0300
+++ b/mmappcomponents/mmmtpdataprovider/mmmtpdprequestprocessor/inc/csendobject.h	Tue May 11 16:40:32 2010 +0300
@@ -187,12 +187,6 @@
     TBool IsTooLarge( TUint64 aObjectSize ) const;
 
     /**
-    * Check if we can store the file on the storage
-    * @return ETrue if yes, otherwise EFalse
-    */
-    TBool CanStoreFileL( TUint32 aStorageId, TInt64 aObjectSize ) const;
-
-    /**
     * Get the full path name of the object to be saved
     * @param aFileName, on entry, contains the file name of the object,
     * on return, contains the full path name of the object to be saved
@@ -208,7 +202,7 @@
     /**
     * Reserve object information before SendObject
     */
-    void ReserveObjectL();
+    TInt ReserveObjectL();
 
     /**
     * Set protection status of object which could be read/write-only
@@ -227,10 +221,13 @@
     void AddMediaToStoreL();
 
     /**
-    * delete the file, which transfer incompletely
+    * Rollback functions
     */
     void Rollback();
 
+    void UnreserveObjectL();
+    void RemoveObjectFromDbL();
+    void RemoveObjectFromFs();
 
 private:
     enum TMTPSendingObjectState
@@ -244,6 +241,8 @@
         ESendObjectFail
         };
 
+    typedef void ( CSendObject::*TMmMtpRollbackAction )();
+
 private:
     RFs& iFs;
     MMTPObjectMgr& iObjectMgr;
@@ -282,7 +281,7 @@
     // params which is needed for reserve handle
     TMTPTypeRequest iExpectedSendObjectRequest;
 
-    TBool iNoRollback;
+    RArray<TMmMtpRollbackAction> iRollbackList;
 
     TUint32 iPreviousTransactionID;
     TUint32 iPreviousOperation;