Revision: 201030 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 19 Aug 2010 10:12:10 +0300
branchRCL_3
changeset 25 50c53e893c3f
parent 24 99ea7534c5ab
child 26 1221b68b8a5f
Revision: 201030 Kit: 201033
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/drmengine/agentv2/src/Oma2AgentAttributes.cpp
omadrm/drmplugins/drmromtm/group/bld.inf
omadrm/drmplugins/drmromtm/ui/src/RoMtmUi.cpp
wmdrm/wmdrmengine/asf/src/asf.cpp
--- a/drm_pub/drm_helper_api/inc/Drmhelper.h	Thu Jul 15 18:57:30 2010 +0300
+++ b/drm_pub/drm_helper_api/inc/Drmhelper.h	Thu Aug 19 10:12:10 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/drmengine/agentv2/src/Oma2AgentAttributes.cpp	Thu Jul 15 18:57:30 2010 +0300
+++ b/omadrm/drmengine/agentv2/src/Oma2AgentAttributes.cpp	Thu Aug 19 10:12:10 2010 +0300
@@ -82,9 +82,6 @@
     DRM::EDrmAllowVideoMacroVision |
     DRM::EDrmAllowAudioUsb |   
     DRM::EDrmAllowAudioHdmiHdcpRequired |
-    DRM::EDrmAllowAudioHdmi |
-    DRM::EDrmAllowVideoHDMI  |
-    DRM::EDrmAllowVideoHdmiHdcpRequested |
     DRM::EDrmAllowVideoHdmiHdcpRequired;
 
 // ============================= LOCAL FUNCTIONS ===============================
--- a/omadrm/drmplugins/drmromtm/group/bld.inf	Thu Jul 15 18:57:30 2010 +0300
+++ b/omadrm/drmplugins/drmromtm/group/bld.inf	Thu Aug 19 10:12:10 2010 +0300
@@ -19,12 +19,10 @@
 #include <platform_paths.hrh>
 
 PRJ_PLATFORMS
-    DEFAULT -ARMI
+DEFAULT
 
 
 PRJ_EXPORTS
-../client/inc/romtmcli.h
-../server/inc/romtmser.h
 ../loc/romtmui.loc MW_LAYER_LOC_EXPORT_PATH( romtmui.loc )
 
 
@@ -35,4 +33,4 @@
 RoMtmUi.mmp
 RoMtmDat.mmp
 
-//  End of File  
+//  End of File
--- a/omadrm/drmplugins/drmromtm/ui/src/RoMtmUi.cpp	Thu Jul 15 18:57:30 2010 +0300
+++ b/omadrm/drmplugins/drmromtm/ui/src/RoMtmUi.cpp	Thu Aug 19 10:12:10 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -52,6 +52,8 @@
 #include <RoMtmUi.rsg> // test
 #include "drmmsgwatcherobserver.h"
 
+#include "cleanupresetanddestroy.h"
+
 // EXTERNAL DATA STRUCTURES
 // EXTERNAL FUNCTION PROTOTYPES
 // CONSTANTS
@@ -566,7 +568,7 @@
     CRichText& body = BaseMtm().Body();
     TPtrC ptr16( body.Read(0) );
     //const TUid KUidDRMUI = { 0x101f85c7 };
-    CDrmMsgWatcherObserver* operation = NULL;
+    CMsvOperation* operation( NULL );
 
     if ( iType == ERoapTrigger || iType == ERoapTriggerRoAcquisition )
         {
@@ -580,36 +582,39 @@
         ptr.Append(ptr16.Right(ptr16.Length()-4));
 
         show = ShowQueryL(ptr);
+
         if (!show)
             {
-            CleanupStack::PopAndDestroy(filename);
-            return CompletedOperationL( aStatus );
+            operation = CompletedOperationL( aStatus );
+            }
+        else
+            {
+            operation = CDrmMsgWatcherObserver::NewL(
+                    Session(),
+                    CActive::EPriorityStandard,
+                    aStatus,
+                    Type(),
+                    ptr,
+                    type );
             }
 
-	operation = CDrmMsgWatcherObserver::NewL( 
-            Session(),
-            CActive::EPriorityStandard,
-            aStatus,
-            Type(),
-            ptr,
-            type );
+        CleanupStack::PopAndDestroy(filename);
         }
     else
         {
-
         CAiwGenericParamList* paramList = CAiwGenericParamList::NewLC();
         TAiwVariant variantObject( ptr16 );
         TAiwGenericParam param( EGenericParamFile, variantObject );
         paramList->AppendL( param );
 
-	operation = CDrmMsgWatcherObserver::NewL( 
-            Session(),
-            CActive::EPriorityStandard,
-            aStatus,
-            Type(),
-            paramList );
+        operation = CDrmMsgWatcherObserver::NewL(
+                Session(),
+                CActive::EPriorityStandard,
+                aStatus,
+                Type(),
+                paramList );
 
-        CleanupStack::PopAndDestroy( paramList ); // paramList
+        CleanupStack::PopAndDestroy( paramList );
         }
 
     return operation;
@@ -765,9 +770,9 @@
     CleanupStack::PushL(buf);
     roap = Roap::CRoapEng::NewL();
     CleanupStack::PushL(roap);
+    CleanupResetAndDestroyPushL(array);
     roap->SetTriggerL(ptr,NULL,type,status,op,array);
-    array.ResetAndDestroy();
-    array.Close();
+    CleanupStack::PopAndDestroy(&array);
     CleanupStack::PopAndDestroy(roap);
     CleanupStack::PopAndDestroy(buf);
 
--- a/wmdrm/wmdrmengine/asf/src/asf.cpp	Thu Jul 15 18:57:30 2010 +0300
+++ b/wmdrm/wmdrmengine/asf/src/asf.cpp	Thu Aug 19 10:12:10 2010 +0300
@@ -86,6 +86,11 @@
     TInt aOffset,
     TInt aLength );
 
+LOCAL_C HBufC16* HBuf16IgnoreNullL(
+    const TDesC8& aBlock,
+    TInt aOffset,
+    TInt aLength );
+
 LOCAL_C TUint32 ReadUint64FromBlockL( const TDesC8& aBlock, TInt aOffset )
     {
     if ( aBlock.Length() <= ( aOffset + 3 ) )
@@ -140,6 +145,33 @@
 	return buffer;
     }
 
+LOCAL_C HBufC16* HBuf16IgnoreNullL(
+    const TDesC8& aBlock,
+    TInt aOffset,
+    TInt aLength )
+    {
+    if ( aBlock.Length() < ( aOffset + aLength ) )
+        {
+        User::Leave( KErrArgument );
+        }
+    HBufC16* buffer( HBufC16::NewL( aLength / 2 + 1 ) );
+    TPtr ptr( buffer->Des() );
+    
+    for ( TInt i( 0 ) ; i < aLength; i+=2 )
+        {
+        ptr.Append( aBlock[aOffset + i] );
+        }
+    
+    TInt dLength = ptr.Length();
+    
+    if ( dLength != 0 && ptr[dLength - 1] == '\0' )
+        {
+        ptr.SetLength( dLength - 1 );
+        }
+    
+    return buffer;
+    }
+
 // ============================ MEMBER FUNCTIONS ===============================
 
 // -----------------------------------------------------------------------------
@@ -582,15 +614,19 @@
         User::Leave( KErrOverflow );
         }
 
-    iTitle = HBuf16FromBlockL( *iHeaderData, offset, iTitleLength );
+    iTitle = HBuf16IgnoreNullL( *iHeaderData, offset, iTitleLength );
     offset += iTitleLength;
-    iAuthor = HBuf16FromBlockL( *iHeaderData, offset, iAuthorLength );
+    
+    iAuthor = HBuf16IgnoreNullL( *iHeaderData, offset, iAuthorLength );
     offset += iAuthorLength;
-    iCopyright = HBuf16FromBlockL( *iHeaderData, offset, iCopyrightLength );
+    
+    iCopyright = HBuf16IgnoreNullL( *iHeaderData, offset, iCopyrightLength );
     offset += iCopyrightLength;
-    iDescription = HBuf16FromBlockL( *iHeaderData, offset, iDescriptionLength );
+    
+    iDescription = HBuf16IgnoreNullL( *iHeaderData, offset, iDescriptionLength );
     offset += iDescriptionLength;
-    iRating = HBuf16FromBlockL( *iHeaderData, offset, iRatingLength );
+    
+    iRating = HBuf16IgnoreNullL( *iHeaderData, offset, iRatingLength );
     offset += iRatingLength;
     }