harvester/harvesterplugins/OMADRMPlugin/src/harvesteromadrmplugin.cpp
branchRCL_3
changeset 26 9f21bab39f42
parent 19 82c0024438c8
child 27 4a4892eec172
--- a/harvester/harvesterplugins/OMADRMPlugin/src/harvesteromadrmplugin.cpp	Tue Apr 27 17:05:23 2010 +0300
+++ b/harvester/harvesterplugins/OMADRMPlugin/src/harvesteromadrmplugin.cpp	Tue May 11 16:36:55 2010 +0300
@@ -23,6 +23,7 @@
 #include "harvesterlog.h"
 #include "harvestercommon.h"
 #include "mdeobjectwrapper.h"
+#include "mdscommoninternal.h"
 #include <harvesterdata.h>
 
 #include <mdenamespacedef.h>
@@ -39,6 +40,8 @@
 
 _LIT( KSvgMime, "image/svg+xml" );
 
+_LIT(KInUse, "InUse");
+
 CHarvesterOmaDrmPluginPropertyDefs::CHarvesterOmaDrmPluginPropertyDefs() : CBase()
 	{
 	}
@@ -303,7 +306,7 @@
     		*iPropDefs->iDrmPropertyDef, &aVHD.iDrmProtected, aIsAdd );
     
     // Title (is set from URI by default)
-    if( aVHD.iTitle.Length() > 0 && aVHD.iTitle.Length() < iMaxTextLength )
+    if( aVHD.iTitle.Length() > 0 && aVHD.iTitle.Length() < KMaxTitleFieldLength )
     	{
     	CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, 
     			*iPropDefs->iTitlePropertyDef, &aVHD.iTitle, EFalse );
@@ -343,6 +346,12 @@
 		err = content->GetStringAttribute( ContentAccess::EMimeType, mime );
 		delete content;
 		}
+	
+	if( err == KErrInUse || err == KErrLocked )
+	    {
+	    aObjectType.Copy( KInUse() );
+	    return;
+	    }
     
 	if( mime == KSvgMime )
 	    {