--- 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
/*
-* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2003-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"
@@ -14,8 +16,7 @@
* Description: DRM Encryption tool.
*
*/
-
-<?xml version="1.0" encoding="UTF-8"?>
+-->
<ui version="4.0">
<class>mainWindow</class>
<widget class="QDialog" name="mainWindow">
--- 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
--- 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
--- 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;
+ }
}
}
}
--- 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 <cmconnectionmethoddef.h>
#include <cmmanager.h>
#include <extendedconnpref.h>
-#include <cmapplicationsettingsui.h> // CCmApplicationSettingsUi
#include <es_enum.h>
#include <cdbcols.h> // 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
--- 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
{