mtpfws/mtpfw/dataproviders/dputility/src/cmtpcopyobject.cpp
branchRCL_3
changeset 3 8b094906a049
parent 0 d0791faffa3f
child 4 60a94a45d437
--- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpcopyobject.cpp	Fri Mar 12 15:46:41 2010 +0200
+++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpcopyobject.cpp	Mon Mar 15 12:43:12 2010 +0200
@@ -23,6 +23,7 @@
 #include <mtp/cmtptypearray.h>
 #include <mtp/cmtptypestring.h>
 
+#include "cmtpstoragemgr.h"
 #include "cmtpcopyobject.h"
 #include "mtpdppanic.h"
 
@@ -62,7 +63,7 @@
 	{	
 	delete iDest;
 	delete iFileMan;
-
+	iSingletons.Close();
 	__FLOG_CLOSE;
 	}
 
@@ -76,6 +77,20 @@
 	}
 
 
+
+TMTPResponseCode CMTPCopyObject::CheckRequestL()
+	{
+    __FLOG(_L8("CheckRequestL - Entry"));
+	TMTPResponseCode result = CMTPRequestProcessor::CheckRequestL();
+	if ( (EMTPRespCodeOK == result) && (!iSingletons.StorageMgr().IsReadWriteStorage(Request().Uint32(TMTPTypeRequest::ERequestParameter2))) )
+		{
+		result = EMTPRespCodeStoreReadOnly;
+		}
+	
+    __FLOG(_L8("CheckRequestL - Exit"));
+	return result;	
+	} 
+
 /**
 CopyObject request handler
 */		
@@ -99,7 +114,7 @@
 */
 void CMTPCopyObject::ConstructL()
     {
-
+	iSingletons.OpenL();
     }