201029
authorhgs
Thu, 22 Jul 2010 14:33:19 +0300
changeset 60 916cdf3599c4
parent 54 5ebe1934bb32
child 63 a882b3fd075c
201029
commondrm/drmutility/group/qt/drmutilitydmgrwrapper.pro
commondrm/rom/DRMEncryptor.iby
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
wmdrm/wmdrmengine/asf/src/asf.cpp
--- a/commondrm/drmutility/group/qt/drmutilitydmgrwrapper.pro	Thu Jul 08 20:21:37 2010 +0300
+++ b/commondrm/drmutility/group/qt/drmutilitydmgrwrapper.pro	Thu Jul 22 14:33:19 2010 +0300
@@ -12,7 +12,7 @@
 #
 # Contributors:
 #
-# Description: 
+# Description:
 #
 
 include ( drmutilitydmgrwrapper.pri )
@@ -20,6 +20,13 @@
 TEMPLATE = lib
 TARGET = DrmUtilityDmgrWrapper
 
+IncludeBlock = \
+	"$${LITERAL_HASH}include <data_caging_paths.hrh>" \
+	"$${LITERAL_HASH}include <platform_paths.hrh>"
+
+MMP_RULES += IncludeBlock
+
+
 SrcIfdefBlock = \
 	"$${LITERAL_HASH}ifdef __DRM" \
 	"SOURCE ../../src/DrmUtilityDmgrWrapper.cpp" \
@@ -29,7 +36,7 @@
 
 MMP_RULES += SrcIfdefBlock
 
-symbian: { 
+symbian: {
 	TARGET.CAPABILITY = CAP_GENERAL_DLL
 	TARGET.VID = VID_DEFAULT
 	TARGET.UID3 = 0x102830FE
@@ -38,7 +45,7 @@
 	INCLUDEPATH += ../../inc
 	INCLUDEPATH += ../../../../omadrm/drmengine/roap/inc
 	INCLUDEPATH += ../../../../inc   // ADo level inc dir
-	INCLUDEPATH += ../../traces      // OST definitions 
+	INCLUDEPATH += ../../traces      // OST definitions
 	INCLUDEPATH += /epoc32/include/platform/mw/cwrt
 
 	LIBS += -leuser
@@ -76,6 +83,6 @@
 	"$${LITERAL_HASH}endif"
 
 	MMP_RULES += defBlock
-	
+
 	}
 
--- a/commondrm/rom/DRMEncryptor.iby	Thu Jul 08 20:21:37 2010 +0300
+++ b/commondrm/rom/DRMEncryptor.iby	Thu Jul 22 14:33:19 2010 +0300
@@ -20,9 +20,10 @@
 #define __DRMENCRYPTOR_IBY__
 
 #include <data_caging_paths_for_iby.hrh>
+#ifndef _IMAGE_TYPE_PRD
 
 S60_APP_EXE(DRMENCRYPTOR)
-data = ZRESOURCE\apps\drmencryptor.mif                      APP_RESOURCE_DIR\drmencryptor.mif
 data = ZPRIVATE\10003a3f\import\APPS\drmencryptor_reg.rsc   PRIVATE\10003a3f\import\apps\drmencryptor_reg.rsc
 
+#endif //_IMAGE_TYPE_PRD
 #endif
--- a/wmdrm/wmdrmengine/asf/src/asf.cpp	Thu Jul 08 20:21:37 2010 +0300
+++ b/wmdrm/wmdrmengine/asf/src/asf.cpp	Thu Jul 22 14:33:19 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;
     }