--- a/photosgallery/viewframework/medialists/src/glxcachemanager.cpp Tue May 11 16:13:40 2010 +0300
+++ b/photosgallery/viewframework/medialists/src/glxcachemanager.cpp Tue May 25 12:42:31 2010 +0300
@@ -42,6 +42,7 @@
#include <aknViewAppUi.h>
#include <caf/content.h>
#include <caf/attributeset.h>
+#include <caf/caferr.h>
#include <DRMHelper.h>
#ifdef USE_S60_TNM
@@ -812,16 +813,29 @@
time.HomeTime();
if (errInImage == KErrNone)
{
- RFs fs;
- CleanupClosePushL(fs);
- TInt err = fs.Connect();
- if (err == KErrNone)
+ if (iImageViewerInstance->IsPrivate())
+ {
+ RFile64 & imageHandle =
+ iImageViewerInstance->ImageFileHandle();
+ if (imageHandle.SubSessionHandle()
+ != KNullHandle)
+ {
+ imageHandle.Modified(time);
+ }
+ }
+ else
{
- TEntry entry;
- fs.Entry(fileName, entry);
- time = entry.iModified;
+ RFs fs;
+ CleanupClosePushL(fs);
+ TInt err = fs.Connect();
+ if (err == KErrNone)
+ {
+ TEntry entry;
+ fs.Entry(fileName, entry);
+ time = entry.iModified;
+ }
+ CleanupStack::PopAndDestroy(&fs);
}
- CleanupStack::PopAndDestroy(&fs);
}
iMPXMedia->SetTObjectValueL(attrib,
time.Int64());
@@ -926,19 +940,35 @@
protection = iReader->GetDRMRightsL
(ContentAccess::EIsProtected);
}
- iMPXMedia->SetTObjectValueL(KMPXMediaDrmProtected, protection);
+ else if (errInImage == KErrCANoRights
+ || errInImage == KErrCAPendingRights
+ || errInImage == KErrCACorruptRights)
+ {
+ protection = ETrue;
+ }
+ iMPXMedia->SetTObjectValueL(
+ KMPXMediaDrmProtected, protection);
}
else if ( iRequestedAttrs[i] == KGlxMediaGeneralDRMRightsValid )
{
TInt rightsValid = EGlxDrmRightsValidityUnknown;
if(errInImage == KErrNone)
{
- TBool canView = iReader->GetDRMRightsL(ContentAccess::ECanView);
- rightsValid = canView ?
- EGlxDrmRightsValid : EGlxDrmRightsInvalid;
+ TBool canView = iReader->GetDRMRightsL(
+ ContentAccess::ECanView);
+ rightsValid
+ = canView
+ ? EGlxDrmRightsValid
+ : EGlxDrmRightsInvalid;
}
- iMPXMedia->SetTObjectValueL(KGlxMediaGeneralDRMRightsValid,
- rightsValid);
+ else if (errInImage == KErrCANoRights
+ || errInImage == KErrCACorruptRights)
+ {
+ rightsValid = EGlxDrmRightsInvalid;
+ }
+ iMPXMedia->SetTObjectValueL(
+ KGlxMediaGeneralDRMRightsValid,
+ rightsValid);
}
else if ( iRequestedAttrs[i] == KMPXMediaGeneralCount )
{