# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1286141687 -10800 # Node ID 4cd1be9613dd7baef2df0cb53d7e0b1ebf512761 # Parent fa67163aa6eb0b2db674de1b5657a70eb0b48bbd Revision: 201037 Kit: 201039 diff -r fa67163aa6eb -r 4cd1be9613dd commondrm/drmqtencryptor/drmencryptor.ui --- a/commondrm/drmqtencryptor/drmencryptor.ui Fri Sep 17 08:31:25 2010 +0300 +++ b/commondrm/drmqtencryptor/drmencryptor.ui Mon Oct 04 00:34:47 2010 +0300 @@ -1,5 +1,7 @@ + + mainWindow diff -r fa67163aa6eb -r 4cd1be9613dd commondrm/drmutility/group/DrmUtilityDmgrWrapper.mmp --- a/commondrm/drmutility/group/DrmUtilityDmgrWrapper.mmp Fri Sep 17 08:31:25 2010 +0300 +++ b/commondrm/drmutility/group/DrmUtilityDmgrWrapper.mmp Mon Oct 04 00:34:47 2010 +0300 @@ -45,7 +45,7 @@ MW_LAYER_SYSTEMINCLUDE LIBRARY euser.lib -LIBRARY cmmanager.lib // RCmManager CCmApplicationSettingsUi +LIBRARY cmmanager.lib // RCmManager LIBRARY esock.lib // RConnection, RSocketServ LIBRARY extendedconnpref.lib netmeta.lib // TExtendedConnPref LIBRARY downloadmgr.lib diff -r fa67163aa6eb -r 4cd1be9613dd commondrm/drmutility/group/qt/drmutilitydmgrwrapper.pro --- a/commondrm/drmutility/group/qt/drmutilitydmgrwrapper.pro Fri Sep 17 08:31:25 2010 +0300 +++ b/commondrm/drmutility/group/qt/drmutilitydmgrwrapper.pro Mon Oct 04 00:34:47 2010 +0300 @@ -49,7 +49,7 @@ INCLUDEPATH += /epoc32/include/platform/mw/cwrt LIBS += -leuser - LIBS += -lcmmanager // RCmManager CCmApplicationSettingsUi + LIBS += -lcmmanager // RCmManager LIBS += -lesock // RConnection, RSocketServ LIBS += -lextendedconnpref LIBS += -lnetmeta // TExtendedConnPref diff -r fa67163aa6eb -r 4cd1be9613dd commondrm/drmutility/src/DrmUtility.cpp --- a/commondrm/drmutility/src/DrmUtility.cpp Fri Sep 17 08:31:25 2010 +0300 +++ b/commondrm/drmutility/src/DrmUtility.cpp Mon Oct 04 00:34:47 2010 +0300 @@ -215,6 +215,7 @@ TInt64 headerSize( 0 ); TBool isDrmFile( EFalse ); TPtr8 headerPtr( NULL, 0 ); + TInt dataLength = 0; aProtected = DRM::EUUnprotected; aAgent.Set( KNullDesC ); @@ -306,11 +307,17 @@ { // set the mimetype from the buffer which is in the beginning // starting from byte 3 with the length specified at position 2 - TPtrC8 mimeType( buffer->Des().Mid(3, (buffer->Des())[1]) ); - if( !mimeType.CompareF( *iOmaBasedMimeType ) ) - { - aAgent.Set( *DRM::CDrmUtility::iOmaBasedAgentName ); - isDrmFile = ETrue; + // also make sure the data length is greater or equal to the + // position + the 2nd byte of the content + dataLength = 3 + (buffer->Des())[1]; + if( buffer->Length() >= dataLength ) + { + TPtrC8 mimeType( buffer->Des().Mid(3, (buffer->Des())[1]) ); + if( !mimeType.CompareF( *iOmaBasedMimeType ) ) + { + aAgent.Set( *DRM::CDrmUtility::iOmaBasedAgentName ); + isDrmFile = ETrue; + } } } CleanupStack::PopAndDestroy( buffer ); @@ -333,6 +340,7 @@ TPtr8 asfPtr( NULL, 0 ); TBuf8< 32 > asfGuidHex; TBool isDrmFile( EFalse ); + TInt dataLength = 0; aProtected = DRM::EUUnprotected; aAgent.Set( KNullDesC ); @@ -401,12 +409,18 @@ { // set the mimetype from the buffer which is in the beginning // starting from byte 3 with the length specified at position 2 - TPtrC8 mimeType( aContent.Mid(3, (aContent)[1]) ); - if( !mimeType.CompareF( *iOmaBasedMimeType ) ) + // also make sure the data length is greater or equal to the + // position + the 2nd byte of the content + dataLength = 3 + (aContent)[1]; + if( aContent.Length() >= dataLength ) { - aAgent.Set( *DRM::CDrmUtility::iOmaBasedAgentName ); - isDrmFile = ETrue; - aProtected = DRM::EUProtected; + TPtrC8 mimeType( aContent.Mid(3, (aContent)[1]) ); + if( !mimeType.CompareF( *iOmaBasedMimeType ) ) + { + aAgent.Set( *DRM::CDrmUtility::iOmaBasedAgentName ); + isDrmFile = ETrue; + aProtected = DRM::EUProtected; + } } } } diff -r fa67163aa6eb -r 4cd1be9613dd commondrm/drmutility/src/drmutilityconnection.cpp --- a/commondrm/drmutility/src/drmutilityconnection.cpp Fri Sep 17 08:31:25 2010 +0300 +++ b/commondrm/drmutility/src/drmutilityconnection.cpp Mon Oct 04 00:34:47 2010 +0300 @@ -22,7 +22,6 @@ #include #include #include -#include // CCmApplicationSettingsUi #include #include // IAP, COMMDB_ID #include "drmutilityconnection.h" @@ -477,52 +476,9 @@ // void DRM::CDrmUtilityConnection::ConnectUsingQueryL() { - // Create overrides - TConnPrefList prefList; - TExtendedConnPref prefs; - - CCmApplicationSettingsUi* ui(CCmApplicationSettingsUi::NewLC()); - TCmSettingSelection selectedConn; - - TBool selected(ui->RunApplicationSettingsL(selectedConn)); - CleanupStack::PopAndDestroy(ui); - ui=NULL; - if (selected) - { - if (selectedConn.iResult == CMManager::EConnectionMethod) - { - prefs.SetIapId(selectedConn.iId); - } - else if (selectedConn.iResult == CMManager::EDestination) - { - prefs.SetSnapId(selectedConn.iId); - } - else if (selectedConn.iResult != CMManager::EDefaultConnection) - { - selected=EFalse; - } - } - if (selected) - { - if (selectedConn.iResult != CMManager::EDefaultConnection) - { - prefList.AppendL(&prefs); - // For ensuring possibly stale connections get disconnected first; - iConnection.Close(); - iConnection.Open(iSocketServ); - - iConnection.Start(prefList, iStatus); - } - else - { - iConnection.Start(iStatus); - } - SetActive(); - } - else - { - CompleteSelf(KErrCancel); - } + // Implement according to the new Connection Settings + // QT API when possible to test the implementation + CompleteSelf(KErrCancel); } // --------------------------------------------------------------------------- // DRM::CDrmUtilityConnection::CompleteSelf diff -r fa67163aa6eb -r 4cd1be9613dd drm_plat/drm_common_api/tsrc/data/mmc/DRM/content.dcf diff -r fa67163aa6eb -r 4cd1be9613dd drm_plat/drm_rights_api/tsrc/data/c/content.dcf diff -r fa67163aa6eb -r 4cd1be9613dd drm_pub/oma_drm_caf_agent_api/tsrc/bc/DRM_CAF/data/content.dcf diff -r fa67163aa6eb -r 4cd1be9613dd omadrm/drmengine/agentv2/src/Oma2AgentAttributes.cpp --- a/omadrm/drmengine/agentv2/src/Oma2AgentAttributes.cpp Fri Sep 17 08:31:25 2010 +0300 +++ b/omadrm/drmengine/agentv2/src/Oma2AgentAttributes.cpp Mon Oct 04 00:34:47 2010 +0300 @@ -81,9 +81,6 @@ DRM::EDrmAllowVideoMacroVision | DRM::EDrmAllowAudioUsb | DRM::EDrmAllowAudioHdmiHdcpRequired | - DRM::EDrmAllowAudioHdmi | - DRM::EDrmAllowVideoHDMI | - DRM::EDrmAllowVideoHdmiHdcpRequested | DRM::EDrmAllowVideoHdmiHdcpRequired; // ============================= LOCAL FUNCTIONS =============================== @@ -471,7 +468,9 @@ DRM::EDrmAllowAudioBluetooth | DRM::EDrmAllowVideoMacroVision | DRM::EDrmAllowAudioFmTransmitter | - DRM::EDrmAllowAudioUsb; + DRM::EDrmAllowAudioUsb | + DRM::EDrmAllowAudioHdmiHdcpRequired | + DRM::EDrmAllowVideoHdmiHdcpRequired; } else { @@ -714,7 +713,9 @@ DRM::EDrmAllowAudioBluetooth | DRM::EDrmAllowVideoMacroVision | DRM::EDrmAllowAudioFmTransmitter | - DRM::EDrmAllowAudioUsb; + DRM::EDrmAllowAudioUsb | + DRM::EDrmAllowAudioHdmiHdcpRequired | + DRM::EDrmAllowVideoHdmiHdcpRequired; } else {