videoplayback/videohelix/src/mpxvideodrmhelper.cpp
branchRCL_3
changeset 6 7d91903f795f
parent 0 96612d01cf9f
child 14 55fa1ec415c6
--- a/videoplayback/videohelix/src/mpxvideodrmhelper.cpp	Tue Feb 02 00:12:10 2010 +0200
+++ b/videoplayback/videohelix/src/mpxvideodrmhelper.cpp	Fri Feb 19 22:52:52 2010 +0200
@@ -15,7 +15,7 @@
 *
 */
 
-// Version : %version: 7 %
+// Version : %version: 8 %
 
 
 #include <caf/data.h>
@@ -55,19 +55,19 @@
 }
 
 //  ------------------------------------------------------------------------------------------------
-//    CMpxVideoDrmHelper::IsProtected()
+//    CMpxVideoDrmHelper::IsProtectedL()
 //  ------------------------------------------------------------------------------------------------
 //
-TBool CMpxVideoDrmHelper::IsProtected( RFile& aFile )
+TBool CMpxVideoDrmHelper::IsProtectedL( RFile& aFile )
 {
     TBool drmProtected = EFalse;
 
     if ( aFile.SubSessionHandle() )
     {
-        MPX_TRAPD( err, drmProtected = iDrmUtility->IsProtectedL( aFile ) );
+        drmProtected = iDrmUtility->IsProtectedL( aFile );
     }
 
-    MPX_DEBUG(_L("CMpxVideoDrmHelper::IsProtected(%d)"), drmProtected);
+    MPX_DEBUG(_L("CMpxVideoDrmHelper::IsProtectedL(%d)"), drmProtected);
 
     return drmProtected;
 }
@@ -81,8 +81,11 @@
     MPX_ENTER_EXIT(_L("CMpxVideoDrmHelper::GetDrmRightsStatus()"));
 
     TInt drmError = KErrNone;
+    TBool drmProtected = EFalse;
 
-    if ( IsProtected( aFile ) )
+    MPX_TRAP( drmError, drmProtected = IsProtectedL(aFile ) );
+
+    if ( drmProtected && (drmError == KErrNone) )
     {
         ContentAccess::CData* data = NULL;
 
@@ -111,7 +114,7 @@
 {
     TBool tvOutAllowed = ETrue;
 
-    if ( IsProtected( aFile ) )
+    if ( IsProtectedL( aFile ) )
     {
         ContentAccess::CContent* content = ContentAccess::CContent::NewLC( aFile );
 
@@ -145,19 +148,19 @@
 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API
 
 //  ------------------------------------------------------------------------------------------------
-//    CMpxVideoDrmHelper::IsProtected64()
+//    CMpxVideoDrmHelper::IsProtected64L()
 //  ------------------------------------------------------------------------------------------------
 //
-TBool CMpxVideoDrmHelper::IsProtected64( RFile64& aFile )
+TBool CMpxVideoDrmHelper::IsProtected64L( RFile64& aFile )
 {
     TBool drmProtected = EFalse;
 
     if ( aFile.SubSessionHandle() )
     {
-        MPX_TRAPD( err, drmProtected = iDrmUtility->IsProtectedL( aFile ) );
+       drmProtected = iDrmUtility->IsProtectedL( aFile );
     }
 
-    MPX_DEBUG(_L("CMpxVideoDrmHelper::IsProtected64(%d)"), drmProtected);
+    MPX_DEBUG(_L("CMpxVideoDrmHelper::IsProtected64L(%d)"), drmProtected);
 
     return drmProtected;
 }
@@ -171,8 +174,11 @@
     MPX_ENTER_EXIT(_L("CMpxVideoDrmHelper::GetDrmRightsStatus64()"));
 
     TInt drmError = KErrNone;
+    TBool drmProtected = EFalse;
 
-    if ( IsProtected64( aFile ) )
+    MPX_TRAP( drmError, drmProtected = IsProtected64L( aFile ) );
+
+    if ( drmProtected && (drmError == KErrNone) )
     {
         ContentAccess::CData* data = NULL;
 
@@ -205,7 +211,7 @@
 {
     TBool tvOutAllowed = ETrue;
 
-    if ( IsProtected64( aFile ) )
+    if ( IsProtected64L( aFile ) )
     {
         ContentAccess::CContent* content = ContentAccess::CContent::NewLC( aFile );