profilesservices/MediaFileList/Src/mediafileprotection.cpp
branchRCL_3
changeset 23 8bda91a87a00
parent 0 8c5d936e5675
--- a/profilesservices/MediaFileList/Src/mediafileprotection.cpp	Thu Jul 15 18:57:55 2010 +0300
+++ b/profilesservices/MediaFileList/Src/mediafileprotection.cpp	Thu Aug 19 10:12:30 2010 +0300
@@ -234,6 +234,28 @@
 
 
 // -----------------------------------------------------------------------------
+// CMFProtectionHandler::IsFlieDRMExpired
+// 
+// Check if the DRM protect file is expired or have no rights.
+// -----------------------------------------------------------------------------
+//
+TBool CMFProtectionHandler::IsFlieDRMExpired( const TDesC& aFileName )
+    {
+    // Check whether the file can be set as automated content or not
+    TBool canSetAutomated = EFalse;
+    TInt canSetAutomatedErr = iDRMHelper->CanSetAutomated( aFileName, canSetAutomated );
+    
+    // Check if rights expried or no rights to use
+    if ( canSetAutomatedErr == DRMCommon::ERightsExpired ||
+        canSetAutomatedErr == DRMCommon::ENoRights )
+        {
+        return ETrue;
+        }
+    return EFalse;
+    }
+
+
+// -----------------------------------------------------------------------------
 // CMFProtectionHandler::IsFileValidL
 // 
 // Function is copy from CFLDDRMImplementation.cpp.