# HG changeset patch # User hgs # Date 1285672138 -10800 # Node ID a117e284a2c6aec12e88c47a52e713b80c64e92a # Parent 9cceb5cb3ee69d2d7346f4e6322cb6800639a914 201037_01 diff -r 9cceb5cb3ee6 -r a117e284a2c6 commondrm/drmqtencryptor/drmencryptor.ui --- a/commondrm/drmqtencryptor/drmencryptor.ui Mon Sep 06 16:28:07 2010 +0300 +++ b/commondrm/drmqtencryptor/drmencryptor.ui Tue Sep 28 14:08:58 2010 +0300 @@ -1,5 +1,7 @@ + + mainWindow diff -r 9cceb5cb3ee6 -r a117e284a2c6 commondrm/drmutility/group/DrmUtilityDmgrWrapper.mmp --- a/commondrm/drmutility/group/DrmUtilityDmgrWrapper.mmp Mon Sep 06 16:28:07 2010 +0300 +++ b/commondrm/drmutility/group/DrmUtilityDmgrWrapper.mmp Tue Sep 28 14:08:58 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 9cceb5cb3ee6 -r a117e284a2c6 commondrm/drmutility/group/qt/drmutilitydmgrwrapper.pro --- a/commondrm/drmutility/group/qt/drmutilitydmgrwrapper.pro Mon Sep 06 16:28:07 2010 +0300 +++ b/commondrm/drmutility/group/qt/drmutilitydmgrwrapper.pro Tue Sep 28 14:08:58 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 9cceb5cb3ee6 -r a117e284a2c6 commondrm/drmutility/src/DrmUtility.cpp --- a/commondrm/drmutility/src/DrmUtility.cpp Mon Sep 06 16:28:07 2010 +0300 +++ b/commondrm/drmutility/src/DrmUtility.cpp Tue Sep 28 14:08:58 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 9cceb5cb3ee6 -r a117e284a2c6 commondrm/drmutility/src/drmutilityconnection.cpp --- a/commondrm/drmutility/src/drmutilityconnection.cpp Mon Sep 06 16:28:07 2010 +0300 +++ b/commondrm/drmutility/src/drmutilityconnection.cpp Tue Sep 28 14:08:58 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 9cceb5cb3ee6 -r a117e284a2c6 drm_plat/drm_common_api/tsrc/data/mmc/DRM/content.dcf diff -r 9cceb5cb3ee6 -r a117e284a2c6 drm_plat/drm_rights_api/tsrc/data/c/content.dcf diff -r 9cceb5cb3ee6 -r a117e284a2c6 drm_pub/oma_drm_caf_agent_api/tsrc/bc/DRM_CAF/data/content.dcf diff -r 9cceb5cb3ee6 -r a117e284a2c6 omadrm/drmengine/agentv2/src/Oma2AgentAttributes.cpp --- a/omadrm/drmengine/agentv2/src/Oma2AgentAttributes.cpp Mon Sep 06 16:28:07 2010 +0300 +++ b/omadrm/drmengine/agentv2/src/Oma2AgentAttributes.cpp Tue Sep 28 14:08:58 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 {