commondrm/drmutility/src/drmutilitywmdrmwrapper.cpp
changeset 69 5ce76b969369
parent 49 69d8e75812b7
child 75 df048d343f83
--- a/commondrm/drmutility/src/drmutilitywmdrmwrapper.cpp	Fri Aug 06 10:04:31 2010 +0300
+++ b/commondrm/drmutility/src/drmutilitywmdrmwrapper.cpp	Fri Aug 20 11:00:50 2010 +0300
@@ -260,7 +260,7 @@
 
     if ( !value )
         {
-        ShowNoRightsNoteL( aContent, reason );
+        ShowNoRightsNoteL( aContent, reason, aOperationId, aObserver );
         User::LeaveIfError( aContent.GetAttribute( ContentAccess::ECanPlay, value ) );
         if ( value )
             {
@@ -484,7 +484,7 @@
         {
         case DRM::EUHCheckRightsActionDefault:
             {
-            ShowNoRightsNoteL( aContent, aReason );
+            ShowNoRightsNoteL( aContent, aReason, aOperationId, aObserver );
             }
             break;
 
@@ -542,8 +542,11 @@
 //
 void DRM::CDrmUtilityWMDrmWrapper::ShowNoRightsNoteL(
     ContentAccess::CData& aContent,
-    TUint32 /*aReason*/ )
+    TUint32 /*aReason*/,
+    TInt aOperationId,
+    DRM::MDrmHandleErrorObserver* aObserver )
     {
+    TInt value;
     TRAPD( err, LoadDlaWrapperL() );
     if ( !err )
         {
@@ -568,6 +571,14 @@
         if ( !err && ret == EOk )
             {
             TRAP_IGNORE( DlaLicenseAcquisitionL( file ) );
+            
+            // Ask the rights from CAF, same call for both ECanPlay and ECanView
+            aContent.GetAttribute( ContentAccess::ECanPlay, value );
+            // call given HandleErrorObserver
+            if( value > 0 )
+                {
+                aObserver->RightsAvailable( aOperationId, KErrNone );              
+                }
             }
         CleanupStack::PopAndDestroy( &file );
         }