Revision: 201033 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 14 Sep 2010 21:50:40 +0300
branchRCL_3
changeset 77 00671737faf2
parent 72 1481bf457703
child 78 b72c2d56e34a
child 81 e9463401011b
Revision: 201033 Kit: 201035
commondrm/drmutility/inc/drmutilitywmdrmwrapper.h
commondrm/drmutility/src/drmutilitywmdrmwrapper.cpp
drm_plat/drm_common_api/tsrc/data/mmc/DRM/content.dcf
drm_plat/drm_rights_api/tsrc/data/c/content.dcf
drm_pub/oma_drm_caf_agent_api/tsrc/bc/DRM_CAF/data/content.dcf
omadrm/drmengine/roap/src/RoapEng.cpp
--- a/commondrm/drmutility/inc/drmutilitywmdrmwrapper.h	Wed Sep 01 12:21:16 2010 +0100
+++ b/commondrm/drmutility/inc/drmutilitywmdrmwrapper.h	Tue Sep 14 21:50:40 2010 +0300
@@ -187,7 +187,9 @@
     // Show the appropriate notes
     void ShowNoRightsNoteL(
         ContentAccess::CData& aContent,
-        TUint32 aReason );
+        TUint32 aReason,
+        TInt aOperationId,
+        DRM::MDrmHandleErrorObserver* aObserver );
 
 //*** DLA:
 
--- a/commondrm/drmutility/src/drmutilitywmdrmwrapper.cpp	Wed Sep 01 12:21:16 2010 +0100
+++ b/commondrm/drmutility/src/drmutilitywmdrmwrapper.cpp	Tue Sep 14 21:50:40 2010 +0300
@@ -276,7 +276,7 @@
 
     if ( !value )
         {
-        ShowNoRightsNoteL( aContent, reason );
+        ShowNoRightsNoteL( aContent, reason, aOperationId, aObserver );
         User::LeaveIfError( aContent.GetAttribute( ContentAccess::ECanPlay, value ) );
         if ( value )
             {
@@ -500,7 +500,7 @@
         {
         case DRM::EUHCheckRightsActionDefault:
             {
-            ShowNoRightsNoteL( aContent, aReason );
+            ShowNoRightsNoteL( aContent, aReason, aOperationId, aObserver );
             }
             break;
 
@@ -558,8 +558,11 @@
 //
 void DRM::CDrmUtilityWMDrmWrapper::ShowNoRightsNoteL(
     ContentAccess::CData& aContent,
-    TUint32 /*aReason*/ )
+    TUint32 /*aReason*/,
+    TInt aOperationId,
+    DRM::MDrmHandleErrorObserver* aObserver )
     {
+    TInt value;
     TRAPD( err, LoadDlaWrapperL() );
     if ( !err )
         {
@@ -589,6 +592,14 @@
         if ( !err && ( ret == EAknSoftkeyYes || ret == EAknSoftkeyOk ) && iWmDrmDlaSupportOn)
             {
             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 );
         }
--- a/omadrm/drmengine/roap/src/RoapEng.cpp	Wed Sep 01 12:21:16 2010 +0100
+++ b/omadrm/drmengine/roap/src/RoapEng.cpp	Tue Sep 14 21:50:40 2010 +0300
@@ -32,7 +32,7 @@
 #ifndef __WINS__
 #include <etelmm.h>
 #include <mmtsy_names.h>
-#include <SysUtil.h>
+#include <sysutil.h>
 #endif
 
 #include <flogger.h>