--- a/commondrm/drmutility/inc/drmutilitywmdrmwrapper.h Wed Aug 18 10:03:14 2010 +0300
+++ b/commondrm/drmutility/inc/drmutilitywmdrmwrapper.h Thu Sep 02 20:42:24 2010 +0300
@@ -187,7 +187,9 @@
// Show the appropriate notes
void ShowNoRightsNoteL(
ContentAccess::CData& aContent,
- TUint32 aReason );
+ TUint32 aReason,
+ TInt aOperationId,
+ DRM::MDrmHandleErrorObserver* aObserver );
//*** DLA:
--- a/commondrm/drmutility/src/DrmUtilityDmgrWrapper.cpp Wed Aug 18 10:03:14 2010 +0300
+++ b/commondrm/drmutility/src/DrmUtilityDmgrWrapper.cpp Thu Sep 02 20:42:24 2010 +0300
@@ -450,7 +450,7 @@
try
{
RBuf fileName;
- fileName.Create(KMaxFileName);
+ User::LeaveIfError(fileName.Create(KMaxFileName));
CleanupClosePushL(fileName);
roapTrigger.Name(fileName);
const QVariant& roapTriggerValue( QString((QChar*) fileName.Ptr(), fileName.Length()) );
--- a/commondrm/drmutility/src/drmutilitywmdrmwrapper.cpp Wed Aug 18 10:03:14 2010 +0300
+++ b/commondrm/drmutility/src/drmutilitywmdrmwrapper.cpp Thu Sep 02 20:42:24 2010 +0300
@@ -260,7 +260,7 @@
if ( !value )
{
- ShowNoRightsNoteL( aContent, reason );
+ ShowNoRightsNoteL( aContent, reason, aOperationId, aObserver );
User::LeaveIfError( aContent.GetAttribute( ContentAccess::ECanPlay, value ) );
if ( value )
{
@@ -484,7 +484,7 @@
{
case DRM::EUHCheckRightsActionDefault:
{
- ShowNoRightsNoteL( aContent, aReason );
+ ShowNoRightsNoteL( aContent, aReason, aOperationId, aObserver );
}
break;
@@ -542,8 +542,11 @@
//
void DRM::CDrmUtilityWMDrmWrapper::ShowNoRightsNoteL(
ContentAccess::CData& aContent,
- TUint32 /*aReason*/ )
+ TUint32 /*aReason*/,
+ TInt aOperationId,
+ DRM::MDrmHandleErrorObserver* aObserver )
{
+ TInt value;
TRAPD( err, LoadDlaWrapperL() );
if ( !err )
{
@@ -568,6 +571,14 @@
if ( !err && ret == EOk )
{
TRAP_IGNORE( DlaLicenseAcquisitionL( file ) );
+
+ // Ask the rights from CAF, same call for both ECanPlay and ECanView
+ aContent.GetAttribute( ContentAccess::ECanPlay, value );
+ // call given HandleErrorObserver
+ if( value > 0 )
+ {
+ aObserver->RightsAvailable( aOperationId, KErrNone );
+ }
}
CleanupStack::PopAndDestroy( &file );
}
--- a/drm_pub/drm_helper_api/inc/Drmhelper.h Wed Aug 18 10:03:14 2010 +0300
+++ b/drm_pub/drm_helper_api/inc/Drmhelper.h Thu Sep 02 20:42:24 2010 +0300
@@ -26,7 +26,7 @@
#include <ConeResLoader.h>
#include <apparc.h>
#include <rdrmhelper.h>
-#include <aknserverapp.h>
+#include <AknServerApp.h>
#include <caf/caf.h>
#include <caf/content.h>
#include <caf/data.h>
--- a/omadrm/drmplugins/drmrohandler/src/rohandlerdmgrwrapper.cpp Wed Aug 18 10:03:14 2010 +0300
+++ b/omadrm/drmplugins/drmrohandler/src/rohandlerdmgrwrapper.cpp Thu Sep 02 20:42:24 2010 +0300
@@ -326,7 +326,7 @@
try
{
RBuf fileName;
- fileName.Create(KMaxFileName);
+ User::LeaveIfError(fileName.Create(KMaxFileName));
CleanupClosePushL(fileName);
roapTrigger.Name(fileName);
const QVariant& roapTriggerValue( QString((QChar*) fileName.Ptr(), fileName.Length()) );
--- a/wmdrm/camese/wmdrmdlaapp/inc/wmdrmdlabrowsercontainer.h Wed Aug 18 10:03:14 2010 +0300
+++ b/wmdrm/camese/wmdrmdlaapp/inc/wmdrmdlabrowsercontainer.h Thu Sep 02 20:42:24 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -22,56 +22,22 @@
#include <coecntrl.h>
class CAknView;
-class MBrCtlSpecialLoadObserver;
-class CBrCtlInterface;
class CWmDrmDlaBrowserContainer : public CCoeControl
{
public:
- static CWmDrmDlaBrowserContainer* NewL( CAknView* aView,
- MBrCtlSpecialLoadObserver* aObserver );
- static CWmDrmDlaBrowserContainer* NewLC( CAknView* aView,
- MBrCtlSpecialLoadObserver* aObserver );
-
- /**
- * Destructor.
- */
- virtual ~CWmDrmDlaBrowserContainer();
-
- /**
- * Returns pointer to the CBrCtlInterface owned by the container.
- * @return A pointer to CBrCtlInterface
- */
- CBrCtlInterface* BrCtlInterface();
-
-
public: // From CCoeControl
/**
* @see CCoeControl
*/
- TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
-
- /**
- * @see CCoeControl
- */
- TInt CountComponentControls() const;
-
- /**
- * @see CCoeControl
- */
CCoeControl* ComponentControl( TInt aIndex ) const;
/**
* @see CCoeControl
*/
- void SizeChanged();
-
- /**
- * @see CCoeControl
- */
void FocusChanged( TDrawNow aDrawNow );
/**
@@ -82,15 +48,12 @@
private:
CWmDrmDlaBrowserContainer( CAknView* aView );
- void ConstructL( MBrCtlSpecialLoadObserver* aObserver );
private: // data
//Not owned
CAknView* iView;
- CBrCtlInterface* iBrCtlInterface;
-
};
#endif // C_WMDRMDLABROWSERCONTAINER_H
--- a/wmdrm/camese/wmdrmdlaapp/inc/wmdrmdlabrowserview.h Wed Aug 18 10:03:14 2010 +0300
+++ b/wmdrm/camese/wmdrmdlaapp/inc/wmdrmdlabrowserview.h Thu Sep 02 20:42:24 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -20,7 +20,6 @@
#define C_WMDRMDLABROWSERVIEW_H
#include <aknview.h>
-#include <BrCtlSpecialLoadObserver.h>
class CWmDrmDlaBrowserContainer;
class CInternetConnectionManager;
@@ -36,8 +35,7 @@
};
-class CWmDrmDlaBrowserView : public CAknView,
- public MBrCtlSpecialLoadObserver
+class CWmDrmDlaBrowserView : public CAknView
{
public:
@@ -50,33 +48,6 @@
*/
virtual ~CWmDrmDlaBrowserView();
- /**
- * Set the IAP that is used in network connection
- * @param aIap - IAP to be used
- */
- void SetIAP( TInt aIap );
-
- /**
- * Make a POST-request
- * @param aCallback - Callback used to inform when license
- * response is received
- * @param aPostUrl - Post URL
- * @param aPostContentType - Post content type
- * @param aPostData - Post data
- * @param aPostContentBoundary - Post content boundary
- */
- void PostL( MBrowserViewLicenseReceivedCallback* aCallback,
- const TDesC& aPostUrl,
- const TDesC8& aPostContentType,
- const TDesC8& aPostData,
- const TDesC8& aPostContentBoundary );
-
- /**
- * Get the license response
- * @return License response or NULL
- */
- HBufC8* LicenseResponse();
-
public: // From CAknView
/**
@@ -87,11 +58,6 @@
/**
* @see CAknView
*/
- void HandleCommandL( TInt aCommand );
-
- /**
- * @see CAknView
- */
void DoActivateL( const TVwsViewId& aPrevViewId,
TUid aCustomMessageId,
const TDesC8& aCustomMessage );
@@ -107,17 +73,6 @@
public: // From MBrCtlSpecialLoadObserver
- void NetworkConnectionNeededL( TInt* aConnectionPtr,
- TInt* aSockSvrHandle,
- TBool* aNewConn,
- TApBearerType* aBearerType );
-
- TBool HandleRequestL( RArray<TUint>* aTypeArray,
- CDesCArrayFlat* aDesArray );
-
- TBool HandleDownloadL( RArray<TUint>* aTypeArray,
- CDesCArrayFlat* aDesArray );
-
private:
CWmDrmDlaBrowserView();
--- a/wmdrm/camese/wmdrmdlaapp/src/wmdrmdlaappservicesession.cpp Wed Aug 18 10:03:14 2010 +0300
+++ b/wmdrm/camese/wmdrmdlaapp/src/wmdrmdlaappservicesession.cpp Thu Sep 02 20:42:24 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -121,8 +121,6 @@
}
aMessage.ReadL( 0, iapPckg );
- BrowserView()->SetIAP( iap );
-
CompleteMessage( aMessage, KErrNone );
}
@@ -159,12 +157,6 @@
ptr8.Set( postContentBoundary->Des() );
aMessage.ReadL( 3, ptr8 );
- BrowserView()->PostL( this,
- *postUrl,
- *postContentType,
- *postData,
- *postContentBoundary );
-
CleanupStack::PopAndDestroy( 4, postUrl ); //postContentBoundary, postData,
//postContentType, postUrl
@@ -187,16 +179,7 @@
{
TInt err( KErrNone );
- HBufC8* licenseResponse( BrowserView()->LicenseResponse() );
- if ( licenseResponse )
- {
- TInt licenseSize( licenseResponse->Size() );
- aMessage.WriteL( 0, TPckg<TInt>( licenseSize ) );
- }
- else
- {
err = KErrArgument;
- }
CompleteMessage( aMessage, err );
}
@@ -209,16 +192,8 @@
{
TInt err( KErrNone );
- HBufC8* licenseResponse( BrowserView()->LicenseResponse() );
- if ( licenseResponse )
- {
- aMessage.WriteL( 0, *licenseResponse );
- }
- else
- {
err = KErrArgument;
- }
-
+
CompleteMessage( aMessage, err );
}
--- a/wmdrm/camese/wmdrmdlaapp/src/wmdrmdlabrowsercontainer.cpp Wed Aug 18 10:03:14 2010 +0300
+++ b/wmdrm/camese/wmdrmdlaapp/src/wmdrmdlabrowsercontainer.cpp Thu Sep 02 20:42:24 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -19,49 +19,12 @@
// INCLUDE FILES
#include <AknDef.h>
#include <aknview.h>
-#include <brctlinterface.h>
#include "wmdrmdlabrowserview.h"
#include "wmdrmdlabrowsercontainer.h"
// ======== MEMBER FUNCTIONS ========
// ---------------------------------------------------------------------------
-// CWmDrmDlaBrowserContainer::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CWmDrmDlaBrowserContainer::ConstructL(
- MBrCtlSpecialLoadObserver* aObserver )
- {
- CreateWindowL();
- SetRect( iView->ClientRect() );
-
- iBrCtlInterface = CreateBrowserControlL(
- this, // parent control
- iView->ClientRect(), // client rect
- TBrCtlDefs::ECapabilityLoadHttpFw |
- TBrCtlDefs::ECapabilityDisplayScrollBar |
- TBrCtlDefs::ECapabilityUseDlMgr |
- TBrCtlDefs::ECapabilityCursorNavigation, // Capabilities
- TBrCtlDefs::ECommandIdBase, // command base
- NULL, // Softkeys observer
- NULL, // LinkResolver
- aObserver, // Special load observer
- NULL, // Layout Observer
- NULL, // Dialog provider
- NULL, // window observer
- NULL // Download observer
- );
-
- iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsAutoLoadImages,
- ETrue );
- iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsCookiesEnabled,
- ETrue );
- iBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsEmbedded,
- ETrue );
- ActivateL();
- }
-
-// ---------------------------------------------------------------------------
// CWmDrmDlaBrowserContainer::CWmDrmDlaBrowserContainer
// ---------------------------------------------------------------------------
//
@@ -71,84 +34,6 @@
}
// ---------------------------------------------------------------------------
-// CWmDrmDlaBrowserContainer::NewL
-// ---------------------------------------------------------------------------
-//
-CWmDrmDlaBrowserContainer* CWmDrmDlaBrowserContainer::NewL(
- CAknView* aView,
- MBrCtlSpecialLoadObserver* aObserver )
- {
- CWmDrmDlaBrowserContainer* self
- = CWmDrmDlaBrowserContainer::NewLC( aView, aObserver );
- CleanupStack::Pop( self );
- return self;
- }
-
-
-// ---------------------------------------------------------------------------
-// CWmDrmDlaBrowserContainer::NewLC
-// ---------------------------------------------------------------------------
-//
-CWmDrmDlaBrowserContainer* CWmDrmDlaBrowserContainer::NewLC(
- CAknView* aView,
- MBrCtlSpecialLoadObserver* aObserver )
- {
- CWmDrmDlaBrowserContainer* self
- = new( ELeave ) CWmDrmDlaBrowserContainer( aView );
- CleanupStack::PushL( self );
- self->ConstructL( aObserver );
- return self;
- }
-
-
-// ---------------------------------------------------------------------------
-// CWmDrmDlaBrowserContainer::~CWmDrmDlaBrowserContainer
-// ---------------------------------------------------------------------------
-//
-CWmDrmDlaBrowserContainer::~CWmDrmDlaBrowserContainer()
- {
- if(iBrCtlInterface != NULL)
- {
- TRAP_IGNORE( iBrCtlInterface->HandleCommandL( (TInt)TBrCtlDefs::ECommandCancelFetch + (TInt)TBrCtlDefs::ECommandIdBase ));
- }
- delete iBrCtlInterface;
- }
-
-// ---------------------------------------------------------------------------
-// CWmDrmDlaBrowserContainer::BrCtlInterface
-// ---------------------------------------------------------------------------
-//
-CBrCtlInterface* CWmDrmDlaBrowserContainer::BrCtlInterface()
- {
- return iBrCtlInterface;
- }
-
-// ---------------------------------------------------------------------------
-// CWmDrmDlaBrowserContainer::CountComponentControls
-// ---------------------------------------------------------------------------
-//
-TInt CWmDrmDlaBrowserContainer::CountComponentControls() const
- {
- if ( iBrCtlInterface )
- {
- return 1;
- }
- return 0;
- }
-
-// ---------------------------------------------------------------------------
-// CWmDrmDlaBrowserContainer::SizeChanged
-// ---------------------------------------------------------------------------
-//
-void CWmDrmDlaBrowserContainer::SizeChanged()
- {
- if ( iBrCtlInterface )
- {
- iBrCtlInterface->SetRect( Rect() );
- }
- }
-
-// ---------------------------------------------------------------------------
// CWmDrmDlaBrowserContainer::ComponentControl
// ---------------------------------------------------------------------------
//
@@ -157,37 +42,18 @@
{
switch ( aIndex )
{
- case 0:
- return iBrCtlInterface;
-
default:
return NULL;
}
}
// ---------------------------------------------------------------------------
-// CWmDrmDlaBrowserContainer::OfferKeyEventL
-// ---------------------------------------------------------------------------
-//
-TKeyResponse CWmDrmDlaBrowserContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent,
- TEventCode aType )
- {
- if ( iBrCtlInterface )
- {
- return iBrCtlInterface->OfferKeyEventL( aKeyEvent, aType );
- }
- return EKeyWasNotConsumed;
- }
-
-// ---------------------------------------------------------------------------
// CWmDrmDlaBrowserContainer::FocusChanged
// ---------------------------------------------------------------------------
//
void CWmDrmDlaBrowserContainer::FocusChanged(
TDrawNow aDrawNow )
{
- iBrCtlInterface->SetFocus( IsFocused() );
CCoeControl::FocusChanged( aDrawNow );
}
@@ -198,10 +64,6 @@
void CWmDrmDlaBrowserContainer::HandleResourceChange(
TInt aType )
{
- if ( iBrCtlInterface )
- {
- iBrCtlInterface->HandleResourceChange( aType );
- }
CCoeControl::HandleResourceChange( aType );
if ( aType == KEikDynamicLayoutVariantSwitch )
{
--- a/wmdrm/camese/wmdrmdlaapp/src/wmdrmdlabrowserview.cpp Wed Aug 18 10:03:14 2010 +0300
+++ b/wmdrm/camese/wmdrmdlaapp/src/wmdrmdlabrowserview.cpp Thu Sep 02 20:42:24 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-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"
@@ -22,7 +22,6 @@
#include <aknViewAppUi.h>
#include <coeaui.h>
#include <coecntrl.h>
-#include <brctlinterface.h>
#include <InternetConnectionManager.h>
#include <wmdrmdlaapp.rsg>
#include "wmdrmdlabrowserview.h"
@@ -30,7 +29,6 @@
#include "wmdrmdlaappconstants.h"
// CONTANTS
-_LIT( KDataTypeLicenseResponse, "application/vnd.ms-wmdrm.lic-resp" );
// ======== LOCAL FUNCTIONS ========
@@ -91,46 +89,6 @@
}
// ---------------------------------------------------------------------------
-// CWmDrmDlaBrowserView::SetIAP
-// ---------------------------------------------------------------------------
-//
-
-void CWmDrmDlaBrowserView::SetIAP( TInt aIap )
- {
- iIap = aIap;
- }
-
-// ---------------------------------------------------------------------------
-// CWmDrmDlaBrowserView::PostL
-// ---------------------------------------------------------------------------
-//
-void CWmDrmDlaBrowserView::PostL(
- MBrowserViewLicenseReceivedCallback* aCallback,
- const TDesC& aPostUrl,
- const TDesC8& aPostContentType,
- const TDesC8& aPostData,
- const TDesC8& aPostContentBoundary )
- {
- iCallback = aCallback;
- iContainer->BrCtlInterface()->PostUrlL( aPostUrl,
- aPostContentType,
- aPostData,
- &aPostContentBoundary,
- (TAny*)iContainer );
- iContainer->BrCtlInterface()->SetFocus( ETrue, EDrawNow );
- }
-
-// ---------------------------------------------------------------------------
-// CWmDrmDlaBrowserView::LicenseResponse
-// ---------------------------------------------------------------------------
-//
-
-HBufC8* CWmDrmDlaBrowserView::LicenseResponse()
- {
- return iLicenseResponse;
- }
-
-// ---------------------------------------------------------------------------
// CWmDrmDlaBrowserView::Id
// ---------------------------------------------------------------------------
//
@@ -140,28 +98,6 @@
}
// ---------------------------------------------------------------------------
-// CWmDrmDlaBrowserView::HandleCommandL
-// ---------------------------------------------------------------------------
-//
-void CWmDrmDlaBrowserView::HandleCommandL(
- TInt aCommand )
- {
- if ( aCommand >= TBrCtlDefs::ECommandIdBase +
- TBrCtlDefs::ECommandIdWMLBase &&
- aCommand <= TBrCtlDefs::ECommandIdBase +
- TBrCtlDefs::ECommandIdRange )
- {
- BrCtlHandleCommandL( aCommand );
- }
- else
- {
- iContainer->BrCtlInterface()->HandleCommandL( (TInt)TBrCtlDefs::ECommandCancelFetch +
- (TInt)TBrCtlDefs::ECommandIdBase );
- AppUi()->HandleCommandL( aCommand );
- }
- }
-
-// ---------------------------------------------------------------------------
// CWmDrmDlaBrowserView::DoActivateL
// ---------------------------------------------------------------------------
//
@@ -203,8 +139,6 @@
void CWmDrmDlaBrowserView::CreateContainerL()
{
RemoveContainer();
- iContainer = CWmDrmDlaBrowserContainer::NewL( this, this );
- iContainer->SetMopParent( this );
}
// ---------------------------------------------------------------------------
@@ -220,105 +154,3 @@
iContainer = NULL;
}
}
-
-// ---------------------------------------------------------------------------
-// CWmDrmDlaBrowserView::BrCtlHandleCommandL
-// ---------------------------------------------------------------------------
-//
-void CWmDrmDlaBrowserView::BrCtlHandleCommandL( TInt aCommand )
- {
- iContainer->BrCtlInterface()->HandleCommandL( aCommand );
- }
-
-// ---------------------------------------------------------------------------
-// CWmDrmDlaBrowserView::NetworkConnectionNeededL
-// ---------------------------------------------------------------------------
-//
-void CWmDrmDlaBrowserView::NetworkConnectionNeededL(
- TInt* aConnectionPtr,
- TInt* aSockSvrHandle,
- TBool* aNewConn,
- TApBearerType* aBearerType )
- {
- TInt ret( 0 );
- // If not connected, try to start a new connection
- if ( !iConMgr->Connected() )
- {
- iConMgr->SetRequestedAP( iIap );
- ret = iConMgr->StartConnectionL( ETrue );
- }
-
- // If connected, return needed info to framework
- if ( !ret )
- {
- *aConnectionPtr = reinterpret_cast<TInt>(&iConMgr->Connection() );
- *aSockSvrHandle = iConMgr->SocketServer().Handle();
- *aNewConn = EFalse;
- *aBearerType = EApBearerTypeAllBearers;
- }
- else
- {
- User::Leave( KErrCancel );
- }
- }
-
-// ---------------------------------------------------------------------------
-// CWmDrmDlaBrowserView::HandleRequestL
-// ---------------------------------------------------------------------------
-//
-TBool CWmDrmDlaBrowserView::HandleRequestL(
- RArray<TUint>* /*aTypeArray*/,
- CDesCArrayFlat* /*aDesArray*/ )
- {
- return EFalse;
- }
-
-// ---------------------------------------------------------------------------
-// CWmDrmDlaBrowserView::HandleDownloadL
-// ---------------------------------------------------------------------------
-//
-TBool CWmDrmDlaBrowserView::HandleDownloadL(
- RArray<TUint>* aTypeArray,
- CDesCArrayFlat* aDesArray )
- {
- //Check that content type and local file name exists
- //There must be both, because download manager downloads POST-content
- //in advance calling this function
- TInt contentTypeIndex( aTypeArray->Find( EParamReceivedContentType ) );
- TInt fileNameIndex( aTypeArray->Find( EParamLocalFileName ) );
- if ( contentTypeIndex != KErrNotFound &&
- fileNameIndex != KErrNotFound &&
- contentTypeIndex < aDesArray->Count() &&
- fileNameIndex < aDesArray->Count() )
- {
- //Check that the downloaded content is license response
- TPtrC16 dataTypePtr( (*aDesArray)[contentTypeIndex] );
- if ( dataTypePtr.CompareF( KDataTypeLicenseResponse ) == 0 )
- {
- //Get the path to the license response,
- //read the response, delete the file and
- //make a license received - callback
- TPtrC16 filePathPtr( (*aDesArray)[fileNameIndex] );
- RFs fs;
- User::LeaveIfError( fs.Connect() );
- CleanupClosePushL( fs );
- RFile file;
- TInt size( 0 );
- User::LeaveIfError( file.Open( fs, filePathPtr, EFileRead ) );
- CleanupClosePushL( file );
- User::LeaveIfError( file.Size( size ) );
- delete iLicenseResponse;
- iLicenseResponse = NULL;
- iLicenseResponse = HBufC8::NewL( size );
- TPtr8 licensePtr( iLicenseResponse->Des() );
- User::LeaveIfError( file.Read( 0, licensePtr, size ) );
- CleanupStack::PopAndDestroy( &file );
- User::LeaveIfError( fs.Delete( filePathPtr ) );
- CleanupStack::PopAndDestroy( &fs );
- iCallback->LicenseReceived();
- return ETrue;
- }
- }
- return EFalse;
- }
-