Re-merge fixes for Bug 1993 and Bug 2121 RCL_3 PDK_3.0.3
authorShabe Razvi <shaber@symbian.org>
Fri, 17 Sep 2010 17:32:40 +0100
branchRCL_3
changeset 78 b72c2d56e34a
parent 77 00671737faf2 (diff)
parent 73 6661d8259859 (current diff)
child 89 c38f396e1cd0
Re-merge fixes for Bug 1993 and Bug 2121
--- a/commondrm/drmutility/inc/drmutilitywmdrmwrapper.h	Thu Sep 02 15:51:27 2010 +0100
+++ b/commondrm/drmutility/inc/drmutilitywmdrmwrapper.h	Fri Sep 17 17:32:40 2010 +0100
@@ -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	Thu Sep 02 15:51:27 2010 +0100
+++ b/commondrm/drmutility/src/drmutilitywmdrmwrapper.cpp	Fri Sep 17 17:32:40 2010 +0100
@@ -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	Thu Sep 02 15:51:27 2010 +0100
+++ b/omadrm/drmengine/roap/src/RoapEng.cpp	Fri Sep 17 17:32:40 2010 +0100
@@ -32,7 +32,7 @@
 #ifndef __WINS__
 #include <etelmm.h>
 #include <mmtsy_names.h>
-#include <SysUtil.h>
+#include <sysutil.h>
 #endif
 
 #include <flogger.h>