# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1282201930 -10800 # Node ID 50c53e893c3f85210761e609fb9aaf45adc49926 # Parent 99ea7534c5ab7999f696b8b333729c33d5d8b99f Revision: 201030 Kit: 201033 diff -r 99ea7534c5ab -r 50c53e893c3f drm_plat/drm_common_api/tsrc/data/mmc/DRM/content.dcf diff -r 99ea7534c5ab -r 50c53e893c3f drm_plat/drm_rights_api/tsrc/data/c/content.dcf diff -r 99ea7534c5ab -r 50c53e893c3f drm_pub/drm_helper_api/inc/Drmhelper.h --- 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 #include #include -#include +#include #include #include #include diff -r 99ea7534c5ab -r 50c53e893c3f drm_pub/oma_drm_caf_agent_api/tsrc/bc/DRM_CAF/data/content.dcf diff -r 99ea7534c5ab -r 50c53e893c3f omadrm/drmengine/agentv2/src/Oma2AgentAttributes.cpp --- 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 =============================== diff -r 99ea7534c5ab -r 50c53e893c3f omadrm/drmplugins/drmromtm/group/bld.inf --- 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 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 diff -r 99ea7534c5ab -r 50c53e893c3f omadrm/drmplugins/drmromtm/ui/src/RoMtmUi.cpp --- 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 // 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); diff -r 99ea7534c5ab -r 50c53e893c3f wmdrm/wmdrmengine/asf/src/asf.cpp --- 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; }