equal
deleted
inserted
replaced
21 #include "mdsutils.h" |
21 #include "mdsutils.h" |
22 #include "harvesteromadrmplugin.h" |
22 #include "harvesteromadrmplugin.h" |
23 #include "harvesterlog.h" |
23 #include "harvesterlog.h" |
24 #include "harvestercommon.h" |
24 #include "harvestercommon.h" |
25 #include "mdeobjectwrapper.h" |
25 #include "mdeobjectwrapper.h" |
|
26 #include "mdscommoninternal.h" |
26 #include <harvesterdata.h> |
27 #include <harvesterdata.h> |
27 |
28 |
28 #include <mdenamespacedef.h> |
29 #include <mdenamespacedef.h> |
29 #include <mdeobjectdef.h> |
30 #include <mdeobjectdef.h> |
30 #include <mdeobject.h> |
31 #include <mdeobject.h> |
36 _LIT(KVideo, "Video"); |
37 _LIT(KVideo, "Video"); |
37 _LIT(KAudio, "Audio"); |
38 _LIT(KAudio, "Audio"); |
38 _LIT(KRmMimetype, "realmedia"); |
39 _LIT(KRmMimetype, "realmedia"); |
39 |
40 |
40 _LIT( KSvgMime, "image/svg+xml" ); |
41 _LIT( KSvgMime, "image/svg+xml" ); |
|
42 |
|
43 _LIT(KInUse, "InUse"); |
41 |
44 |
42 CHarvesterOmaDrmPluginPropertyDefs::CHarvesterOmaDrmPluginPropertyDefs() : CBase() |
45 CHarvesterOmaDrmPluginPropertyDefs::CHarvesterOmaDrmPluginPropertyDefs() : CBase() |
43 { |
46 { |
44 } |
47 } |
45 |
48 |
301 // DRM protection |
304 // DRM protection |
302 CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, |
305 CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, |
303 *iPropDefs->iDrmPropertyDef, &aVHD.iDrmProtected, aIsAdd ); |
306 *iPropDefs->iDrmPropertyDef, &aVHD.iDrmProtected, aIsAdd ); |
304 |
307 |
305 // Title (is set from URI by default) |
308 // Title (is set from URI by default) |
306 if( aVHD.iTitle.Length() > 0 && aVHD.iTitle.Length() < iMaxTextLength ) |
309 if( aVHD.iTitle.Length() > 0 && aVHD.iTitle.Length() < KMaxTitleFieldLength ) |
307 { |
310 { |
308 CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, |
311 CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, |
309 *iPropDefs->iTitlePropertyDef, &aVHD.iTitle, EFalse ); |
312 *iPropDefs->iTitlePropertyDef, &aVHD.iTitle, EFalse ); |
310 } |
313 } |
311 // Description |
314 // Description |
341 if (err == KErrNone) |
344 if (err == KErrNone) |
342 { |
345 { |
343 err = content->GetStringAttribute( ContentAccess::EMimeType, mime ); |
346 err = content->GetStringAttribute( ContentAccess::EMimeType, mime ); |
344 delete content; |
347 delete content; |
345 } |
348 } |
|
349 |
|
350 if( err == KErrInUse || err == KErrLocked ) |
|
351 { |
|
352 aObjectType.Copy( KInUse() ); |
|
353 return; |
|
354 } |
346 |
355 |
347 if( mime == KSvgMime ) |
356 if( mime == KSvgMime ) |
348 { |
357 { |
349 WRITELOG1( "CHarvesterOMADRMPlugin::GetObjectType - ERROR: mimetype %S. Not supported", &mime ); |
358 WRITELOG1( "CHarvesterOMADRMPlugin::GetObjectType - ERROR: mimetype %S. Not supported", &mime ); |
350 aObjectType.Zero(); |
359 aObjectType.Zero(); |