201025_04
authorhgs
Mon, 28 Jun 2010 15:55:28 +0300
changeset 52 d752ced89971
parent 49 69d8e75812b7
child 54 5ebe1934bb32
201025_04
drm_plat/drm_common_api/tsrc/data/mmc/DRM/content.dcf
drm_plat/drm_rights_api/tsrc/data/c/content.dcf
drm_pub/oma_drm_caf_agent_api/tsrc/bc/DRM_CAF/data/content.dcf
omadrm/drmplugins/drmrohandler/group/rohandler.pri
omadrm/drmplugins/drmrohandler/inc/RoHandlerStringResourceReader.h
omadrm/drmplugins/drmrohandler/inc/StringResourceReader.h
omadrm/drmplugins/drmrohandler/src/CRoHandler.cpp
omadrm/drmplugins/drmrohandler/src/RoHandlerStringResourceReader.cpp
omadrm/drmplugins/drmrohandler/src/StringResourceReader.cpp
--- a/omadrm/drmplugins/drmrohandler/group/rohandler.pri	Thu Jun 24 12:39:58 2010 +0300
+++ b/omadrm/drmplugins/drmrohandler/group/rohandler.pri	Mon Jun 28 15:55:28 2010 +0300
@@ -16,12 +16,12 @@
 
 # Input
 HEADERS +=	../inc/CRoHandler.h \
-			../inc/StringResourceReader.h \
+			../inc/RoHandlerStringResourceReader.h \
 			../inc/rohandlerdmgrwrapper.h \
 			../inc/qrohandlerdmgreventhandler.h
 
 SOURCES +=	../src/CRoHandler.cpp \
-			../src/StringResourceReader.cpp \
+			../src/RoHandlerStringResourceReader.cpp \
 			../src/rohandlerdmgrwrapper.cpp \
 			../src/qrohandlerdmgreventhandler.cpp
-	
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/omadrm/drmplugins/drmrohandler/inc/RoHandlerStringResourceReader.h	Mon Jun 28 15:55:28 2010 +0300
@@ -0,0 +1,71 @@
+/*
+* 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*      Declaration of CRoHandlerStringResourceReader.
+*
+*
+*/
+
+
+#ifndef ROHANDLERSTRINGRESOURCEREADER_H
+#define ROHANDLERSTRINGRESOURCEREADER_H
+
+// INCLUDE FILES
+
+#include <e32base.h>
+#include <e32std.h>
+#include <barsc.h>
+
+// FORWARD DECLARATIONS
+
+class RFs;
+
+// CLASS DECLARATION
+
+/**
+* Utility class that helps reading string resources without CONE.
+* Not intended for derivation.
+*/
+class CRoHandlerStringResourceReader : public CBase
+    {
+    public: // Constructors and destructor
+
+        CRoHandlerStringResourceReader( RFs& aFs, const TDesC& aRscFileWithPathAndDrive );
+
+        ~CRoHandlerStringResourceReader();
+
+    public: // New functions
+
+        /**
+        * Return a given string from resource.
+        * @param aResId Resource ID.
+        * @return See above.
+        */
+        HBufC* AllocReadResourceL( TInt aResId );
+
+    private: // New functions
+
+        void InitializeL();
+
+    private: // Data members
+
+        RFs& iFs;                ///< File server session.
+        TBuf<256> iRscFileName;
+        RResourceFile iResourceFile;
+        TBool iInitialized;
+    };
+
+#endif // ROHANDLERSTRINGRESOURCEREADER_H
+
+// End of file.
--- a/omadrm/drmplugins/drmrohandler/inc/StringResourceReader.h	Thu Jun 24 12:39:58 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
-* Copyright (c) 2002 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"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*      Declaration of CStringResourceReader.
-*      
-*
-*/
-
-
-#ifndef STRINGRESOURCEREADER_H
-#define STRINGRESOURCEREADER_H
-
-// INCLUDE FILES
-
-#include <e32base.h>
-#include <e32std.h>
-#include <barsc.h>
-
-// FORWARD DECLARATIONS
-
-class RFs;
-
-// CLASS DECLARATION
-
-/**
-* Utility class that helps reading string resources without CONE.
-* Not intended for derivation.
-*/
-class CStringResourceReader : public CBase
-    {
-    public: // Constructors and destructor
-
-        CStringResourceReader( RFs& aFs, const TDesC& aRscFileWithPathAndDrive );
-
-        ~CStringResourceReader();
-
-    public: // New functions
-
-        /**
-        * Return a given string from resource.
-        * @param aResId Resource ID.
-        * @return See above.
-        */
-        HBufC* AllocReadResourceL( TInt aResId );
-
-    private: // New functions
-
-        void InitializeL();
-
-    private: // Data members
-
-        RFs& iFs;                ///< File server session.
-        TBuf<256> iRscFileName;
-        RResourceFile iResourceFile;
-        TBool iInitialized;
-    };
-
-#endif // STRINGRESOURCEREADER_H
-
-// End of file.
--- a/omadrm/drmplugins/drmrohandler/src/CRoHandler.cpp	Thu Jun 24 12:39:58 2010 +0300
+++ b/omadrm/drmplugins/drmrohandler/src/CRoHandler.cpp	Mon Jun 28 15:55:28 2010 +0300
@@ -30,7 +30,6 @@
 #include <centralrepository.h>          // link against centralrepository.lib
 #include <msvuids.h>
 #include <msvids.h>
-#include <DownloadMgrClient.h>
 
 #ifdef RD_MULTIPLE_DRIVE
 #include <driveinfo.h>
@@ -46,7 +45,7 @@
 #include "RoMtmCli.h"                       // for CRightsObjectMtmClient
 #include "RoapSyncWrapper.h"
 
-#include "StringResourceReader.h"
+#include "RoHandlerStringResourceReader.h"
 #include "rohandlerdmgrwrapper.h"
 #include "rohandlerinternalcrkeys.h"
 
@@ -99,7 +98,6 @@
 _LIT( KRoHandlerTriggerFilePath, "c:\\system\\data\\" );
 #endif
 
-_LIT( KPushMtmRes, "PushMtmUi.rsc" );
 _LIT( KRoHandlerResourceFile, "RoHandler.rsc" );
 
 _LIT8( KRoapTriggerElement, "roapTrigger" );
@@ -1188,10 +1186,10 @@
     TRAP( r, WriteL( _L8( "ReadFromResourceLC-fs.Connect" ) ) );
 #endif
     CleanupClosePushL( fs );
-    CStringResourceReader* reader(
-        new ( ELeave ) CStringResourceReader( fs, aFile ) );
+    CRoHandlerStringResourceReader* reader(
+        new ( ELeave ) CRoHandlerStringResourceReader( fs, aFile ) );
 #ifdef _DRM_TESTING
-    TRAP( r, WriteL( _L8( "ReadFromResourceLC-CStringResourceReader" ) ) );
+    TRAP( r, WriteL( _L8( "ReadFromResourceLC-CRoHandlerStringResourceReader" ) ) );
 #endif
     CleanupStack::PushL( reader );
     aBuf = reader->AllocReadResourceL( aIndex );
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/omadrm/drmplugins/drmrohandler/src/RoHandlerStringResourceReader.cpp	Mon Jun 28 15:55:28 2010 +0300
@@ -0,0 +1,253 @@
+/*
+* 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*     Implementation of CRoHandlerStringResourceReader
+*
+*
+*/
+
+
+// INCLUDE FILES
+
+#include "RoHandlerStringResourceReader.h"
+#include <f32file.h>
+#include <barsread.h>
+#include <bautils.h>
+
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+//#define _DRM_TESTING
+
+#ifdef _DRM_TESTING
+LOCAL_C void WriteLogL( const TDesC8& text , RFs &aFs );
+LOCAL_C void WriteFileL( const TDesC8& text , RFs &aFs , const TDesC& aName );
+LOCAL_C void CreateLogL();
+LOCAL_C void WriteL( const TDesC8& aText );
+LOCAL_C void WriteL( const TDesC& aText );
+LOCAL_C void WriteL( const TDesC8& aText , TInt aErr );
+LOCAL_C void WriteCurrentTimeL();
+#endif
+
+// -----------------------------------------------------------------------------
+// Testing stuff
+// -----------------------------------------------------------------------------
+//
+
+#ifdef _DRM_TESTING
+LOCAL_C void WriteLogL( const TDesC8& text , RFs &aFs )
+    {
+    _LIT( KLogFile , "c:\\StringResourceReader.txt" );
+    WriteFileL( text , aFs , KLogFile );
+    }
+
+LOCAL_C void WriteFileL( const TDesC8& text , RFs &aFs , const TDesC& aName )
+    {
+    RFile file;
+    TInt size;
+    User::LeaveIfError( file.Open( aFs, aName , EFileWrite ) );
+    CleanupClosePushL( file );
+    User::LeaveIfError( file.Size( size ) );
+    User::LeaveIfError( file.Write( size, text ) );
+    CleanupStack::PopAndDestroy(); //file
+    }
+
+LOCAL_C void CreateLogL()
+    {
+    RFs fs;
+    User::LeaveIfError(fs.Connect());
+    CleanupClosePushL(fs);
+    RFile file;
+    User::LeaveIfError( file.Replace( fs , _L("c:\\StringResourceReader.txt") , EFileWrite ) );
+    file.Close();
+    CleanupStack::PopAndDestroy(); //fs
+    }
+
+LOCAL_C void WriteL( const TDesC& aText )
+    {
+    RFs fs;
+    User::LeaveIfError( fs.Connect() );
+    CleanupClosePushL(fs);
+    HBufC8* text = HBufC8::NewLC(1000);
+    TPtr8 textptr(text->Des() );
+    textptr.Append( aText );
+    textptr.Append( _L8("\r\n") );
+    WriteLogL(textptr , fs);
+    CleanupStack::PopAndDestroy(text);
+    CleanupStack::PopAndDestroy(); //fs
+    WriteCurrentTimeL();
+    }
+
+LOCAL_C void WriteL( const TDesC8& aText )
+    {
+    RFs fs;
+    User::LeaveIfError( fs.Connect() );
+    CleanupClosePushL(fs);
+    HBufC8* text = HBufC8::NewLC(1000);
+    TPtr8 textptr(text->Des() );
+    textptr.Append( aText );
+    textptr.Append( _L8("\r\n") );
+    WriteLogL(textptr , fs);
+    CleanupStack::PopAndDestroy(text);
+    CleanupStack::PopAndDestroy(); //fs
+    WriteCurrentTimeL();
+    }
+
+LOCAL_C void WriteL( const TDesC8& aText , TInt aErr )
+    {
+    _LIT8(KErr,": %d");
+    HBufC8* text = HBufC8::NewLC(1000+20);
+    TBuf8<20> num;
+    TPtr8 textptr(text->Des());
+    textptr.Append(aText);
+    num.Format(KErr(),aErr);
+    textptr.Append(num);
+    WriteL(textptr);
+    CleanupStack::PopAndDestroy(text);
+    }
+
+LOCAL_C void WriteCurrentTimeL()
+    {
+    RFs fs;
+    User::LeaveIfError( fs.Connect() );
+    CleanupClosePushL(fs);
+    HBufC8* text = HBufC8::NewLC(100);
+    TPtr8 textptr(text->Des() );
+// Date and Time display
+    TTime time;
+    time.HomeTime();
+    TBuf<256> dateString;
+    _LIT(KDate,"%*E%*D%X%*N%*Y %1 %2 '%3");
+    time.FormatL(dateString,KDate);
+    textptr.Append(_L( "\r\n\t\tData:\t" ) );
+    textptr.Append( dateString );
+    _LIT(KTime,"%-B%:0%J%:1%T%:2%S%:3%+B");
+    time.FormatL(dateString,KTime);
+    textptr.Append(_L( "\r\n\t\tTime:\t" ) );
+    textptr.Append( dateString );
+    textptr.Append(_L( "\r\n" ) );
+    textptr.Append(_L( "\r\n" ) );
+    WriteLogL(textptr , fs);
+    CleanupStack::PopAndDestroy(text);
+    CleanupStack::PopAndDestroy(); //fs
+    }
+#endif
+
+// ================= MEMBER FUNCTIONS =======================
+
+
+// ---------------------------------------------------------
+// CRoHandlerStringResourceReader::CRoHandlerStringResourceReader
+// ---------------------------------------------------------
+//
+CRoHandlerStringResourceReader::CRoHandlerStringResourceReader
+    ( RFs& aFs, const TDesC& aRscFileWithPathAndDrive )
+:   CBase(), iFs( aFs ), iInitialized( EFalse )
+    {
+#ifdef _DRM_TESTING
+    TRAPD(r,CreateLogL());
+    TRAP(r,WriteL(_L8("CRoHandlerStringResourceReader")));
+#endif
+    iRscFileName.Copy( aRscFileWithPathAndDrive );
+    }
+
+// ---------------------------------------------------------
+// CRoHandlerStringResourceReader::~CRoHandlerStringResourceReader
+// ---------------------------------------------------------
+//
+CRoHandlerStringResourceReader::~CRoHandlerStringResourceReader()
+    {
+    iResourceFile.Close();
+#ifdef _DRM_TESTING
+    TRAPD(r,WriteL(_L8("~CRoHandlerStringResourceReader")));
+#endif
+    }
+
+// ---------------------------------------------------------
+// CRoHandlerStringResourceReader::AllocReadResourceL
+// ---------------------------------------------------------
+//
+HBufC* CRoHandlerStringResourceReader::AllocReadResourceL( TInt aResId )
+    {
+#ifdef _DRM_TESTING
+    TRAPD(r,WriteL(_L8("AllocReadResourceL"),aResId));
+#endif
+
+    InitializeL();
+
+#ifdef _DRM_TESTING
+    TRAP(r,WriteL(_L8("AllocReadResourceL-InitializeL")));
+#endif
+
+    HBufC8* buf8 = iResourceFile.AllocReadLC( aResId );
+
+#ifdef _DRM_TESTING
+    TRAP(r,WriteL(_L8("AllocReadResourceL-iResourceFile.AllocReadLC")));
+#endif
+
+#ifdef _UNICODE
+    const TPtrC buf( (const TUint16*)buf8->Ptr(), buf8->Size()/2 );
+#else
+    const TPtrC buf( buf8->Ptr(), buf8->Size() );
+#endif
+    HBufC* retBuf = buf.AllocL();
+    CleanupStack::PopAndDestroy( buf8 );
+
+#ifdef _DRM_TESTING
+    TRAP(r,WriteL(_L8("AllocReadResourceL-End")));
+#endif
+    return retBuf;
+    }
+
+// ---------------------------------------------------------
+// CRoHandlerStringResourceReader::InitializeL
+// ---------------------------------------------------------
+//
+void CRoHandlerStringResourceReader::InitializeL()
+    {
+#ifdef _DRM_TESTING
+    TRAPD(r,WriteL(_L8("InitializeL")));
+#endif
+    if ( !iInitialized )
+        {
+        TFileName resourceFileName( iRscFileName );
+#ifdef _DRM_TESTING
+    TRAP(r,WriteL(_L8("InitializeL-NearestLanguageFile")));
+#endif
+
+#ifdef _DRM_TESTING
+    TRAP(r,WriteL(resourceFileName));
+#endif
+        BaflUtils::NearestLanguageFile( iFs, resourceFileName );
+#ifdef _DRM_TESTING
+    TRAP(r,WriteL(_L8("InitializeL-NearestLanguageFile-End")));
+#endif
+
+        iResourceFile.OpenL( iFs, resourceFileName );
+#ifdef _DRM_TESTING
+    TRAP(r,WriteL(_L8("InitializeL-OpenL-End")));
+#endif
+
+        iResourceFile.ConfirmSignatureL( iResourceFile.SignatureL() );
+#ifdef _DRM_TESTING
+    TRAP(r,WriteL(_L8("InitializeL-ConfirmSignatureL-End")));
+#endif
+        iInitialized = ETrue;
+        }
+#ifdef _DRM_TESTING
+    TRAP(r,WriteL(_L8("InitializeL-End")));
+#endif
+    }
+
+// End of file.
--- a/omadrm/drmplugins/drmrohandler/src/StringResourceReader.cpp	Thu Jun 24 12:39:58 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,253 +0,0 @@
-/*
-* Copyright (c) 2002 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"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*     Implementation of CStringResourceReader
-*
-*
-*/
-
-
-// INCLUDE FILES
-
-#include "StringResourceReader.h"
-#include <f32file.h>
-#include <barsread.h>
-#include <bautils.h>
-
-
-// ============================= LOCAL FUNCTIONS ===============================
-
-//#define _DRM_TESTING
-
-#ifdef _DRM_TESTING
-LOCAL_C void WriteLogL( const TDesC8& text , RFs &aFs );
-LOCAL_C void WriteFileL( const TDesC8& text , RFs &aFs , const TDesC& aName );
-LOCAL_C void CreateLogL();
-LOCAL_C void WriteL( const TDesC8& aText );
-LOCAL_C void WriteL( const TDesC& aText );
-LOCAL_C void WriteL( const TDesC8& aText , TInt aErr );
-LOCAL_C void WriteCurrentTimeL();
-#endif
-
-// -----------------------------------------------------------------------------
-// Testing stuff
-// -----------------------------------------------------------------------------
-//
-
-#ifdef _DRM_TESTING
-LOCAL_C void WriteLogL( const TDesC8& text , RFs &aFs )
-    {
-    _LIT( KLogFile , "c:\\StringResourceReader.txt" );
-    WriteFileL( text , aFs , KLogFile );
-    }
-
-LOCAL_C void WriteFileL( const TDesC8& text , RFs &aFs , const TDesC& aName )
-    {
-    RFile file;
-    TInt size;
-    User::LeaveIfError( file.Open( aFs, aName , EFileWrite ) );
-    CleanupClosePushL( file );
-    User::LeaveIfError( file.Size( size ) );
-    User::LeaveIfError( file.Write( size, text ) );
-    CleanupStack::PopAndDestroy(); //file
-    }
-
-LOCAL_C void CreateLogL()
-    {
-    RFs fs;
-    User::LeaveIfError(fs.Connect());
-    CleanupClosePushL(fs);
-    RFile file;
-    User::LeaveIfError( file.Replace( fs , _L("c:\\StringResourceReader.txt") , EFileWrite ) );
-    file.Close();
-    CleanupStack::PopAndDestroy(); //fs
-    }
-
-LOCAL_C void WriteL( const TDesC& aText )
-    {
-    RFs fs;
-    User::LeaveIfError( fs.Connect() );
-    CleanupClosePushL(fs);
-    HBufC8* text = HBufC8::NewLC(1000);
-    TPtr8 textptr(text->Des() );
-    textptr.Append( aText );
-    textptr.Append( _L8("\r\n") );
-    WriteLogL(textptr , fs);
-    CleanupStack::PopAndDestroy(text);
-    CleanupStack::PopAndDestroy(); //fs
-    WriteCurrentTimeL();
-    }
-
-LOCAL_C void WriteL( const TDesC8& aText )
-    {
-    RFs fs;
-    User::LeaveIfError( fs.Connect() );
-    CleanupClosePushL(fs);
-    HBufC8* text = HBufC8::NewLC(1000);
-    TPtr8 textptr(text->Des() );
-    textptr.Append( aText );
-    textptr.Append( _L8("\r\n") );
-    WriteLogL(textptr , fs);
-    CleanupStack::PopAndDestroy(text);
-    CleanupStack::PopAndDestroy(); //fs
-    WriteCurrentTimeL();
-    }
-
-LOCAL_C void WriteL( const TDesC8& aText , TInt aErr )
-    {
-    _LIT8(KErr,": %d");
-    HBufC8* text = HBufC8::NewLC(1000+20);
-    TBuf8<20> num;
-    TPtr8 textptr(text->Des());
-    textptr.Append(aText);
-    num.Format(KErr(),aErr);
-    textptr.Append(num);
-    WriteL(textptr);
-    CleanupStack::PopAndDestroy(text);
-    }
-
-LOCAL_C void WriteCurrentTimeL()
-    {
-    RFs fs;
-    User::LeaveIfError( fs.Connect() );
-    CleanupClosePushL(fs);
-    HBufC8* text = HBufC8::NewLC(100);
-    TPtr8 textptr(text->Des() );
-// Date and Time display
-    TTime time;
-    time.HomeTime();
-    TBuf<256> dateString;
-    _LIT(KDate,"%*E%*D%X%*N%*Y %1 %2 '%3");
-    time.FormatL(dateString,KDate);
-    textptr.Append(_L( "\r\n\t\tData:\t" ) );
-    textptr.Append( dateString );
-    _LIT(KTime,"%-B%:0%J%:1%T%:2%S%:3%+B");
-    time.FormatL(dateString,KTime);
-    textptr.Append(_L( "\r\n\t\tTime:\t" ) );
-    textptr.Append( dateString );
-    textptr.Append(_L( "\r\n" ) );
-    textptr.Append(_L( "\r\n" ) );
-    WriteLogL(textptr , fs);
-    CleanupStack::PopAndDestroy(text);
-    CleanupStack::PopAndDestroy(); //fs
-    }
-#endif
-
-// ================= MEMBER FUNCTIONS =======================
-
-
-// ---------------------------------------------------------
-// CStringResourceReader::CStringResourceReader
-// ---------------------------------------------------------
-//
-CStringResourceReader::CStringResourceReader
-    ( RFs& aFs, const TDesC& aRscFileWithPathAndDrive )
-:   CBase(), iFs( aFs ), iInitialized( EFalse )
-    {
-#ifdef _DRM_TESTING
-	TRAPD(r,CreateLogL());   
-	TRAP(r,WriteL(_L8("CStringResourceReader")));
-#endif 
-    iRscFileName.Copy( aRscFileWithPathAndDrive );
-    }
-
-// ---------------------------------------------------------
-// CStringResourceReader::~CStringResourceReader
-// ---------------------------------------------------------
-//
-CStringResourceReader::~CStringResourceReader()
-    {
-    iResourceFile.Close();
-#ifdef _DRM_TESTING
-	TRAPD(r,WriteL(_L8("~CStringResourceReader")));
-#endif 
-    }
-
-// ---------------------------------------------------------
-// CStringResourceReader::AllocReadResourceL
-// ---------------------------------------------------------
-//
-HBufC* CStringResourceReader::AllocReadResourceL( TInt aResId )
-    {
-#ifdef _DRM_TESTING
-	TRAPD(r,WriteL(_L8("AllocReadResourceL"),aResId));
-#endif 
-
-    InitializeL();
-
-#ifdef _DRM_TESTING
-	TRAP(r,WriteL(_L8("AllocReadResourceL-InitializeL")));
-#endif 
-
-    HBufC8* buf8 = iResourceFile.AllocReadLC( aResId );
-
-#ifdef _DRM_TESTING
-	TRAP(r,WriteL(_L8("AllocReadResourceL-iResourceFile.AllocReadLC")));
-#endif     
-    
-#ifdef _UNICODE
-    const TPtrC buf( (const TUint16*)buf8->Ptr(), buf8->Size()/2 );
-#else
-    const TPtrC buf( buf8->Ptr(), buf8->Size() );
-#endif
-    HBufC* retBuf = buf.AllocL();
-    CleanupStack::PopAndDestroy( buf8 );
-
-#ifdef _DRM_TESTING
-	TRAP(r,WriteL(_L8("AllocReadResourceL-End")));
-#endif 
-    return retBuf;
-    }
-
-// ---------------------------------------------------------
-// CStringResourceReader::InitializeL
-// ---------------------------------------------------------
-//
-void CStringResourceReader::InitializeL()
-    {
-#ifdef _DRM_TESTING
-	TRAPD(r,WriteL(_L8("InitializeL")));
-#endif 
-    if ( !iInitialized )
-        {
-        TFileName resourceFileName( iRscFileName );
-#ifdef _DRM_TESTING
-	TRAP(r,WriteL(_L8("InitializeL-NearestLanguageFile")));
-#endif 
-
-#ifdef _DRM_TESTING
-	TRAP(r,WriteL(resourceFileName));
-#endif 
-        BaflUtils::NearestLanguageFile( iFs, resourceFileName );
-#ifdef _DRM_TESTING
-	TRAP(r,WriteL(_L8("InitializeL-NearestLanguageFile-End")));
-#endif 
-
-        iResourceFile.OpenL( iFs, resourceFileName );
-#ifdef _DRM_TESTING
-	TRAP(r,WriteL(_L8("InitializeL-OpenL-End")));
-#endif 
-
-        iResourceFile.ConfirmSignatureL( iResourceFile.SignatureL() );
-#ifdef _DRM_TESTING
-	TRAP(r,WriteL(_L8("InitializeL-ConfirmSignatureL-End")));
-#endif 
-        iInitialized = ETrue;
-        }
-#ifdef _DRM_TESTING
-	TRAP(r,WriteL(_L8("InitializeL-End")));
-#endif 
-    }
-
-// End of file.