201033_01
authorhgs
Fri, 20 Aug 2010 11:00:50 +0300
changeset 69 5ce76b969369
parent 63 a882b3fd075c
child 70 2625ef7905cb
201033_01
commondrm/drmutility/inc/drmutilitywmdrmwrapper.h
commondrm/drmutility/src/DrmUtilityDmgrWrapper.cpp
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/drm_helper_api/inc/Drmhelper.h
drm_pub/oma_drm_caf_agent_api/tsrc/bc/DRM_CAF/data/content.dcf
omadrm/drmplugins/drmrohandler/src/rohandlerdmgrwrapper.cpp
--- a/commondrm/drmutility/inc/drmutilitywmdrmwrapper.h	Fri Aug 06 10:04:31 2010 +0300
+++ b/commondrm/drmutility/inc/drmutilitywmdrmwrapper.h	Fri Aug 20 11:00:50 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/DrmUtilityDmgrWrapper.cpp	Fri Aug 06 10:04:31 2010 +0300
+++ b/commondrm/drmutility/src/DrmUtilityDmgrWrapper.cpp	Fri Aug 20 11:00:50 2010 +0300
@@ -450,7 +450,7 @@
 	try
 		{
 		RBuf fileName;
-		fileName.Create(KMaxFileName);
+		User::LeaveIfError(fileName.Create(KMaxFileName));
 		CleanupClosePushL(fileName);
 		roapTrigger.Name(fileName);
 		const QVariant& roapTriggerValue( QString((QChar*) fileName.Ptr(), fileName.Length()) );
--- 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 );
         }
--- a/drm_pub/drm_helper_api/inc/Drmhelper.h	Fri Aug 06 10:04:31 2010 +0300
+++ b/drm_pub/drm_helper_api/inc/Drmhelper.h	Fri Aug 20 11:00:50 2010 +0300
@@ -26,7 +26,7 @@
 #include <ConeResLoader.h>
 #include <apparc.h>
 #include <rdrmhelper.h>
-#include <aknserverapp.h>
+#include <AknServerApp.h>
 #include <caf/caf.h>
 #include <caf/content.h>
 #include <caf/data.h>
--- a/omadrm/drmplugins/drmrohandler/src/rohandlerdmgrwrapper.cpp	Fri Aug 06 10:04:31 2010 +0300
+++ b/omadrm/drmplugins/drmrohandler/src/rohandlerdmgrwrapper.cpp	Fri Aug 20 11:00:50 2010 +0300
@@ -326,7 +326,7 @@
 	try
 		{
 		RBuf fileName;
-		fileName.Create(KMaxFileName);
+		User::LeaveIfError(fileName.Create(KMaxFileName));
 		CleanupClosePushL(fileName);
 		roapTrigger.Name(fileName);
 		const QVariant& roapTriggerValue( QString((QChar*) fileName.Ptr(), fileName.Length()) );