diff -r 79d62d1d7957 -r 493788a4a8a4 omadrm/drmplugins/drmrohandler/src/CRoHandler.cpp --- a/omadrm/drmplugins/drmrohandler/src/CRoHandler.cpp Tue Feb 02 00:21:44 2010 +0200 +++ b/omadrm/drmplugins/drmrohandler/src/CRoHandler.cpp Fri Apr 16 15:14:55 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2004-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" @@ -18,19 +18,19 @@ // INCLUDE FILES #include // for CRichText -#include // for CDrmMessageParser -#include // for CDRMRights +#include // for CDrmMessageParser +#include // for CDRMRights #include // for TImplementationProxy #include // for CPushHandlerBase #include // for CPluginKiller #include // for CPushMessage -#include // for CRoapEng -#include -#include +#include // for CRoapEng +#include +#include #include // link against centralrepository.lib #include #include -#include +#include #ifdef RD_MULTIPLE_DRIVE #include @@ -39,15 +39,14 @@ #include // TUriParser16 #include // KDC_MTM_RESOURCE_DIR #include // UriUtils and so on -#include // for R_PUSHMISC_UNK_SENDER -#include // for R_QTN_DRM_MGR_INB_TITLE +#include // for R_QTN_DRM_MGR_INB_TITLE #include // Disk space checking -#include "crohandler.h" -#include "romtmcli.h" // for CRightsObjectMtmClient -#include "roapsyncwrapper.h" +#include "CRoHandler.h" +#include "RoMtmCli.h" // for CRightsObjectMtmClient +#include "RoapSyncWrapper.h" -#include "stringresourcereader.h" +#include "StringResourceReader.h" #include "rohandlerdmgrwrapper.h" #include "rohandlerinternalcrkeys.h" @@ -115,6 +114,8 @@ _LIT( KRoAcquisitionPrefix, "ROA:" ); _LIT( KTriggerPrefix, "TRI:" ); +_LIT( KEmpty, " " ); + // MODULE DATA STRUCTURES // Helper class for deleting file with given filename on cleanupstack @@ -715,6 +716,7 @@ HBufC16 *number( NULL ); HBufC16 *messageContent( NULL ); HBufC16* buffer( NULL ); + _LIT( KMarker, "\x00" ); TInt ret( 0 ); if ( iMessageBodyPtr.Size() == 0 ) @@ -771,12 +773,14 @@ TPtr ptr( number->Des() ); ptr.AppendNum( localId, EDecimal ); - messageContent = HBufC16::NewL( ptr.Length() + uri16.Length() + 4 ); + messageContent = HBufC16::NewL( ptr.Length() + uri16.Length() + 5 ); TPtr ptrToMz( messageContent->Des() ); - ptrToMz.Append( _L( "1 " ) ); + ptrToMz.Append( _L( "1" ) ); + ptrToMz.Append( KMarker ); ptrToMz.Append( ptr ); // add localID - ptrToMz.Append( _L( " " ) ); // add space + ptrToMz.Append( KMarker ); ptrToMz.Append( uri16 ); //add uri16 + ptrToMz.Append( KMarker ); CleanupStack::PopAndDestroy( number ); CleanupStack::PopAndDestroy( buffer ); @@ -1216,28 +1220,7 @@ // First line in Inbox: TMsvEntry::iDetails. if ( !flag || srvAddress.Length() == 0 ) { - // Read from resource. - -#ifndef RD_MULTIPLE_DRIVE - - TFileName resourceFile( KDriveZ ); - -#else //RD_MULTIPLE_DRIVE - - _LIT( KDriveRoot, "%c:" ); - TInt driveNumber( -1 ); - TChar driveLetter; - DriveInfo::GetDefaultDrive( DriveInfo::EDefaultRom, driveNumber ); - iFs.DriveToChar( driveNumber, driveLetter ); - - TFileName resourceFile; - resourceFile.Format( KDriveRoot, (TUint )driveLetter ); - -#endif - - resourceFile.Append( KDC_MTM_RESOURCE_DIR ); - resourceFile.Append( KPushMtmRes ); - ReadFromResourceLC( resourceFile, R_PUSHMISC_UNK_SENDER, result ); + result = KEmpty().AllocL(); } else {