browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpDownload.cpp
branchRCL_3
changeset 93 79859ed3eea9
parent 84 800203832575
child 94 919f36ff910f
--- a/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpDownload.cpp	Thu Aug 19 10:58:56 2010 +0300
+++ b/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpDownload.cpp	Tue Aug 31 16:17:46 2010 +0300
@@ -18,7 +18,8 @@
 
 
 // INCLUDE FILES
-#include    <browser_platform_variant.hrh>
+//#include <platform/mw/Browser_platform_variant.hrh>
+#include    <Browser_platform_variant.hrh>
 #include    "HeaderField.h"
 #include    "HttpDownloadManagerServerEngine.h"
 #include    "HttpClientApp.h"
@@ -28,13 +29,16 @@
 #include    "HttpDownloadMgrLogger.h"
 #include    "bautils.h"
 
-#include    <CommDbConnPref.h>
-#include    <Uri16.h>
-#include    <F32FILE.H>
-#include    <EscapeUtils.h>
+#include    <commdbconnpref.h>
+#include    <uri16.h>
+#include    <f32file.h>
+#include    <escapeutils.h>
 #include    <httpfiltercommonstringsext.h>
 #include    <tinternetdate.h>
-#include    <SysUtil.h>
+#include    <sysutil.h>
+
+// following line is temporary: AVKON dependency removal
+#undef BRDO_APP_GALLERY_SUPPORTED_FF
 
 #ifdef BRDO_APP_GALLERY_SUPPORTED_FF
 #include    <MGXFileManagerFactory.h>
@@ -46,13 +50,10 @@
 
 #include    <pathinfo.h>
 
-#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
-#include <DownloadPathHandler.h>
-#endif
 // EXTERNAL DATA STRUCTURES
 //extern  ?external_data;
 
-// EXTERNAL FUNCTION PROTOTYPES  
+// EXTERNAL FUNCTION PROTOTYPES
 //extern ?external_function( ?arg_type,?arg_type );
 
 // CONSTANTS
@@ -61,7 +62,7 @@
 const TInt   KUrlFixChar = '_';
 const TInt KMaxHeaderOfMultipart = 32000;
 const TInt KRespSizeForRecognition = 1024;  //for THttpProgressState EHttpContTypeRecognitionAvail
-const TInt KMinDataSizeToSend = (32*1024);  //for Browser Control to call NewDownloadL     
+const TInt KMinDataSizeToSend = (32*1024);  //for Browser Control to call NewDownloadL
 const TInt KErrCodHttpDownloadPaused = -20045;  //Error code set by the CodHandler if the download is paused by the client
 const TInt KHttp903LossOfService = 903; //Error code set by the CodHandler if connection is lost
 const TInt KHttp954LoaderError = 954; //Error code set by the CodHandler if Loader error is found
@@ -113,7 +114,7 @@
 // LOCAL CONSTANTS AND MACROS
 const TInt KDMHttpErrorBase = -25000;
 #define GLOBAL_HTTP_ERROR( err ) ( KDMHttpErrorBase - err )
-const TInt  KErrMultipeObjectDownloadFailed = -20046;  
+const TInt  KErrMultipeObjectDownloadFailed = -20046;
 
 // MODULE DATA STRUCTURES
 //enum ?declaration
@@ -205,16 +206,16 @@
             TRAPD(err, PauseL() );
 
             --iDontFireEvent;
-            
+
             User::LeaveIfError( err );
             }
         }
 
     if( !iStorage->CheckContentFileIntegrityL() )
         {
-        if (iStorage->ProgressiveDownload() && 
-             iStorage->Length() == iStorage->DownloadedSize() ) 
-            // If it was a progressive download 
+        if (iStorage->ProgressiveDownload() &&
+             iStorage->Length() == iStorage->DownloadedSize() )
+            // If it was a progressive download
             // and downloaded size = content length,
             // it means that download was not properly closed
             // in the previous session
@@ -226,8 +227,8 @@
             OnError( KErrUnknown, EContentFileIntegrity );
             }
         }
-        
-        iMoveInProgress = EFalse;          
+
+        iMoveInProgress = EFalse;
     }
 
 // -----------------------------------------------------------------------------
@@ -244,7 +245,7 @@
     CHttpDownload* self = new( ELeave ) CHttpDownload( aClientApp,
                                                        aId,
                                                        aClAppInstance );
-    
+
     CleanupStack::PushL( self );
     self->ConstructL( aUrl );
     CleanupStack::Pop();
@@ -252,7 +253,7 @@
     return self;
     }
 
-    
+
 // Destructor
 CHttpDownload::~CHttpDownload()
     {
@@ -271,13 +272,13 @@
     delete iHttpProxyUsername;
     delete iHttpProxyPassword;
     delete iContentType;
-    delete iDDType;    
+    delete iDDType;
     delete iMediaType;
     delete iDlName;
 	delete iDispositionType;
     delete iFileMan;
-    
-    
+
+
     delete iHashedMsgBody;
     delete iDownloadInfo;
     delete iAttachmentFileName;
@@ -314,9 +315,9 @@
     delete iStorage;
     iStorage = NULL;
     delete iHeaderOfMultipart;
-    
+
     iMoveInProgress = EFalse;
-    
+
     CLOG_CLOSE;
     }
 
@@ -329,7 +330,7 @@
 EXPORT_C void CHttpDownload::Attach( CHttpClientAppInstance* aClientAppInstance )
     {
     LOGGER_ENTERFN( "CHttpDownload::Attach" );
-    
+
     __ASSERT_DEBUG( !iPDClAppInstance, DMPanic( KErrInUse) );
     iPDClAppInstance = aClientAppInstance;
     }
@@ -379,7 +380,7 @@
             {
             TriggerEvent( EHttpDlAlreadyRunning );
             }
-            
+
         // This is the place where client already set every continue
         // download attribute
         StoreDownloadInfoL();
@@ -421,7 +422,7 @@
                 ParseDownloadNameL();
                 StoreDownloadInfoL();
                 SetDownloadStatus( EHttpStarted );
-                
+
                if( !iConnHandler )
                     // assign download to the connhandler
                     // connection is surely up because it was created from client side
@@ -459,7 +460,7 @@
                 return;
                 }
             else if( iRestartAction == ERestartForced )
-                // doesn't matter what we have. 
+                // doesn't matter what we have.
                 // Download must be restarted from the very beginning
                 {
                 ForcedRestartL();
@@ -521,7 +522,7 @@
         iPDClAppInstance = NULL;
         }
     if( iClAppInstance )
-        {        
+        {
         if( !iConnHandler )
             {
             iConnHandler = iClAppInstance->ConnHandler();
@@ -533,7 +534,7 @@
     iDlStartedByClient = ETrue;
 
     SetDownloadStatus( EHttpStarted );
-    
+
     }
 
 // -----------------------------------------------------------------------------
@@ -635,7 +636,7 @@
                     SetDownloadStatus( EHttpProgNone, EHttpDlDeleting );
                     return;
                     }
-                }        
+                }
             }
         }
 
@@ -643,7 +644,7 @@
     // This won't be reenabled at the end of this function so
     // don't call delete only from outside of this class.
     ++iDontFireEvent;
-    
+
     TPath folder;
     TFileName file;
 
@@ -659,18 +660,18 @@
     //delete main info file
     err = iClientApp->Engine()->Fs().Delete( file );
     CLOG_WRITE_2( "Delete info file: %S, err : %d", &file, err );
-    
+
     //delete subinfo file
     CFileMan* fileMan = CFileMan::NewL(iClientApp->Engine()->Fs() );
     file.Format( _L("%S%d_*"), &folder, iId );
     fileMan->Delete( file );
     delete fileMan;
-        
+
 
     // to make sure the CHttpStorage releases the content file
     // and deletes it.
     CHttpStorage::TFileCloseOperation closeOp = CHttpStorage::EDeleteFile;
-    
+
     if( iStorage->DestFNameSet() && iDlState == EHttpDlMultipleMOCompleted )
         // Do NOT delete the file: if the destination filename was
         // set by the client and download completed.
@@ -678,7 +679,7 @@
 	        CLOG_WRITE("Keep file");
 	        closeOp = CHttpStorage::EKeepFile;
 	        }
-	        
+
 	if( iStorage->RFileSetByClient())
 	    {
 	    TBool pausable;
@@ -688,7 +689,7 @@
             CLOG_WRITE("Keep file");
 	        closeOp = CHttpStorage::EKeepFile;
             }
-		
+
 	    }
     if( iCodDlData )
 	    {
@@ -699,36 +700,36 @@
 		    	{
 		    	TPtrC fullName = ((*iCodDlData)[i])->DestFilename();
 		    	ClientApp()->Engine()->Fs().Delete( fullName );
-		    	}	
+		    	}
 		    }
-		// For User Cancel to Cancel Multiple download, Current and Queued DLs will be delete, completed ones will be kept    
+		// For User Cancel to Cancel Multiple download, Current and Queued DLs will be delete, completed ones will be kept
 		else if( EHttpDlInprogress == iDlState || EHttpDlPaused == iDlState || EHttpDlDeleting == iDlState)
 			{
 			for(TInt i = 1; i <= iCodDlData->Count(); i++)
 		    	{
-		    	if( EInProgress == ((*iCodDlData)[i])->State() || EFailed == ((*iCodDlData)[i])->State() )	// OnGoing and Queued will be deleted	  
+		    	if( EInProgress == ((*iCodDlData)[i])->State() || EFailed == ((*iCodDlData)[i])->State() )	// OnGoing and Queued will be deleted
 			    	{
 			    	TPtrC fullName = ((*iCodDlData)[i])->DestFilename();
 			    	if(fullName.Length())
 			    	    {
-			    	    ClientApp()->Engine()->Fs().Delete( fullName );	    
+			    	    ClientApp()->Engine()->Fs().Delete( fullName );
 			    	    }
-			    	}  
-		    	//else if( ESucceeded == ((*iCodDlData)[i])->State() ) 
+			    	}
+		    	//else if( ESucceeded == ((*iCodDlData)[i])->State() )
 		    	// Completed ones will be kept and moved to Gallery
 		    	else if( ESucceeded == ((*iCodDlData)[i])->State() )
 			    	{
 			    	MoveInDelete(i);
 			    	}
-		    	}	
-			} 	
+		    	}
+			}
 	    }
     else
     	{
     	iStorage->CloseDestinationFile( closeOp );
     	}
     // when delete there's no store -> no leave
-    //  aClAppInstance->ClientApp()->UnregisterDownload( this ); 
+    //  aClAppInstance->ClientApp()->UnregisterDownload( this );
     }
 
 
@@ -741,12 +742,12 @@
 EXPORT_C void CHttpDownload::DeleteInfoFile( CHttpClientAppInstance* aClAppInstance )
     {
     CLOG_WRITE( "DeleteInfoFile()" );
-    
+
     // This should be called only after the completion of download
-	if( ! (EHttpDlMultipleMOCompleted == iDlState && 
-    		( 
+	if( ! (EHttpDlMultipleMOCompleted == iDlState &&
+    		(
     		EHttpProgContentFileMoved == iProgState ||
-    		EHttpProgContentFileMovedAndDestFNChanged == iProgState 
+    		EHttpProgContentFileMovedAndDestFNChanged == iProgState
     		)
     	))
 		{
@@ -757,7 +758,7 @@
     // This won't be reenabled at the end of this function so
     // don't call delete only from outside of this class.
     ++iDontFireEvent;
-    
+
     TPath folder;
     TFileName file;
 
@@ -771,19 +772,19 @@
     iClientApp->Engine()->CODDownloadInfoFolder( iClientApp, folder );
     file.Format( _L("%S%d"), &folder, iId );
     CLOG_WRITE_1( "Delete info file: %S", &file );
-    iClientApp->Engine()->Fs().Delete( file );    
-    
+    iClientApp->Engine()->Fs().Delete( file );
+
     //delete subinfo file
     CFileMan* fileMan = CFileMan::NewL(iClientApp->Engine()->Fs() );
     file.Format( _L("%S%d_*"), &folder, iId );
     fileMan->Delete( file );
     delete fileMan;
-    
+
 
     // to make sure the CHttpStorage releases the content file
     // and deletes it.
     CHttpStorage::TFileCloseOperation closeOp = CHttpStorage::EDeleteFile;
-    
+
     if( iStorage->DestFNameSet() && iDlState == EHttpDlMultipleMOCompleted )
         // Do NOT delete the file: if the destination filename was
         // set by the client and download completed.
@@ -791,11 +792,11 @@
         CLOG_WRITE("Keep file");
         closeOp = CHttpStorage::EKeepFile;
         }
-        
+
     iStorage->CloseDestinationFile( closeOp );
 
-    // when delete there's no store -> no leave	
-    aClAppInstance->ClientApp()->UnregisterDownload( this ); 
+    // when delete there's no store -> no leave
+    aClAppInstance->ClientApp()->UnregisterDownload( this );
     }
 
 
@@ -808,9 +809,9 @@
 EXPORT_C void CHttpDownload::MoveL()
     {
     LOGGER_ENTERFN( "MoveL" );
-    
-    
-    if(iMoveInProgress) 
+
+
+    if(iMoveInProgress)
     {
     	CLOG_WRITE(" return MoveL  ");
     	return;
@@ -832,18 +833,18 @@
         {
         User::Leave( KErrInUse );
         }
-        
+
         //File is already moved. Ignore the move
     if( iProgState == EHttpProgContentFileMovedAndDestFNChanged ||
-    
+
       	iProgState ==  EHttpProgContentFileMoved )
         {
         return;
         }
-        
+
     __ASSERT_DEBUG( !IsActive(), DMPanic( KErrInUse ) );
     //__ASSERT_DEBUG( !iFileMan, DMPanic( KErrInUse ) );
-    
+
     if(_OMADLOTA2_MULTI_DOWNLOAD)
         {
 		iMOMoved = 1;
@@ -856,7 +857,7 @@
 	RFs &rFs = iClientApp->Engine()->Fs();
 	if(!iFileMan)
 		{
-		iFileMan = CFileMan::NewL(rFs);	
+		iFileMan = CFileMan::NewL(rFs);
 		}
 
     CLOG_WRITE_1( "Src: %S", iStorage->LocalFilename() );
@@ -874,40 +875,40 @@
         CreateIndexedNameL(uniqueName , fileNamePtr , index);
         if( !BaflUtils::FileExists( rFs , *uniqueName ) )
         //Check if file name exist in Destination path
-        //Generate Unique name if exist 
+        //Generate Unique name if exist
             {
             bFound =ETrue;
             break;
             }
         iDlNameChanged = ETrue;
-            
+
         }while( !bFound );
-    CleanupStack::PopAndDestroy( fileName );           
+    CleanupStack::PopAndDestroy( fileName );
 
   	if( iDlNameChanged )
   	    {
   	    HBufC16* destFileName ;
-  	    destFileName = iStorage->DestFilename();           
+  	    destFileName = iStorage->DestFilename();
   	    TPtr destFileNamePtr = destFileName->Des();
-  	    destFileNamePtr.Replace(0, destFileNamePtr.Length() , *uniqueName);    
+  	    destFileNamePtr.Replace(0, destFileNamePtr.Length() , *uniqueName);
   	    TInt lastSlashPos = destFileNamePtr.LocateReverse( '\\' );
   	    TPtr dlName = destFileNamePtr.MidTPtr(lastSlashPos +1 );
         TInt dotPos = iDlName->LocateReverse( '.' );
         if( dotPos == KErrNotFound )
             {
-            //Remove Extension from dlName as it was not present in old iDlName 
+            //Remove Extension from dlName as it was not present in old iDlName
             dotPos = dlName.LocateReverse( '.' );
             if(dotPos != KErrNotFound )
                 {
                 dlName.Copy( dlName.Left(dotPos));
-                }            
+                }
             }
   	    //download name has changed
   	    ReallocateStringL( iDlName, dlName, KDownloadNameMaxSize );
-  	    }      
-  	    
-  	TInt err =iFileMan->Move( *iStorage->LocalFilename(), 
-                                        *iStorage->DestFilename(), 
+  	    }
+
+  	TInt err =iFileMan->Move( *iStorage->LocalFilename(),
+                                        *iStorage->DestFilename(),
                                         CFileMan::EOverWrite,
                                         iStatus );
     if(err != KErrNone)
@@ -915,8 +916,8 @@
     	iMoveInProgress = EFalse;
     	CLOG_WRITE("setting iMoveInProgress false when move fails");
     	}
-    	
-    User::LeaveIfError( err ); 
+
+    User::LeaveIfError( err );
     // waiting for move to complete
     SetActive();
     SetDownloadStatus( EHttpProgMovingContentFile, iDlState );
@@ -928,7 +929,7 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-EXPORT_C void CHttpDownload::GetIntAttributeL( THttpDownloadAttrib aAttribute, 
+EXPORT_C void CHttpDownload::GetIntAttributeL( THttpDownloadAttrib aAttribute,
 							                   TInt32& aValue )
     {
     LOGGER_ENTERFN( "GetIntAttributeL" );
@@ -977,7 +978,7 @@
             {
             if ( iCodDownload )
                 {
-                aValue = iMoLength;    
+                aValue = iMoLength;
                 }
             else
                 {
@@ -990,7 +991,7 @@
             {
             if( iCodDownload )
                 {
-                aValue = iStorage->MoDownloadedSize();    
+                aValue = iStorage->MoDownloadedSize();
                 }
             else
                 {
@@ -998,7 +999,7 @@
                 }
             }
             break;
-            
+
         case EDlAttrLength:
             {
             aValue = iStorage->Length();
@@ -1079,11 +1080,11 @@
             break;
 
         case EDlAttrFotaPckgId:
-            {     
+            {
             aValue = iFotaPckgId;
             }
             break;
-            
+
         case EDlAttrNumMediaObjects:
             {
             aValue = 1;
@@ -1103,13 +1104,7 @@
             aValue = iActivePlayedDownload;
             }
             break;
-            
-        case EDlAttrDestRemovable:
-            {
-            aValue = iStorage->RemovableDest();
-            }
-            break;            
-            
+
         default:
             {
             CLOG_WRITE_1( "Unknown int attrib: %d", aAttribute );
@@ -1121,23 +1116,23 @@
             }
             break;
         }
-    
+
     iNoRealError = EFalse;
     }
-    
+
 // -----------------------------------------------------------------------------
 // CHttpDownload::GetIntAttributeL
 // ?implementation_description
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-EXPORT_C void CHttpDownload::GetIntAttributeL( THttpDownloadAttrib aAttribute, 
+EXPORT_C void CHttpDownload::GetIntAttributeL( THttpDownloadAttrib aAttribute,
 							                   TInt32& aMoIndex,
 							                   TInt32& aValue )
     {
     LOGGER_ENTERFN( "GetIntAttributeL" );
     CLOG_WRITE_1( "Attr(%d)", aAttribute );
-    
+
     if (!iCodDlData)
     	{
     	aValue = 0;
@@ -1147,7 +1142,7 @@
     	{
     	User::Leave( KErrArgument );
     	}
-    
+
     CMediaDataBase* mediaData = (*iCodDlData)[aMoIndex];
     iNoRealError = ETrue;
 
@@ -1170,11 +1165,11 @@
             	if ((moData->State() == ESucceeded) || (moData->State() == EInProgress))
             		dlSize -= moData->DownloadedSize();
             	}
-            
+
             aValue = dlSize;
             }
             break;
-            
+
         case EDlAttrLength:
 	        {
 	        aValue = iStorage->Length();
@@ -1204,12 +1199,6 @@
             aValue = mediaData->Method();
             }
             break;
-            
-        case EDlAttrDestRemovable:
-            {
-            aValue = mediaData->DesRemovable();
-            }
-            break;
 
         default:
             {
@@ -1222,7 +1211,7 @@
             }
             break;
         }
-    
+
     iNoRealError = EFalse;
     }
 
@@ -1232,7 +1221,7 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-EXPORT_C void CHttpDownload::GetBoolAttributeL( THttpDownloadAttrib aAttribute, 
+EXPORT_C void CHttpDownload::GetBoolAttributeL( THttpDownloadAttrib aAttribute,
 								                TBool& aValue )
     {
     LOGGER_ENTERFN( "GetBoolAttributeL" );
@@ -1300,17 +1289,17 @@
             {
             aValue = iCodDownload;
             }
-            break;            
-   
+            break;
+
         case EDlAttrProgressive:
             {
             aValue = iStorage->ProgressiveMode();
             }
             break;
-   
+
         case EDlAttrDestRemovable:
             {
-            aValue = (KDriveAttRemovable == iStorage->RemovableDest()) ? ETrue : EFalse ;
+            aValue = iStorage->RemovableDest();
             }
             break;
 
@@ -1331,7 +1320,7 @@
             }
             break;
         }
-    
+
     iNoRealError = EFalse;
     }
 
@@ -1341,13 +1330,13 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-EXPORT_C void CHttpDownload::GetBoolAttributeL( THttpDownloadAttrib aAttribute, 
+EXPORT_C void CHttpDownload::GetBoolAttributeL( THttpDownloadAttrib aAttribute,
 								                TInt32& aMoIndex,
 								                TBool& aValue )
     {
     LOGGER_ENTERFN( "GetBoolAttributeL" );
     CLOG_WRITE_1( "Attr(%d): %d", aAttribute );
-    
+
     if (!iCodDlData)
     	{
     	aValue = 0;
@@ -1357,7 +1346,7 @@
     	{
     	User::Leave( KErrArgument );
     	}
-    	
+
     CMediaDataBase* mediaData = (*iCodDlData)[aMoIndex];
     iNoRealError = ETrue;
 
@@ -1380,10 +1369,10 @@
             aValue = mediaData->ProgressiveDownload();
             }
             break;
-   
+
         case EDlAttrDestRemovable:
             {
-            aValue = (KDriveAttRemovable == mediaData->DesRemovable()) ? ETrue : EFalse ;
+            aValue = mediaData->DesRemovable();
             }
             break;
 
@@ -1399,7 +1388,7 @@
             }
             break;
         }
-    
+
     iNoRealError = EFalse;
     }
 
@@ -1409,7 +1398,7 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-EXPORT_C HBufC* CHttpDownload::GetStringAttributeL( THttpDownloadAttrib aAttribute, 
+EXPORT_C HBufC* CHttpDownload::GetStringAttributeL( THttpDownloadAttrib aAttribute,
                                                     TBool& aDelete )
     {
     LOGGER_ENTERFN( "GetStringAttributeL" );
@@ -1451,7 +1440,7 @@
             {
             attr8 = iDDType;
             }
-            break;            
+            break;
 
         case EDlAttrRealm:
             {
@@ -1510,7 +1499,7 @@
             attr = iStorage->LocalFilename();
             }
             break;
-            
+
         case EDlAttrDdFileName:
         	{
         	attr = iStorage->DdFileName();
@@ -1620,7 +1609,7 @@
                 }
             }
             break;
-        
+
         case EDlAttrAlbumName:
             {
             if (iCodDlData && (iCodDlData->Name().Compare(KNullDesC)))
@@ -1634,7 +1623,7 @@
                 }
             }
             break;
-            
+
         default:
             {
                 {
@@ -1685,7 +1674,7 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-EXPORT_C HBufC* CHttpDownload::GetStringAttributeL( THttpDownloadAttrib aAttribute, 
+EXPORT_C HBufC* CHttpDownload::GetStringAttributeL( THttpDownloadAttrib aAttribute,
                                                     TInt32& aMoIndex,
                                                     TBool& aDelete )
     {
@@ -1700,7 +1689,7 @@
     	{
     	User::Leave( KErrArgument );
     	}
-    	
+
     CMediaDataBase* mediaData = (*iCodDlData)[aMoIndex];
     iNoRealError = ETrue;
     HBufC* attr = NULL;
@@ -1802,7 +1791,7 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-EXPORT_C HBufC8* CHttpDownload::GetString8AttributeL( THttpDownloadAttrib aAttribute, 
+EXPORT_C HBufC8* CHttpDownload::GetString8AttributeL( THttpDownloadAttrib aAttribute,
                                                       TBool& aDelete )
     {
     LOGGER_ENTERFN( "GetString8AttributeL" );
@@ -1862,7 +1851,7 @@
             {
             attr = iDDType;
             }
-            break;            
+            break;
 
         case EDlAttrRequestHeaderAddon:
             {
@@ -1986,24 +1975,24 @@
             break;
 
         case EDlAttrHashedMsgBody:
-            { 
+            {
             attr = iHashedMsgBody;
             }
             break;
-   
+
         case EDlAttrMediaType:
             {
             attr = iMediaType;
             }
             break;
-            
+
         case EDlAttrMediaTypeBoundary:
             {
             attr = GetParamFromMediaTypeL( KBoundary() ).AllocL();
             aDelete = ETrue;
             }
             break;
-            
+
         default:
             {
                 {
@@ -2053,7 +2042,7 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-EXPORT_C HBufC8* CHttpDownload::GetString8AttributeL( THttpDownloadAttrib aAttribute, 
+EXPORT_C HBufC8* CHttpDownload::GetString8AttributeL( THttpDownloadAttrib aAttribute,
                                                       TInt32& aMoIndex,
                                                       TBool& aDelete )
     {
@@ -2068,7 +2057,7 @@
     	{
     	User::Leave( KErrArgument );
     	}
-    	
+
     CMediaDataBase* mediaData = (*iCodDlData)[aMoIndex];
     iNoRealError = ETrue;
     HBufC8* attr = NULL;
@@ -2098,7 +2087,7 @@
             aDelete = ETrue;
             }
             break;
-            
+
         default:
             {
                 {
@@ -2151,7 +2140,7 @@
 EXPORT_C RFile* CHttpDownload::GetFileHandleAttributeL()
     {
     LOGGER_ENTERFN( "GetFileHandleAttributeL" );
-    
+
     if( !iStorage->File() )
         // destination file is not opened
         {
@@ -2167,7 +2156,7 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-EXPORT_C void CHttpDownload::SetIntAttributeL( THttpDownloadAttrib aAttribute, 
+EXPORT_C void CHttpDownload::SetIntAttributeL( THttpDownloadAttrib aAttribute,
                                                const TInt32 aValue )
     {
     LOGGER_ENTERFN( "SetIntAttributeL" );
@@ -2187,9 +2176,9 @@
         case EDlAttrAction:
         	{
             TBool PdSupported(EFalse);
-            
+
             iAction = (THttpDownloadMgrAction)aValue;
-            
+
             if(iClAppInstance)
             	{
             	TRAP_IGNORE(iClAppInstance->GetBoolAttributeL(EDlMgrProgressiveDownload, PdSupported));
@@ -2235,14 +2224,14 @@
 
         case EDlAttrMultipleMOLength:
             {
-            iMoLength = aValue;            
-            }
-            break;
-            
+            iMoLength = aValue;
+            }
+            break;
+
         case EDlAttrDownloadedSize:
             {
             if( (iCodDownload || iContinueDownload) && iDlState == EHttpDlInprogress )
-                {            
+                {
                 iStorage->SetDownloadedSize( aValue );
                 // Calculate downloaded size of current media object from
                 // album downloaded size.
@@ -2250,7 +2239,7 @@
                 if( iCodDlData )
                     {
                     for (TInt index = 0; index < iCodDlData->Count() ; ++index)
-                    	{               	
+                    	{
                     	if( iActiveDownload - 1 == index )
                     	    {
                     	    //the size of active download has already been taken into account
@@ -2260,8 +2249,8 @@
                     	if ((moData->State() == ESucceeded) || (moData->State() == EInProgress))
                     		dlSize += moData->DownloadedSize();
                     	}
-                    iStorage->SetMoDownloadedSize(dlSize);                    	                
-                    }                
+                    iStorage->SetMoDownloadedSize(dlSize);
+                    }
                 if( iStorage->Length() != KDefaultContentLength &&
                     iStorage->DownloadedSize() > iStorage->Length() )
                     // we don't know actually how many bytes will come down.
@@ -2269,10 +2258,10 @@
                     CLOG_WRITE( "Length modified" );
                     iStorage->SetLength( KDefaultContentLength );
                     StoreDownloadInfoL();
-                    }                             
+                    }
                 TriggerEvent( EHttpDlInprogress, EHttpProgResponseBodyReceived );
                 }
-                
+
             store = EFalse;
             }
             break;
@@ -2282,8 +2271,8 @@
             if(!aValue)
                 DownloadSucceededL();
             else
-                iMoDownloadCompleted = ETrue;//Download of MO has been Completed so change State ,But PD is on           
-                                         //So MOVE will be issued by PD Client 
+                iMoDownloadCompleted = ETrue;//Download of MO has been Completed so change State ,But PD is on
+                                         //So MOVE will be issued by PD Client
 
             store = EFalse;
             }
@@ -2302,7 +2291,7 @@
             {
             }
             break;
-            
+
         case EDlAttrMethod:
             {
             if( iContinueDownload && iDlState == EHttpDlMultipleMOStarted &&
@@ -2320,7 +2309,7 @@
             break;
 
         case EDlAttrFotaPckgId:
-            {     
+            {
             iFotaPckgId = aValue;
             store = EFalse;
             }
@@ -2328,34 +2317,17 @@
         case EDlAttrActiveDownload:
             {
             iActiveDownload = aValue;
-            
+
             // Active MO changed. Notify clients.
            	TriggerEvent( EHttpDlCreated, EHttpProgNone );
             }
             break;
-            
+
         case EDlAttrActivePlayedDownload:
             {
             iActivePlayedDownload = aValue;
             }
-            
-            break;
-            
-        case EDlAttrDestRemovable:
-            {
-            if( iCodDownload )
-                {
-                iStorage->SetRemovableDest( aValue );
-
-                if (iCodDlData)                
-                    {
-                    // Update for Active media object.
-                    TInt active = iActiveDownload;
-                    CMediaDataBase* mediaData = (*iCodDlData)[active];
-                    mediaData->SetDesRemovable( aValue );
-                    }
-                }
-            }
+
             break;
         default:
             {
@@ -2371,7 +2343,7 @@
     UpdatePausable();
 
     iNoRealError = EFalse;
-    
+
     if( store )
         {
         StoreDownloadInfoL();
@@ -2384,7 +2356,7 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-EXPORT_C void CHttpDownload::SetBoolAttributeL( THttpDownloadAttrib aAttribute, 
+EXPORT_C void CHttpDownload::SetBoolAttributeL( THttpDownloadAttrib aAttribute,
 								                const TBool aValue )
     {
     LOGGER_ENTERFN( "SetBoolAttributeL" );
@@ -2423,7 +2395,7 @@
                 {
                 User::Leave( KErrInUse );
                 }
-                
+
             store = EFalse;
             }
             break;
@@ -2445,11 +2417,11 @@
             SetCodFlag( aValue );
             }
             break;
-            
+
         case EDlAttrProgressive:
             {
             TBool PdSupported(EFalse);
-            
+
             if(iClAppInstance)
             	{
             	TRAP_IGNORE(iClAppInstance->GetBoolAttributeL(EDlMgrProgressiveDownload, PdSupported));
@@ -2457,34 +2429,34 @@
 
             if(PdSupported)
                 {
-                iStorage->SetProgressiveMode( aValue );	
-                
+                iStorage->SetProgressiveMode( aValue );
+
                 if(!aValue)
                     {
                     iActivePlayedDownload = 0;
                     }
 
-                if (iCodDlData)                
+                if (iCodDlData)
                 	{
                 	// Update for Active media object.
 	                TInt active = iActiveDownload;
 	                CMediaDataBase* mediaData = (*iCodDlData)[active];
 	                mediaData->SetProgressiveDownload( aValue );
                 	}
-                	
+
                 if( iProgState != EHttpProgMovingContentFile )
                     {
                     if (aValue && iDlState == EHttpDlMultipleMOCompleted )
                         {
-                        /* 
+                        /*
                         if the file size is small, by the time the music player is launched, DMgr already triggered EHttpDlCompleted.
                         So if the download state is EHttpDlMultipleMOCompleted, we need to trigger EHttpDlCompleted so that music player understands download is completed already
                         This is needed to ensure backward compatibility
                         */
                         TriggerEvent( EHttpDlCompleted, EHttpDlProgProgressive);
-                        }   
+                        }
                     else
-                        {    
+                        {
                         TriggerEvent( iDlState, aValue ? EHttpDlProgProgressive : EHttpDlProgNonProgressive);
                         }
                     }
@@ -2495,13 +2467,13 @@
 				}
             }
             break;
-            
+
         case EDlAttrCodDescriptorAccepted:
             {
             TriggerEvent( EHttpDlInprogress, EHttpProgCodDescriptorAccepted );
             }
             break;
-            
+
         case EDlAttrCodLoadEnd:
             {
             SetDownloadStatus(EHttpProgCodLoadEnd,EHttpDlInprogress);
@@ -2514,21 +2486,19 @@
             TriggerEvent( EHttpDlInprogress, EHttpProgCodPdAvailable );
             }
             break;
-            
+
         case EDlAttrDestRemovable:
             {
             if( iCodDownload )
                 {
-                TInt32 removableDestStatus = (aValue) ? KDriveAttRemovable : KDriveAttLocal ;
-                
-                iStorage->SetRemovableDest( removableDestStatus );
-
-                if (iCodDlData)                
+                iStorage->SetRemovableDest( aValue );
+
+                if (iCodDlData)
                 	{
 	                // Update for Active media object.
 	                TInt active = iActiveDownload;
 	                CMediaDataBase* mediaData = (*iCodDlData)[active];
-	                mediaData->SetDesRemovable( removableDestStatus );
+	                mediaData->SetDesRemovable( aValue );
                 	}
                 }
             }
@@ -2544,18 +2514,18 @@
         case EDlAttrCodPausable:
             {
             iPausable = aValue;
-			
+
 			// Update for Active media object.
             TInt active = iActiveDownload;
             CMediaDataBase* mediaData = (*iCodDlData)[active];
             mediaData->SetPausable( aValue );
-			
+
             // inform client about change
             TriggerEvent( iPausable ? EHttpDlPausable : EHttpDlNonPausable );
 			}
             break;
-            
-                    
+
+
         default:
 #ifdef __WINS__
             DMPanic( KErrArgument );
@@ -2566,7 +2536,7 @@
         }
 
     UpdatePausable();
-    
+
     iNoRealError = EFalse;
 
     if( store )
@@ -2598,11 +2568,11 @@
         case EDlAttrDestFilename:
             {
             TBool updateFName = EFalse;
-            
+
             if( iDlState == EHttpDlMultipleMOStarted ||
                 iDlState == EHttpDlMultipleMOCompleted ||
                 iCodDownload )
-                // cannot set this attribute while 
+                // cannot set this attribute while
                 // download is in progress
                 {
                 if( !aValue.Length() )
@@ -2622,7 +2592,7 @@
                         }
                     else
                         {
-                        User::Leave( KErrArgument ); 
+                        User::Leave( KErrArgument );
                         }
                     }
                 else
@@ -2635,11 +2605,11 @@
                 {
                 User::Leave( KErrInUse );
                 }
-            
+
             if (updateFName)
             	{
                 iStorage->UpdateDestinationFilenameL( aValue, ETrue );
-                if (iCodDlData)                
+                if (iCodDlData)
                 	{
 	            	CMediaDataBase* mediaData = (*iCodDlData)[aMOIndex];
 	            	mediaData->SetDestFilenameL( aValue );
@@ -2649,15 +2619,15 @@
             break;
         }
     }
-    
-    
+
+
 // -----------------------------------------------------------------------------
 // CHttpDownload::SetStringAttributeL
 // ?implementation_description
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-EXPORT_C void CHttpDownload::SetStringAttributeL( THttpDownloadAttrib aAttribute, 
+EXPORT_C void CHttpDownload::SetStringAttributeL( THttpDownloadAttrib aAttribute,
 								                  const TDesC16& aValue )
     {
     LOGGER_ENTERFN( "SetStringAttributeL" );
@@ -2689,12 +2659,12 @@
                 CLOG_WRITE( "EDlAttrContentType updated" );
                 ReallocateStringL( iContentType, aValue, KMaxContentTypeLength );
                 TriggerEvent( EHttpDlInprogress, EHttpProgContentTypeChanged );
-                
+
                 // Update for Active media object.
                 HBufC8* type8 = HBufC8::NewLC( aValue.Length() );
                 type8->Des().Copy( aValue );
 
-                if (iCodDlData)                
+                if (iCodDlData)
                 	{
 	                TInt active = iActiveDownload;
 	                CMediaDataBase* mediaData = (*iCodDlData)[active];
@@ -2711,7 +2681,7 @@
                 {
                 ReallocateStringL( iHttpRealm, aValue, KMaxRealmLength );
                 }
-                
+
             store = EFalse;
             }
             break;
@@ -2757,11 +2727,11 @@
         case EDlAttrDestFilename:
             {
             TBool updateFName = EFalse;
-            
+
             if( iDlState == EHttpDlMultipleMOStarted ||
                 iDlState == EHttpDlMultipleMOCompleted ||
                 iCodDownload )
-                // cannot set this attribute while 
+                // cannot set this attribute while
                 // download is in progress
                 {
                 if( !aValue.Length() )
@@ -2781,7 +2751,7 @@
                         }
                     else
                         {
-                        User::Leave( KErrArgument ); 
+                        User::Leave( KErrArgument );
                         }
                     }
                 else
@@ -2794,12 +2764,12 @@
                 {
                 User::Leave( KErrInUse );
                 }
-            
+
             if (updateFName)
             	{
             	iStorage->UpdateDestinationFilenameL( aValue, ETrue );
-            	
-                if (iCodDlData)                
+
+                if (iCodDlData)
                 	{
                     TInt moIndex(0);
                     if( iActiveDownload != iActivePlayedDownload && iStorage->ProgressiveDownload() )
@@ -2810,7 +2780,7 @@
                     else
                         {
                         // Update for Active media object.
-                    	moIndex = iActiveDownload;                        
+                    	moIndex = iActiveDownload;
                         }
 	            	CMediaDataBase* mediaData = (*iCodDlData)[moIndex];
 	            	mediaData->SetDestFilenameL( aValue );
@@ -2860,7 +2830,7 @@
                 SetDownloadNameL( aValue );
 
                 if (iCodDlData)
-	                {                
+	                {
 	                // Update for Active media object.
 	            	TInt active = iActiveDownload;
 	            	CMediaDataBase* mediaData = (*iCodDlData)[active];
@@ -2928,7 +2898,7 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-EXPORT_C void CHttpDownload::SetStringAttributeL( THttpDownloadAttrib aAttribute, 
+EXPORT_C void CHttpDownload::SetStringAttributeL( THttpDownloadAttrib aAttribute,
 								                  const TDesC8& aValue )
     {
     LOGGER_ENTERFN( "SetStringAttributeL(8)" );
@@ -2962,9 +2932,9 @@
                 }
             else if (iDlState == EHttpDlMultipleMOCompleted )//Allow to change content type even if state is completed
                 {
-                ReallocateStringL( iContentType, aValue, KMaxContentTypeLength );                            
+                ReallocateStringL( iContentType, aValue, KMaxContentTypeLength );
                 //No need to trigger any event
-                }                
+                }
             }
             break;
 
@@ -3064,13 +3034,13 @@
             ReallocateStringL( iHashedMsgBody, aValue, KHashLength );
             }
             break;
-   
+
         case EDlAttrRedirectedPermanently:
             {
             RedirectedPermanentlyL( aValue );
-            
+
             if (iCodDlData)
-	            {                
+	            {
 	            // Update for Active media object.
 	            TInt active = iActiveDownload;
 	            CMediaDataBase* mediaData = (*iCodDlData)[active];
@@ -3079,13 +3049,13 @@
 	            }
             }
             break;
-            
+
         case EDlAttrRedirectedTemporary:
             {
             RedirectedTemporaryL( aValue );
-            
+
             if (iCodDlData)
-	            {                
+	            {
 	            // Update for Active media object.
 	            TInt active = iActiveDownload;
 	            CMediaDataBase* mediaData = (*iCodDlData)[active];
@@ -3093,7 +3063,7 @@
 	            }
             }
             break;
- 
+
         case EDlAttrContinueBody:
             {
             iNoRealError = EFalse;
@@ -3116,9 +3086,9 @@
 #endif
             break;
         }
-    
+
     UpdatePausable();
-    
+
     iNoRealError = EFalse;
 
     if( store )
@@ -3136,7 +3106,7 @@
 EXPORT_C void CHttpDownload::SetFileHandleAttributeL( RFile* aFile )
     {
     LOGGER_ENTERFN( "SetFileHandleAttributeL" );
-    
+
     iStorage->AdoptFileHandleL( aFile );
     }
 
@@ -3149,17 +3119,17 @@
 EXPORT_C void CHttpDownload::SetDownloadDataAttributeL( HBufC8* dlData )
 	{
     LOGGER_ENTERFN( "SetDownloadDataAttributeL" );
-    
+
     if (iCodDlData)
         {
-    	delete iCodDlData;	
+    	delete iCodDlData;
         iCodDlData = NULL;
         }
-    	
+
     iCodDlData = CDownloadDataServ::NewL(*dlData);
     TInt downloadedSize = 0 ;
     TBool activeDownloadChanged = EFalse;
-    
+
     iMoLength = 0 ;
     for ( TInt i = 1; i <= iCodDlData->Count() ; ++i )
         {
@@ -3176,7 +3146,7 @@
             activeDownloadChanged = ETrue;
             }
         }
-    iStorage->SetMoDownloadedSize( downloadedSize );                
+    iStorage->SetMoDownloadedSize( downloadedSize );
     }
 // -----------------------------------------------------------------------------
 // CHttpDownload::SetTrackDataAttributeL
@@ -3187,7 +3157,7 @@
 EXPORT_C void CHttpDownload::SetTrackDataAttributeL( TInt aIndex, HBufC8* dlData )
     {
     LOGGER_ENTERFN( "SetTrackDataAttributeL" );
-    
+
 	if (iCodDlData)
     	{
     	CMediaDataServ* updatedMediaData = CMediaDataServ::NewL(*dlData);
@@ -3203,7 +3173,7 @@
 	    mediaData->SetDownloadedSize( updatedMediaData->DownloadedSize() );
 	    mediaData->SetDestFilenameL( updatedMediaData->DestFilename() );
 	    mediaData->SetTempFilenameL( updatedMediaData->DestFilename() );
-	    	    
+
     	mediaData->ResetTypes();
     	for (TInt type = 0; type < updatedMediaData->TypesCount(); ++type)
         	mediaData->AddTypeL( updatedMediaData->Types().MdcaPoint(type) );
@@ -3236,10 +3206,10 @@
 	        	    iLastError = EGeneral;
 	           	    }
                 }
-            
-            //if the client pauses the download, Codhandler sets error code to KErrCodHttpDownloadPaused. In that case, no need to trigger EHttpDlFailed Event     
+
+            //if the client pauses the download, Codhandler sets error code to KErrCodHttpDownloadPaused. In that case, no need to trigger EHttpDlFailed Event
             if ( !( result == KErrCodHttpDownloadPaused || ( pausable && statusCode == KHttp903LossOfService ) || ( pausable && statusCode == KHttp954LoaderError ) ) )
-                {    
+                {
     	        TriggerEvent( EHttpDlFailed, EHttpProgNone );
                 }
             }
@@ -3276,8 +3246,8 @@
         iNoRealError = EFalse;
 
         return;
-        }    
-    
+        }
+
     if( iCodDlData && iCodDlData->Count() > 1 )
         {
         if( aDlError == KErrMultipeObjectDownloadFailed )
@@ -3287,17 +3257,17 @@
             SetDownloadStatus( EHttpProgNone,
                    EHttpDlMultipleMOFailed,
                    aDlError,
-                   aError );            
-            return;                       
-            } 
+                   aError );
+            return;
+            }
         else
             {
             SetDownloadStatus( EHttpProgNone,
                                EHttpDlPaused,
                                aDlError,
                                aError );
-            return;                                           
-            
+            return;
+
             }
         }
 
@@ -3310,8 +3280,8 @@
 
     //For COD Downloads, the error code may be set from COD handler
     //In that case if the download is paused just set the global and download error
-    
-    if( iCodDownload && iDlState == EHttpDlPaused )  
+
+    if( iCodDownload && iDlState == EHttpDlPaused )
         {
         iLastError = aDlError;
         iGlobalErrorId = aError;
@@ -3329,7 +3299,7 @@
         {
         closeOp = CHttpStorage::EReplaceFile;
         }
-        
+
     iStorage->CloseDestinationFile( closeOp );
     CLOG_WRITE_1( "OnError1 : iDlState : %d ", iDlState );
 
@@ -3349,18 +3319,18 @@
 
         if( aError == KErrHttpPartialResponseReceived )
             {
-            //Partial response has been received and connection has been disconnected. This error will be 
+            //Partial response has been received and connection has been disconnected. This error will be
             //propagated to the client only, if the HTTP:ENotifyOnDisconnect property is set with a value
             //HTTP::EEnableDisconnectNotification
-            
+
             //This error code was cancelling the pausable download. This error shud be ignored to keep the
             //paused download.
             //TSW Err ID : SXUU-77SRWL
-            
+
             SetDownloadStatus( EHttpProgNone,
                                EHttpDlPaused,
                                aDlError,
-                               aError );            
+                               aError );
 
             }
         else if( aDlError == EConnectionFailed && iPausable)
@@ -3370,7 +3340,7 @@
             SetDownloadStatus( EHttpProgNone,
                                EHttpDlPaused,
                                aDlError,
-                               aError );               
+                               aError );
             }
         else if ( aDlError == EMMCRemoved )
             {
@@ -3418,11 +3388,11 @@
         {
         iPDClAppInstance = NULL;
         }
-        
+
     return (iPDClAppInstance || iClAppInstance);
     }
-    
-    
+
+
 // -----------------------------------------------------------------------------
 // CHttpDownload::ClientApp
 // ?implementation_description
@@ -3509,9 +3479,9 @@
 void CHttpDownload::MediaRemoved( TUint aUid, TBool aDontCheckMediaUid )
     {
     LOGGER_ENTERFN( "MediaRemoved" );
-    CLOG_WRITE_3( "Uid: %d, dontCheck: %d, iNoMedia: %d", 
-                        aUid, 
-                        aDontCheckMediaUid, 
+    CLOG_WRITE_3( "Uid: %d, dontCheck: %d, iNoMedia: %d",
+                        aUid,
+                        aDontCheckMediaUid,
                         iNoMedia );
 
     if( iNoMedia )
@@ -3533,14 +3503,14 @@
     TRAP_IGNORE( InternalPauseL() );
 
     TriggerEvent( EHttpDlMediaRemoved );
-    
+
     if( iDlState == EHttpDlInprogress )
         // it's happened during the download process
         // in case of e.g completed download it's not error
         {
         OnError( KErrGeneral, EMMCRemoved );
         }
-    
+
     TRAP_IGNORE( StoreDownloadInfoL() );
     }
 
@@ -3563,7 +3533,7 @@
     iNoMedia = EFalse;
     TriggerEvent( EHttpDlMediaInserted );
     }
-    
+
 // -----------------------------------------------------------------------------
 // CHttpDownload::GetDestinationDriveID
 // ?implementation_description
@@ -3574,7 +3544,7 @@
     {
     return (TInt)iStorage->GetDestinationDriveId();
     }
-    
+
 // -----------------------------------------------------------------------------
 // CHttpDownload::SetClientInstance
 // ?implementation_description
@@ -3637,11 +3607,11 @@
 void CHttpDownload::SetDownloadNameL( const TDesC& aNewName )
     {
     CLOG_WRITE_1( "New download name: [%S]", &aNewName );
-    
+
     ReallocateStringL( iDlName, aNewName, KDownloadNameMaxSize );
-    
+
     FixDownloadNameL();
-    
+
     TriggerEvent( EHttpDlInprogress, EHttpProgDlNameChanged );
     }
 
@@ -3651,7 +3621,7 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-void CHttpDownload::MHFRunL( RHTTPTransaction /*aTransaction*/, 
+void CHttpDownload::MHFRunL( RHTTPTransaction /*aTransaction*/,
                              const THTTPEvent& aEvent )
     {
     switch ( aEvent.iStatus )
@@ -3660,7 +3630,7 @@
             {
             CLOG_WRITE( "Response header received" );
             ResponseHeaderReceivedL();
-            } 
+            }
             break;
 
         case THTTPEvent::EGotResponseBodyData:
@@ -3673,21 +3643,21 @@
             ResponseBodyReceivedL( buf );
 
             respBody->ReleaseData();
-            } 
+            }
             break;
 
         case THTTPEvent::EResponseComplete:
             {
             CLOG_WRITE( "Response complete" );
-            } 
+            }
             break;
 
         case THTTPEvent::ESucceeded:
             {
             CLOG_WRITE( "Transaction succeeded" );
-            
+
             DownloadSucceededL();
-            } 
+            }
             break;
 
         case THTTPEvent::EFailed:
@@ -3702,19 +3672,19 @@
                 iTransValid = EFalse;
                 }
             iDlStartedByClient = EFalse;
-            } 
+            }
             break;
 
         case THTTPEvent::ERedirectedPermanently:
             {
             RedirectedPermanentlyL( iTrans.Request().URI().UriDes() );
-            } 
+            }
             break;
 
         case THTTPEvent::ERedirectedTemporarily:
             {
             RedirectedTemporaryL( iTrans.Request().URI().UriDes() );
-            } 
+            }
             break;
 
         default:
@@ -3725,7 +3695,7 @@
                 {
                 User::Leave( aEvent.iStatus );
                 }
-            } 
+            }
             break;
         }
     }
@@ -3736,8 +3706,8 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-TInt CHttpDownload::MHFRunError( TInt aError, 
-                                 RHTTPTransaction /*aTransaction*/, 
+TInt CHttpDownload::MHFRunError( TInt aError,
+                                 RHTTPTransaction /*aTransaction*/,
                                  const THTTPEvent& /*aEvent*/ )
     {
     CLOG_WRITE_1( "MHFRunError: %d", aError );
@@ -3801,15 +3771,15 @@
                 else
                     {
                     RequestContentL();
-                    }                
+                    }
                 }
-                
+
             }
             break;
 
         case EHttpProgMovingContentFile:
             // Move completed
-            // State remains in completed 
+            // State remains in completed
             // and move result stored in error attribs
             {
             CLOG_WRITE_1( "Move result: %d", iStatus.Int() );
@@ -3817,52 +3787,42 @@
 			// So, the download status should be changed after that
 			//but we again send the progress state as EHttpProgContentFileMoved because we need to display
 			//where file is saved(saved to gallery)
-			//Change Dl State to Download Completed if not already           
-          
-            if( iStatus ==KErrNone )
-                {
-		          if(_OMADLOTA2_MULTI_DOWNLOAD)
-				     {
-				      TPtrC fileNamePtr = ((*iCodDlData)[iMOMoved])->DestFilename();
-				      NotifyMediaGalleryL(fileNamePtr);
-
-             	      // Initiate async move for the next media object
-				      iMOMoved++;
-				      if(iMOMoved <= iCodDlData->Count())
-					     {
-					      MoveDownloadedMediaObjectL(iMOMoved);
-					      break;
-					     }
-				      }
-
-                  SetDownloadStatus( iDlNameChanged ? EHttpProgContentFileMovedAndDestFNChanged : EHttpProgContentFileMoved, 
-                               iDlState = EHttpDlMultipleMOCompleted, 
+			//Change Dl State to Download Completed if not already
+
+		    if(_OMADLOTA2_MULTI_DOWNLOAD)
+				{
+				TPtrC fileNamePtr = ((*iCodDlData)[iMOMoved])->DestFilename();
+				NotifyMediaGalleryL(fileNamePtr);
+
+				// Initiate async move for the next media object
+				iMOMoved++;
+				if(iMOMoved <= iCodDlData->Count())
+					{
+					MoveDownloadedMediaObjectL(iMOMoved);
+					break;
+					}
+				}
+
+            SetDownloadStatus( iDlNameChanged ? EHttpProgContentFileMovedAndDestFNChanged : EHttpProgContentFileMoved,
+                               iDlState = EHttpDlMultipleMOCompleted,
                                iStatus == KErrNone ? ENoError : EMoveFailed,
                                iStatus.Int() );
-            
-                  if(iStatus == KErrNone)
-            	      {
-            	       iMoveInProgress = EFalse;	
-            	       CLOG_WRITE("setting iMoveInProgress false when move is completed");
-            	      }
-            
-                  delete iFileMan; iFileMan = NULL;
-            
-                  if( !_OMADLOTA2_MULTI_DOWNLOAD)
-				     {
-				      TPtr fileNamePtr(iStorage->DestFilename()->Des());
-				      NotifyMediaGalleryL(fileNamePtr);
-				     }
-                }
-            else
-                {
-                CLOG_WRITE("Move Operation Failed ");
-                CLOG_WRITE("setting progress state to EHttpProgNone when move is Failing");
-                SetDownloadStatus( EHttpProgNone, iDlState );
-                CLOG_WRITE("setting iMoveInProgress false when move is Failing");
-                iMoveInProgress = EFalse;
-                }
-            } 
+
+            if(iStatus == KErrNone)
+            	{
+            	iMoveInProgress = EFalse;
+            	CLOG_WRITE("setting iMoveInProgress false when move is completed");
+            	}
+
+
+            delete iFileMan; iFileMan = NULL;
+
+			if( !_OMADLOTA2_MULTI_DOWNLOAD)
+				{
+				TPtr fileNamePtr(iStorage->DestFilename()->Des());
+				NotifyMediaGalleryL(fileNamePtr);
+				}
+            }
             break;
 
         default:
@@ -3940,10 +3900,10 @@
         {
         return;
         }
-        
-    //Set the errors 
+
+    //Set the errors
     TRAP_IGNORE( PauseL( ETrue ) );
-    
+
     iLastError = EConnectionFailed;
     iGlobalErrorId = KErrCommsLineFail;
     }
@@ -4000,7 +3960,7 @@
 
     // content type is unknown -> download might be pausable again
     UpdatePausable();
-    
+
     if( !aOnDelete )
         {
         TRAP_IGNORE( StoreDownloadInfoL() );
@@ -4020,7 +3980,7 @@
 void CHttpDownload::StoreDownloadInfoL()
     {
     LOGGER_ENTERFN( "StoreDownloadInfoL" );
-    TInt bufSz = KDownloadInfoIncrSize + 
+    TInt bufSz = KDownloadInfoIncrSize +
                  (iDownloadInfo ? iDownloadInfo->Length(): 0);
     HBufC8* newInfo = HBufC8::NewLC( bufSz );
     TPtr8 newInfoPtr = newInfo->Des();
@@ -4062,27 +4022,27 @@
 
     CLOG_WRITE("5");
 
-    
+
     TInt size = GetHttpHeadersSize(iResponseHeaders)+ GetHttpHeadersSize(iRequestHeaders)+
                 GetHttpHeadersSize(iEntityHeaders)+ GetHttpHeadersSize(iGeneralHeaders) + newInfoPtr.Size();
-    
-    
+
+
     if(size >= bufSz)
         {
     	User::LeaveIfError( KErrArgument );
         }
-    
+
     AppendHeadersL( newInfoPtr, iResponseHeaders );
     AppendHeadersL( newInfoPtr, iRequestHeaders );
     AppendHeadersL( newInfoPtr, iEntityHeaders );
     AppendHeadersL( newInfoPtr, iGeneralHeaders );
 
     CLOG_WRITE("6");
-    
+
     APPEND_BUF_INT( newInfoPtr, iFotaPckgId );
-    
+
     CLOG_WRITE("7");
-    
+
     // check if download info is unchanged from previous update
     if( iDownloadInfo && ( iDownloadInfo->Compare(*newInfo) == 0 ))
         {
@@ -4104,13 +4064,13 @@
         iClientApp->Engine()->DownloadInfoFolder( iClientApp, folder );
         fileName.Format( _L("%S%d"), &folder, iId );
         CLOG_WRITE_1( "info: %S", &fileName );
-    
+
         RFile outFile;
         CleanupClosePushL<RFile>( outFile );
-        User::LeaveIfError( outFile.Replace( iClientApp->Engine()->Fs(), 
-                                             fileName, 
-                                             EFileShareExclusive | 
-                                             EFileStream | 
+        User::LeaveIfError( outFile.Replace( iClientApp->Engine()->Fs(),
+                                             fileName,
+                                             EFileShareExclusive |
+                                             EFileStream |
                                              EFileWrite ) );
 
         outFile.Write( newInfoPtr );
@@ -4142,9 +4102,9 @@
     CLOG_WRITE_1( "info: %S", &fileName );
 
     RFile inFile;
-    User::LeaveIfError( inFile.Open( iClientApp->Engine()->Fs(), 
-                                     fileName, 
-                                     EFileShareReadersOnly | 
+    User::LeaveIfError( inFile.Open( iClientApp->Engine()->Fs(),
+                                     fileName,
+                                     EFileShareReadersOnly |
                                      EFileRead ) );
 
     CLOG_WRITE("1");
@@ -4193,7 +4153,7 @@
     ReadHBufCL( inFile, iHashedMsgBody );
     READ_INT_L( inFile, iCodDownload );
     READ_INT_L( inFile, iNoMedia );
-    
+
 
     CLOG_WRITE("3");
     READ_INT_L( inFile, iPreferencies );
@@ -4213,16 +4173,16 @@
     LoadHeadersL( inFile, iRequestHeaders );
     LoadHeadersL( inFile, iEntityHeaders );
     LoadHeadersL( inFile, iGeneralHeaders );
-    
+
     CLOG_WRITE("6");
-    
+
     READ_INT_L( inFile, iFotaPckgId );
 
     CleanupStack::PopAndDestroy(); // inFile
     CleanupStack::PopAndDestroy( 2, folderBuf ); // also fileNameBuf
 
     CLOG_WRITE("9");
-    
+
     UpdatePausable();
     }
 
@@ -4271,18 +4231,18 @@
 
 TBool CHttpDownload::IsContentFileStorageType()
     {
-    
-     
-     if( iCodDownload 
-         && iContentType->Compare( KRoapMimeType ) 
-         && iContentType->Compare( KRoapPduMimeType ) 
+
+
+     if( iCodDownload
+         && iContentType->Compare( KRoapMimeType )
+         && iContentType->Compare( KRoapPduMimeType )
          && iContentType->Compare( KFotaPackageDataType)  )
          {
      	 return ETrue;
          }
-            
+
      return EFalse;
-     
+
     }
 
 // -----------------------------------------------------------------------------
@@ -4309,7 +4269,7 @@
             TriggerEvent( EHttpDlInprogress, EHttpContTypeRecognitionAvail );
             iContTypeRecognitionAvailSent = ETrue;
             }
-        //for correct display of string in download list for COD download we set progress state to moved            
+        //for correct display of string in download list for COD download we set progress state to moved
         if(IsContentFileStorageType())
             {
            // Retrieve the file name from the whole paths
@@ -4325,19 +4285,19 @@
             TInt findDot = iDlName->LocateReverse( '.' );
             if( findDot == KErrNotFound )
                 {
-                //if Name displayed does not have Extension then 
+                //if Name displayed does not have Extension then
                 // Remove extention from retrieved name
                 TInt dotInd = namePtr.LocateReverse( '.' );
                  if( dotInd == KErrNotFound )
                     dotInd = namePtr.Length();
-                namePtr.Copy( namePtr.Left( dotInd ) );       
-            
+                namePtr.Copy( namePtr.Left( dotInd ) );
+
                 }
 
             //we never get file moved and Download complete for Cod download becuase move is inherent
             //to Install() state i.e  Download is in progress so display in download list is incorrect.
-            //related to bug  HCHA-753D6G  
-             
+            //related to bug  HCHA-753D6G
+
             if(namePtr.Compare(*iDlName))
                 {
                 ReallocateStringL( iDlName, namePtr, KDownloadNameMaxSize );
@@ -4347,10 +4307,10 @@
                 {
                 SetDownloadStatus( EHttpProgContentFileMoved, EHttpDlMultipleMOCompleted );
                 }
-           CleanupStack::PopAndDestroy( name );          
-           
-            }
-        else            
+           CleanupStack::PopAndDestroy( name );
+
+            }
+        else
             {
             TriggerEvent( EHttpDlCompleted, EHttpProgNone );
             SetDownloadStatus( EHttpProgNone, EHttpDlMultipleMOCompleted );
@@ -4363,8 +4323,8 @@
     Disconnect();
 
     iStorage->OnComplete();
-    
-    // this is a special case because transaction don't need to be 
+
+    // this is a special case because transaction don't need to be
     // canceled, only deleted
     iContinueDownload = EFalse;
     if( iTransValid )
@@ -4398,7 +4358,7 @@
     TInt end = iMediaType->Des().Mid( start, length-start ).Locate( KSemiColon );
     TInt boundaryLength = ( KErrNotFound == end ) ? length - start : end;
     TPtrC8 ptr = iMediaType->Des().Mid( start, boundaryLength );
-    return ptr;    
+    return ptr;
     }
 
 // -----------------------------------------------------------------------------
@@ -4443,7 +4403,7 @@
         {
         TriggerEvent( EHttpDlCancelTransaction );
         }
-        
+
     iContinueDownload = EFalse;
 
     iDlStartedByClient = EFalse;
@@ -4559,7 +4519,7 @@
             DMPanic( KErrArgument );
             }
         }
-        
+
     TRAP_IGNORE( StoreDownloadInfoL() ); //saving the state
 
     if( !eventTriggered )
@@ -4628,12 +4588,12 @@
                 OnError( KErrUnknown, EObjectNotFound );
                 }
                 break;
-                
+
             default:
                 {
-                SetDownloadStatus( EHttpProgNone, 
-                                   EHttpDlFailed, 
-                                   EHttpUnhandled, 
+                SetDownloadStatus( EHttpProgNone,
+                                   EHttpDlFailed,
+                                   EHttpUnhandled,
                                    GLOBAL_HTTP_ERROR( iStatusCode ) );
                 }
             }
@@ -4752,7 +4712,7 @@
 // -----------------------------------------------------------------------------
 //
 void CHttpDownload::ResponseBodyReceivedL( const TDesC8& aBuf )
-    {    
+    {
     if( iMultiPart && !iCodDownload )
         {
         TBool isSupportedMultiPart( EFalse );
@@ -4763,10 +4723,10 @@
             SetCodFlag( ETrue );
             TriggerEvent( EHttpDlInprogress, EHttpProgSupportedMultiPart );
             }
-        }          
-      
+        }
+
     TBool ret(ETrue);
-    
+
     if( iStorage->BufferingEnabled() )
     	{
     	// Buffering is enabled, just pass on the data
@@ -4777,7 +4737,7 @@
     	// Buffering not yet enabled, see how much data we still have to write without buffering
     	TInt bytesToWrite = aBuf.Length();
     	TInt downloadedSize = iStorage->DownloadedSize();
-    	
+
     	if(bytesToWrite + downloadedSize < KMinDataSizeToSend)
     		{
     		// Just dump non-buffered write
@@ -4786,28 +4746,28 @@
     	else
     		{
     		// Necessary to switch to buffered writing
-    		
+
     		TInt leftPartSize = KMinDataSizeToSend - downloadedSize;
     		TInt rightPartSize = bytesToWrite - leftPartSize;
-    		
+
     		TBool ret1 = ETrue;
     		TBool ret2 = ETrue;
-    		
+
     		if(leftPartSize > 0)
     			{
     			// Write left side of the block to get alignment matched
     			ret1 = iStorage->WriteOutNextBodyDataL( aBuf.Left(leftPartSize) );
     			}
-    		
+
     		// Enable buffering
     		iStorage->EnableBufferingL();
-    		
+
     		// And push the rest of this data block
     		if(rightPartSize > 0)
     			{
     			ret2 = iStorage->WriteOutNextBodyDataL( aBuf.Right(rightPartSize) );
     			}
-    		
+
     		if(!ret1 || !ret2)
     			{
     			ret = EFalse;
@@ -4823,9 +4783,9 @@
     if( !iContTypeRecognitionAvailSent && (iStorage->DownloadedSize() >= KRespSizeForRecognition) )
         {
         TriggerEvent( EHttpDlInprogress, EHttpContTypeRecognitionAvail );
-        iContTypeRecognitionAvailSent = ETrue;        
-        }
-        
+        iContTypeRecognitionAvailSent = ETrue;
+        }
+
     TriggerEvent( EHttpDlInprogress, EHttpProgResponseBodyReceived );
     }
 
@@ -4838,7 +4798,7 @@
 TBool CHttpDownload::IsMultipartSupportedL( const TDesC8& aBuf )
     {
     TBool ret( EFalse );
-    
+
     if( !iHeaderOfMultipart )
         {
         iHeaderOfMultipart = HBufC8::NewL( KMaxHeaderOfMultipart );
@@ -4853,16 +4813,16 @@
         ret = EFalse;
         return ret;
         }
-    
+
     TInt pos = iHeaderOfMultipart->Des().Find( KContentType() );
 
     User::LeaveIfError( pos );
 
-    pos = pos + KContentType().Length();    
-
-    TPtrC8 p = iHeaderOfMultipart->Des().Mid( pos );    
+    pos = pos + KContentType().Length();
+
+    TPtrC8 p = iHeaderOfMultipart->Des().Mid( pos );
     TInt temp = p.Find( KDoubleEOL() );
-    
+
     TInt posEol = pos + temp;
 
     TPtrC8 ptr = iHeaderOfMultipart->Des().Mid( pos, ( posEol - pos ) );
@@ -4873,10 +4833,10 @@
         ret = ETrue;
         delete iHeaderOfMultipart;
         iHeaderOfMultipart = NULL;
-        return ret;            
-        }
-        
-    return ret;  
+        return ret;
+        }
+
+    return ret;
     }
 
 // -----------------------------------------------------------------------------
@@ -4958,7 +4918,7 @@
     SetCredentialsInfoL( aStringPool );
 
     // Find ETag in response header
-    RStringF etag = aStringPool.StringF(HTTP::EETag, 
+    RStringF etag = aStringPool.StringF(HTTP::EETag,
                                         RHTTPSession::GetTable());
     TInt fieldInd = FindHeaderField( iResponseHeaders, etag.DesC() );
     if( fieldInd != KErrNotFound )
@@ -4966,11 +4926,11 @@
         // that if it's changed, or a redirection goes to another url.
         // Server will respond with 412 on error.
         {
-        RStringF ifMatch = aStringPool.StringF(HTTP::EIfMatch, 
+        RStringF ifMatch = aStringPool.StringF(HTTP::EIfMatch,
                                         RHTTPSession::GetTable());
         aHeaders.RemoveField( ifMatch );
-        aHeaders.SetRawFieldL( ifMatch, 
-                               *(*iResponseHeaders)[fieldInd]->FieldRawData(), 
+        aHeaders.SetRawFieldL( ifMatch,
+                               *(*iResponseHeaders)[fieldInd]->FieldRawData(),
                                KHttpFieldSeparator );
         CLOG_WRITE8_1( "ETag: %S", (*iResponseHeaders)[fieldInd]->FieldRawData() );
         }
@@ -4995,7 +4955,7 @@
         if( iStorage->DownloadedSize() != iStorage->Length() )
             // download from previous point only if the content is unmodified
             {
-            field = aStringPool.StringF(HTTP::EIfUnmodifiedSince, 
+            field = aStringPool.StringF(HTTP::EIfUnmodifiedSince,
                                         RHTTPSession::GetTable());
 
             SetExpireToFieldL( field, aStringPool, aHeaders );
@@ -5050,7 +5010,7 @@
 // -----------------------------------------------------------------------------
 //
 void CHttpDownload::SetPropertyL( RStringPool& aStringPool,
-                                  RStringF aPropertyName, 
+                                  RStringF aPropertyName,
                                   const TDesC8& aToken )
     {
     RString tokenStr = aStringPool.OpenStringL( aToken );
@@ -5069,7 +5029,7 @@
 // Set property of the transaction
 // -----------------------------------------------------------------------------
 //
-void CHttpDownload::SetPropertyL( RStringF aPropertyName, 
+void CHttpDownload::SetPropertyL( RStringF aPropertyName,
                                   const TInt aValue )
     {
     THTTPHdrVal tokenVal = aValue;
@@ -5140,7 +5100,7 @@
 
     if( iHttpUsername )
         {
-        RStringF username = aStringPool.StringF( HTTP::EUsername, 
+        RStringF username = aStringPool.StringF( HTTP::EUsername,
                                                     RHTTPSession::GetTable() );
 
         SetPropertyL( aStringPool, username, *iHttpUsername );
@@ -5148,7 +5108,7 @@
 
     if( iHttpPassword )
         {
-        RStringF password = aStringPool.StringF( HTTP::EPassword, 
+        RStringF password = aStringPool.StringF( HTTP::EPassword,
                                                     RHTTPSession::GetTable() );
 
         SetPropertyL( aStringPool, password, *iHttpPassword );
@@ -5156,38 +5116,38 @@
 
     if( iHttpRealm )
         {
-        RStringF realm = aStringPool.StringF( HTTP::ERealm, 
+        RStringF realm = aStringPool.StringF( HTTP::ERealm,
                                                     RHTTPSession::GetTable() );
         SetPropertyL( aStringPool, realm, *iHttpRealm );
         }
 
     if( iHttpProxyRealm )
         {
-        RStringF proxyRealmStr = aStringPool.StringF( 
-                                        HttpFilterCommonStringsExt::EProxyRealm, 
+        RStringF proxyRealmStr = aStringPool.StringF(
+                                        HttpFilterCommonStringsExt::EProxyRealm,
                                         HttpFilterCommonStringsExt::GetTable() );
         SetPropertyL( aStringPool, proxyRealmStr, *iHttpProxyRealm );
         }
 
     if( iHttpProxyUsername )
         {
-        RStringF proxyUsernameStr = aStringPool.StringF( 
-                                    HttpFilterCommonStringsExt::EProxyUsername, 
+        RStringF proxyUsernameStr = aStringPool.StringF(
+                                    HttpFilterCommonStringsExt::EProxyUsername,
                                     HttpFilterCommonStringsExt::GetTable() );
         SetPropertyL( aStringPool, proxyUsernameStr, *iHttpProxyUsername );
         }
 
     if( iHttpProxyPassword )
         {
-        RStringF proxyPasswordStr = aStringPool.StringF( 
-                                        HttpFilterCommonStringsExt::EProxyPassword, 
+        RStringF proxyPasswordStr = aStringPool.StringF(
+                                        HttpFilterCommonStringsExt::EProxyPassword,
                                         HttpFilterCommonStringsExt::GetTable() );
         SetPropertyL( aStringPool, proxyPasswordStr, *iHttpProxyPassword );
         }
 
     if( iHttpNonce )
         {
-        RStringF nonce = aStringPool.StringF( HTTP::ENonce, 
+        RStringF nonce = aStringPool.StringF( HTTP::ENonce,
                                                     RHTTPSession::GetTable() );
 
         SetPropertyL( aStringPool, nonce, *iHttpNonce );
@@ -5229,7 +5189,7 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-void CHttpDownload::SetExpireToFieldL( RStringF& aField, 
+void CHttpDownload::SetExpireToFieldL( RStringF& aField,
                                        RStringPool& aStringPool,
                                        RHTTPHeaders& aHeaders )
     {
@@ -5242,7 +5202,7 @@
     TInt modInd( KErrNotFound );
 
     for( TInt i = 0; i < iResponseHeaders->Count(); ++i )
-        // FindHeaderField, because this is double search for fieldnames 
+        // FindHeaderField, because this is double search for fieldnames
         {
         if( *(*iResponseHeaders)[i]->FieldName() == expires.DesC() )
             {
@@ -5261,8 +5221,8 @@
         CLOG_WRITE8_1( "Expire: %S", (*iResponseHeaders)[expInd]->FieldRawData() );
 
         aHeaders.RemoveField( aField );
-        aHeaders.SetRawFieldL( aField, 
-                               *(*iResponseHeaders)[expInd]->FieldRawData(), 
+        aHeaders.SetRawFieldL( aField,
+                               *(*iResponseHeaders)[expInd]->FieldRawData(),
                                KHttpFieldSeparator );
         }
     else if( modInd != KErrNotFound )
@@ -5270,8 +5230,8 @@
         CLOG_WRITE8_1( "LastMod: %S", (*iResponseHeaders)[modInd]->FieldRawData() );
 
         aHeaders.RemoveField( aField );
-        aHeaders.SetRawFieldL( aField, 
-                               *(*iResponseHeaders)[modInd]->FieldRawData(), 
+        aHeaders.SetRawFieldL( aField,
+                               *(*iResponseHeaders)[modInd]->FieldRawData(),
                                KHttpFieldSeparator );
         }
     }
@@ -5288,7 +5248,7 @@
 
     __ASSERT_DEBUG( iUrl->Length(), DMPanic( KErrArgument ) );
 
-    TUriParser8 uri; 
+    TUriParser8 uri;
     uri.Parse( *iUrl );
 
     TPtrC8 scheme( uri.Extract( EUriScheme ) );
@@ -5298,8 +5258,8 @@
         // unsupported or no scheme in url.
         // Insert 'http://' to the beginning of it.
         {
-        HBufC8* tempBuf = HBufC8::NewL( KHttpScheme().Length() + 
-                                        KSchemeAddon().Length() + 
+        HBufC8* tempBuf = HBufC8::NewL( KHttpScheme().Length() +
+                                        KSchemeAddon().Length() +
                                         iUrl->Length() );
 
         tempBuf->Des().Append( KHttpScheme );
@@ -5321,7 +5281,7 @@
     url->SetComponentL( uri.Extract( EUriUserinfo ), EUriUserinfo );
     url->SetComponentL( uri.Extract( EUriQuery ), EUriQuery );
     url->SetComponentL( uri.Extract( EUriFragment ), EUriFragment );
-    
+
     if( uri.IsPresent( EUriPort ) )
         {
         url->SetComponentL( uri.Extract( EUriPort ), EUriPort );
@@ -5360,8 +5320,8 @@
     // Calculate the download name from the requested URL
     HBufC8* parsedUrl = EscapeUtils::EscapeDecodeL( *iCurrentUrl );
     CleanupStack::PushL( parsedUrl );
-    
-    TUriParser8 uri; 
+
+    TUriParser8 uri;
     uri.Parse( *parsedUrl );
 
     TPtrC8 path;
@@ -5382,7 +5342,7 @@
             {
             slash = path.LocateReverse( '\\' );
             }
-            
+
         if( slash != KErrNotFound && slash != path.Length() )
             // from the last slash this is the filename
             {
@@ -5455,9 +5415,9 @@
 
         CLOG_WRITE8_2("%S:%S", &fieldNameStr.DesC(), &rawData);
         iResponseHeaders->AppendL( field );
-        
+
         CleanupStack::Pop( field );
-        
+
         CHeaderField* entityField = CHeaderField::NewL( &fieldNameStr.DesC(), &rawData );
         CleanupStack::PushL( entityField );
 
@@ -5467,10 +5427,10 @@
         CleanupStack::Pop( entityField );
 
         ++it;
-        }    
+        }
 
     ParseContentTypeL( strPool );
-    
+
     ParseContentDispositionL( strPool);
     if (!iCodDownload)
         {
@@ -5498,17 +5458,17 @@
             //This is a partial response as Length is already set so save this new length as partial Length that needs to be Downloaded.
             {
             iStorage->SetPartialContentLength( value );
-            }    
-        }
-        
+            }
+        }
+
     CheckRealDRMContentType();
     if( !iDrmContentLengthValid )
         // Content was original encoded -> we don't know the actual content size.
         {
         iStorage->SetLength( KDefaultContentLength );
         }
-        
-        
+
+
     iMaxAge = 0;
     TInt parts( 0 );
     // this leave is trapped because we can still go on
@@ -5587,7 +5547,7 @@
 
     iPausableDRM = ETrue;
     iDrmContentLengthValid = ETrue;
-    
+
     TInt index = FindHeaderField( iResponseHeaders, KDRMOldContentType );
     if( index != KErrNotFound )
         // this is an old DRM protected content
@@ -5599,9 +5559,9 @@
 //            iDrmContentLengthValid = EFalse;
             }
         }
-        
+
     UpdatePausable();
-            
+
     CLOG_WRITE_2( "Pausable: [%d], Length: [%d]", iPausableDRM, iDrmContentLengthValid );
     }
 
@@ -5615,13 +5575,13 @@
     {
     LOGGER_ENTERFN( "SaveCredentialsL" );
 
-    RStringF username = aStringPool.StringF( HTTP::EUsername, 
+    RStringF username = aStringPool.StringF( HTTP::EUsername,
                                                 RHTTPSession::GetTable() );
-    RStringF password = aStringPool.StringF( HTTP::EPassword, 
+    RStringF password = aStringPool.StringF( HTTP::EPassword,
                                                 RHTTPSession::GetTable() );
-    RStringF realm = aStringPool.StringF( HTTP::ERealm, 
+    RStringF realm = aStringPool.StringF( HTTP::ERealm,
                                                 RHTTPSession::GetTable() );
-    RStringF nonce = aStringPool.StringF( HTTP::ENonce, 
+    RStringF nonce = aStringPool.StringF( HTTP::ENonce,
                                                 RHTTPSession::GetTable() );
 
     THTTPHdrVal hdrValue;
@@ -5649,9 +5609,9 @@
                 CLOG_WRITE8_1( "pwd: [%S]", iHttpPassword );
                 }
 
-            if( !iTrans.PropertySet().Property( 
-                                    aStringPool.StringF( HTTP::EBasic, 
-                                    RHTTPSession::GetTable() ), 
+            if( !iTrans.PropertySet().Property(
+                                    aStringPool.StringF( HTTP::EBasic,
+                                    RHTTPSession::GetTable() ),
                                     hdrValue ) )
                 // this is a digest authentication response
                 // store nonce value
@@ -5679,7 +5639,7 @@
     RStringPool strPool = iConnHandler->Session().StringPool();
     RStringF method;
     TBool aHead = ETrue;
-    
+
     if( (iContentType && iContentType->Length()) ||
         iNoContentTypeCheck ||
         iSilentMode )
@@ -5695,7 +5655,7 @@
         method = strPool.StringF( HTTP::EHEAD,RHTTPSession::GetTable() );
         }
 
-    TUriParser8 uri; 
+    TUriParser8 uri;
     uri.Parse( *iCurrentUrl );
 
     CLOG_WRITE8_1( "Req URL: %S", iCurrentUrl );
@@ -5757,8 +5717,8 @@
     RStringPool strPool = iConnHandler->Session().StringPool();
 
     // Check authentication scheme
-    TBool basic = iTrans.PropertySet().Property( strPool.StringF( HTTP::EBasic, 
-                                                 RHTTPSession::GetTable() ), 
+    TBool basic = iTrans.PropertySet().Property( strPool.StringF( HTTP::EBasic,
+                                                 RHTTPSession::GetTable() ),
                                                  hdrValue );
 
     if( basic )
@@ -5805,8 +5765,8 @@
     THTTPHdrVal hdrValue;
 
     RStringPool strPool = iConnHandler->Session().StringPool();
-    TInt err = iTrans.PropertySet().Property( strPool.StringF( HTTP::EBasic, 
-                                               RHTTPSession::GetTable() ), 
+    TInt err = iTrans.PropertySet().Property( strPool.StringF( HTTP::EBasic,
+                                               RHTTPSession::GetTable() ),
                                                hdrValue );
 
     if( !err )
@@ -5905,8 +5865,8 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-void CHttpDownload::CreateIndexedNameL( HBufC* &aUniqueName, 
-                                        TDesC& aOrgName, 
+void CHttpDownload::CreateIndexedNameL( HBufC* &aUniqueName,
+                                        TDesC& aOrgName,
                                         TInt& aIndex )
     {
     LOGGER_ENTERFN( "CreateIndexedNameL" );
@@ -5945,7 +5905,7 @@
         }
 
     aUniqueName = HBufC::NewL( fullLength );
-    aUniqueName->Des().Format( _L("%S%S%S"), &left, 
+    aUniqueName->Des().Format( _L("%S%S%S"), &left,
                                              &indexStr,
                                              &extension );
 
@@ -5958,7 +5918,7 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-void CHttpDownload::ContinueDownloadStoreResponseHeaderL( 
+void CHttpDownload::ContinueDownloadStoreResponseHeaderL(
                                                 const TDesC8& aResponseHeader )
     {
     LOGGER_ENTERFN( "ContinueDownloadStoreResponseHeaderL" );
@@ -6010,7 +5970,7 @@
             iResponseHeaders->AppendL( newField );
 
             CleanupStack::Pop( newField );
-            
+
             CHeaderField* newentField = CHeaderField::NewL( &fieldName, &fieldValue );
             CleanupStack::PushL( newentField );
 
@@ -6090,8 +6050,8 @@
         ReallocateStringL( iDDType, rawData, KMaxContentTypeLength );
         ReallocateStringL( iMediaType, mediaType, KMaxContentTypeLength );
         }
-        
-#ifdef __SYNCML_DM_FOTA        
+
+#ifdef __SYNCML_DM_FOTA
     if( !iContentType->Des().CompareF( KFotaMimeType ) )
         {
         iStorage->SetStorageMethod( CHttpStorage::EStoreFota );
@@ -6104,12 +6064,12 @@
         {
         SetCodFlag( ETrue );
         }
-        
+
     if( 0 == iContentType->Des().Compare( KMultiPartMimeType() ) )
         {
         iMultiPart = ETrue;
         }
-        
+
     }
 
 // -----------------------------------------------------------------------------
@@ -6206,7 +6166,7 @@
 			ReallocateStringL( iAttachmentFileName, fileNameParm );
 			iUseInlineFileName = ETrue;
 			}
-        }                        
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -6267,7 +6227,7 @@
         {
         pausable = EFalse;
         }
-        
+
     if( iMethod == EMethodPOST )
         {
         pausable = EFalse;
@@ -6275,10 +6235,10 @@
 
     if( pausable != iPausable )
         {
-        if( !iCodDownload )	
+        if( !iCodDownload )
             {
         	iPausable = pausable;
-        	
+
         	// inform client about change
             TriggerEvent( iPausable ? EHttpDlPausable : EHttpDlNonPausable );
 
@@ -6375,7 +6335,7 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-void CHttpDownload::CheckAttribMaxLengthL( THttpDownloadAttrib aAttribute, 
+void CHttpDownload::CheckAttribMaxLengthL( THttpDownloadAttrib aAttribute,
 	                                       const TDesC16& aValue )
     {
     for( TInt i = 0; KStringAttribMaxLengths[i][0]; ++i )
@@ -6384,7 +6344,7 @@
             {
             if( aValue.Length() > KStringAttribMaxLengths[i][1] )
                 {
-                CLOG_WRITE_2( "Overflow length: %d, max-length: %d", aValue.Length(), 
+                CLOG_WRITE_2( "Overflow length: %d, max-length: %d", aValue.Length(),
                                                     KStringAttribMaxLengths[i][1] );
                 User::Leave( KErrOverflow );
                 }
@@ -6398,7 +6358,7 @@
 // (other items were commented in a header).
 // -----------------------------------------------------------------------------
 //
-void CHttpDownload::CheckAttribMaxLengthL( THttpDownloadAttrib aAttribute, 
+void CHttpDownload::CheckAttribMaxLengthL( THttpDownloadAttrib aAttribute,
 	                                       const TDesC8& aValue )
     {
     for( TInt i = 0; KStringAttribMaxLengths[i][0]; ++i )
@@ -6407,7 +6367,7 @@
             {
             if( aValue.Length() > KStringAttribMaxLengths[i][1] )
                 {
-                CLOG_WRITE_2( "Overflow length: %d, max-length: %d", aValue.Length(), 
+                CLOG_WRITE_2( "Overflow length: %d, max-length: %d", aValue.Length(),
                                                     KStringAttribMaxLengths[i][1] );
                 User::Leave( KErrOverflow );
                 }
@@ -6510,7 +6470,7 @@
         // If not, fieldInd is KErrNotFound
         for( TInt i = 0; KRequestHeaderConvTable[i][0]; ++i )
             {
-            RStringF fieldNameStr = strPool.StringF( KRequestHeaderConvTable[i][1], 
+            RStringF fieldNameStr = strPool.StringF( KRequestHeaderConvTable[i][1],
                                                      RHTTPSession::GetTable() );
 
             if( !fieldName.CompareF( fieldNameStr.DesC() ) )
@@ -6535,7 +6495,7 @@
 // CHttpDownload::LoadHeadersL
 // -----------------------------------------------------------------------------
 //
-void CHttpDownload::LoadHeadersL( RFile& aFile, 
+void CHttpDownload::LoadHeadersL( RFile& aFile,
                                   CArrayPtrFlat<CHeaderField>* aHeaders )
     {
     TInt headers;
@@ -6561,7 +6521,7 @@
             {
             CLOG_WRITE8( "Empty field" );
             }
-*/    
+*/
         CleanupStack::Pop( field );
         }
     }
@@ -6601,36 +6561,36 @@
 
     HBufC8* fieldName = NULL;
     HBufC8* fieldRawData = NULL;
-    
+
     TInt size  = 0;
 
     for( TInt i = 0; i < headers; ++i )
         {
         fieldName = (*aHeaders)[i]->FieldName();
         fieldRawData = (*aHeaders)[i]->FieldRawData();
-        
+
         size = size + fieldName->Size() +  fieldRawData->Size();
-        
+
         CLOG_WRITE8_1( "Size = %d:", size );
         }
 
     return size;
-    
+
     }
-    
-    
+
+
 // -----------------------------------------------------------------------------
 // CHttpDownload::AddHeaderL
 // -----------------------------------------------------------------------------
 //
-void CHttpDownload::AddHeaderL( THttpDownloadAttrib aAttribute, 
+void CHttpDownload::AddHeaderL( THttpDownloadAttrib aAttribute,
 								const TDesC8& aValue,
                                 const TInt aConversionTable[][2],
                                 CArrayPtrFlat<CHeaderField>* aHeaders )
     {
     TInt index( KErrNotFound );
 
-    // search for if this field is already in the 
+    // search for if this field is already in the
     for( index = 0; aConversionTable[index][0]; ++index )
         {
         if( aConversionTable[index][0] == aAttribute )
@@ -6642,7 +6602,7 @@
     __ASSERT_DEBUG( index != KErrNotFound, DMPanic( KErrCorrupt ) );
 
     RStringPool strPool = iClAppInstance->ConnHandler()->Session().StringPool();
-    RStringF fieldName = strPool.StringF( aConversionTable[index][1], 
+    RStringF fieldName = strPool.StringF( aConversionTable[index][1],
                                           RHTTPSession::GetTable() );
     CleanupClosePushL( fieldName );
 
@@ -6659,7 +6619,7 @@
 
     CleanupStack::Pop( 2 ); // newField, fieldName
     }
-    
+
 // -----------------------------------------------------------------------------
 // CHttpDownload::RedirectedPermanentlyL
 // -----------------------------------------------------------------------------
@@ -6675,7 +6635,7 @@
         }
     else
         // there has already been a temporary redirection
-        // this permanent is not used on next submitted request 
+        // this permanent is not used on next submitted request
         {
         ReallocateStringL( iCurrentUrl, aNewUrl, KMaxUrlLength );
         }
@@ -6699,7 +6659,7 @@
 
     TriggerEvent( EHttpDlInprogress, EHttpProgRedirectedTemporarily );
     }
-    
+
 // -----------------------------------------------------------------------------
 // CHttpDownload::FixDownloadNameL
 // -----------------------------------------------------------------------------
@@ -6709,13 +6669,13 @@
     if( !iCodDownload )
         {
         TPtr name( iDlName->Des() );
-        
+
         for( TInt i = 0; i < name.Length(); ++i )
             {
             TChar currChar = (*iDlName)[i];
-            
+
             if( currChar.IsAlphaDigit() ||
-                currChar.IsGraph() || 
+                currChar.IsGraph() ||
                 currChar == 0x20 )  // space
                 {
                 continue;
@@ -6725,7 +6685,7 @@
                 name[i] = KUrlFixChar;
                 }
             }
-            
+
         ConvertDownloadNameUniqueL();
         }
     }
@@ -6738,7 +6698,7 @@
     {
     if( aValue && iCodDownload )
         {
-        // this case we will not overwrite 
+        // this case we will not overwrite
         // the value of iCodDownload. iCodDownload might be > 1
         return;
         }
@@ -6784,17 +6744,9 @@
     TBool needToUpdatePath( ETrue );
 
     CLOG_WRITE_1( " entering fileName: %S", fileName );
-#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
-    CDownloadPathHandler* downloadPathPlugin = NULL;
-    downloadPathPlugin = GetDownloadPathPluginInstanceL();
-    if( downloadPathPlugin )
-       {
-        CleanupStack::PushL( downloadPathPlugin );
-       }
-#endif
 #ifdef RD_MULTIPLE_DRIVE
     HBufC8* drivesDynList = iClientApp->Engine()->QueryDynDriveListLC();
-    TPtrC8 drives( *drivesDynList ); 
+    TPtrC8 drives( *drivesDynList );
 #else
     TPtrC drives( iClientApp->Engine()->iDriveLettersCenRep );
 #endif
@@ -6805,16 +6757,9 @@
             {
             continue;
             }
-        if( drive == currentDrive || iStorage->DestFNameSet())//if the current path is same as the path in cenrep then no need to update.The diff is because we must have not known size before hand
-            {
-#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
-            if( !downloadPathPlugin )
-                {
-                needToUpdatePath = EFalse;
-                }
-#else
+        if( drive == currentDrive )//if the current path is same as the path in cenrep then no need to update.The diff is because we must have not known size before hand
+            {
             needToUpdatePath = EFalse;
-#endif 
             break;
             }
         else
@@ -6822,10 +6767,10 @@
             TInt bytesToWrite = downloadedSize;
             if (bytesToWrite < 0)
                 bytesToWrite = 0;
-            
+
             TRAP( err, criticalSpace = !SysUtil::DiskSpaceBelowCriticalLevelL(
                                                              &fs, bytesToWrite, drive ));
-            }             
+            }
         }
     if( needToUpdatePath )
         {
@@ -6847,25 +6792,11 @@
                 fileNamePtr.Delete( 0, lastSlashPos );
                 }
             }
-    
+
         // Setting RootPath for new Destination file
         fileNamePtr.Insert( 0, rootPath );
-#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
-        if( downloadPathPlugin )
-            {
-             GetUpdatedPathFromPluginL(downloadPathPlugin,rootPath,fileNamePtr);
-            }
-         else 
-           {
-           // Setting KDownloadPath
-           fileNamePtr.Insert( rootPath.Length(), KDownloadPath );
-           }   
-#else
         // Setting KDownloadPath
         fileNamePtr.Insert( rootPath.Length(), KDownloadPath );
-          
-#endif
-        
 #else
         TChar driveChar;
         fs.DriveToChar(drive, driveChar);
@@ -6881,42 +6812,35 @@
         }
     CLOG_WRITE_1( " exiting fileName: %S", fileName );
 #ifdef RD_MULTIPLE_DRIVE
-    CleanupStack::PopAndDestroy( drivesDynList ); 
-#endif
-
-#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
-    if(downloadPathPlugin)
-    {
-     CleanupStack::PopAndDestroy( downloadPathPlugin );
-    }
+    CleanupStack::PopAndDestroy( drivesDynList );
 #endif
     CleanupStack::PopAndDestroy( &fs );
-    }    
+    }
 
 // ---------------------------------------------------------
 // CHttpDownload::UpdateDCFRepositoryL()
-// Update saved file to DCFRepository  
+// Update saved file to DCFRepository
 // ---------------------------------------------------------
-// 
+//
 void CHttpDownload::UpdateDCFRepositoryL(
     const TDesC& aFileName )
     {
     LOGGER_ENTERFN( "UpdateDCFRepositoryL" );
     CLOG_WRITE_1( " :UpdateDCFRepositoryL() for: %S", &aFileName );
     CDcfEntry* dcfEntry = NULL;
-    dcfEntry = CDcfEntry::NewL();    
+    dcfEntry = CDcfEntry::NewL();
     CleanupStack::PushL( dcfEntry );
-    
+
     CDcfRep* dcfRep = NULL;
     dcfRep = CDcfRep::NewL();
     CleanupStack::PushL( dcfRep );
 
-    dcfEntry->SetLocationL( aFileName, 0 );    
+    dcfEntry->SetLocationL( aFileName, 0 );
     CLOG_WRITE(" : SetLocationL OK");
     dcfRep->UpdateL( dcfEntry );
     CLOG_WRITE(" :UpdateL OK");
     CleanupStack::PopAndDestroy(2); // dcfEntry, dcfRep
-    }                 
+    }
 
 // -----------------------------------------------------------------------------
 // CHttpDownload::MoveInDeleteL
@@ -6936,7 +6860,7 @@
 		TPtrC filenamePtr = ((*iCodDlData)[mediaObjectIndex])->DestFilename();
 		if(filenamePtr.Length())
     		{
-    		TRAP_IGNORE(NotifyMediaGalleryL( filenamePtr ));    
+    		TRAP_IGNORE(NotifyMediaGalleryL( filenamePtr ));
     		}
 		}
 	return err;
@@ -6955,7 +6879,7 @@
 
     if( iDlState != EHttpDlMultipleMOCompleted && !iMoDownloadCompleted )
         {
-        iStorage->SetProgressiveMode( EFalse );	
+        iStorage->SetProgressiveMode( EFalse );
         TriggerEvent( iDlState, EHttpDlProgNonProgressive);
         return;//Move will be Done by COD as MO Completed has not happened
         }
@@ -6964,16 +6888,16 @@
     //__ASSERT_DEBUG( !iFileMan, DMPanic( KErrInUse ) );
 
 #if 0
-    
+
 #else
 
     HBufC* filename = HBufC::NewLC(KMaxFileName);
 	TPtr filenamePtr1 = filename->Des();
-	
+
     RFs &fs = iClientApp->Engine()->Fs();
 	if(!iFileMan)
 		{
-		iFileMan = CFileMan::NewL(fs);	
+		iFileMan = CFileMan::NewL(fs);
 		}
 
     TPtrC filenamePtr2 = ((*iCodDlData)[mediaObjectIndex])->DestFilename();
@@ -6982,18 +6906,18 @@
         CleanupStack::PopAndDestroy(filename);
         return;
     	}
-    
+
     TInt firstSlashPos = filenamePtr2.Locate( '\\' );
 
     if(firstSlashPos < 0)
 	    {
 	    CleanupStack::PopAndDestroy(filename);
-	    return;	
+	    return;
 	    }
   	TPtrC dlName = filenamePtr2.Left(firstSlashPos);
 
     TInt drive;
-    
+
     User::LeaveIfError( fs.CharToDrive( dlName[0], drive ));
 
 
@@ -7010,24 +6934,24 @@
     TInt error = fs.MkDirAll(filenamePtr1);
     if (error!=KErrNone && error!=KErrAlreadyExists)
        {
-        User::Leave(error);   
+        User::Leave(error);
        }
 	if( mediaObjectIndex == iActivePlayedDownload )
-	    {	    
-	           	
+	    {
+
 	    iFname = ((*iCodDlData)[mediaObjectIndex])->TempFilename();
 	    }
 
 	else
-		{	    
-	    
+		{
+
 	    iFname = ((*iCodDlData)[mediaObjectIndex])->DestFilename();
-		}   
+		}
     // Find a unique name to avoid any conflict.
     // Here iFname has full path of current location of file
     // and filename has destination path.
     FindUniqueDestinationFileNameL( iFname, filename );
-    
+
     filenamePtr1 = filename->Des();
 
     User::LeaveIfError( iFileMan->Move( iFname, filenamePtr1, CFileMan::EOverWrite, iStatus ) );
@@ -7037,7 +6961,7 @@
     ((*iCodDlData)[mediaObjectIndex])->SetDestFilenameL(filenamePtr1);
 
     CleanupStack::PopAndDestroy(filename);
- 
+
 #endif
     }
 
@@ -7060,26 +6984,26 @@
     //__ASSERT_DEBUG( !iFileMan, DMPanic( KErrInUse ) );
 
 
-    
+
 	RFs &fs = iClientApp->Engine()->Fs();
 	if(!iFileMan)
 		{
-		iFileMan = CFileMan::NewL(fs);	
+		iFileMan = CFileMan::NewL(fs);
 		}
 
     HBufC* filename = HBufC::NewLC(KMaxFileName);
     TPtr filenamePtr = filename->Des();
-    
+
     TPtrC fileNamePtr = ((*iCodDlData)[mediaObjectIndex])->DestFilename();
     TInt firstSlashPos = fileNamePtr.Locate( '\\' );
     if(firstSlashPos < 0)
 	    {
 	    CleanupStack::PopAndDestroy(filename);
-	    return;	
+	    return;
 	    }
   	TPtrC dlName = fileNamePtr.Left(firstSlashPos);
     TInt drive;
-    
+
     User::LeaveIfError( fs.CharToDrive( dlName[0], drive ));
 
 
@@ -7092,19 +7016,19 @@
 
     filenamePtr.Copy(rootPath);
     filenamePtr.Append(_L("\\"));
-    
+
     TInt error = fs.MkDirAll(filenamePtr);
     if (error!=KErrNone && error!=KErrAlreadyExists)
        {
-        User::Leave(error);   
+        User::Leave(error);
        }
     iFname = ((*iCodDlData)[mediaObjectIndex])->DestFilename();
-    
+
     // Find a unique name to avoid any conflict.
     // Here iFname has full path of current location of file
     // and filename has destination path.
     FindUniqueDestinationFileNameL( iFname, filename );
-    
+
     filenamePtr = filename->Des();
 
     TInt err = iFileMan->Move(iFname, filenamePtr, CFileMan::EOverWrite);
@@ -7116,7 +7040,7 @@
     ((*iCodDlData)[mediaObjectIndex])->SetDestFilenameL(filenamePtr);
 
     CleanupStack::PopAndDestroy(filename);
- 
+
 
     }
 
@@ -7158,21 +7082,21 @@
         CleanupStack::PopAndDestroy( fileName );
         CleanupStack::PopAndDestroy( fileExtention );
     }
-    
- 
+
+
 // ---------------------------------------------------------
 // CHttpDownload::NotifyMediaGalleryL()
 // Notify media gallery about the new file.
 // ---------------------------------------------------------
-// 
+//
 void CHttpDownload::NotifyMediaGalleryL( const TDesC& aFileName )
     {
 
 	LOGGER_ENTERFN( "CHttpDownload::NotifyMediaGalleryL" );
     CLOG_WRITE_1(" notifying Gallery and DcfReposory about move for: %S",&aFileName);
 
-#ifdef BRDO_APP_GALLERY_SUPPORTED_FF    
-    
+#ifdef BRDO_APP_GALLERY_SUPPORTED_FF
+
     //
     // Notify Media Gallery about new media file
     CMGXFileManager* mgFileManager = MGXFileManagerFactory::NewFileManagerL(
@@ -7187,8 +7111,8 @@
         TRAP_IGNORE( mgFileManager->UpdateL() );
         }
     CleanupStack::PopAndDestroy( mgFileManager );
-    
-#endif    
+
+#endif
     //
     // Notify DCF repository
     TRAP_IGNORE( UpdateDCFRepositoryL( aFileName ) );
@@ -7232,50 +7156,11 @@
 
     CleanupStack::PopAndDestroy(&rFs);
     CleanupStack::PopAndDestroy(fullNameTemp);
-    
+
     // This is the unique name that we were looking for.
     CleanupStack::PopAndDestroy(fileName);
     fileName = uniqueName;
     CleanupStack::PushL(fileName);
     }
 
-#ifdef DOWNLOADMGR_PATH_PLUGIN_ENABLED_FF
-
-// -----------------------------------------------------------------------------
-// CHttpDownload::GetDownloadPathPluginInstanceL
-// -----------------------------------------------------------------------------
-//
-CDownloadPathHandler* CHttpDownload::GetDownloadPathPluginInstanceL()
-    {
-    CDownloadPathHandler* downloadPathPlugin = NULL;
-    if ( iContentType )
-        {
-        TRAPD( kErr, downloadPathPlugin = CDownloadPathHandler::NewL( *iContentType ) );
-        if( kErr != KErrNone )
-            {
-            downloadPathPlugin = NULL;
-            }
-        }
-    return downloadPathPlugin;    
-
-    }
-
-// -----------------------------------------------------------------------------
-// CHttpDownload::GetUpdatedPathFromPluginL
-// -----------------------------------------------------------------------------
-//
-void CHttpDownload::GetUpdatedPathFromPluginL(CDownloadPathHandler* downloadPathPlugin,TFileName& rootPath, TPtr& fileNamePtr)
-    {
-    HBufC16* locFileName ;
-    locFileName = iStorage->LocalFilename();
-    
-    // Gets the updated path for the music content from Plugin
-    TRAPD( kErr, downloadPathPlugin->GetUpdatedPathL( *locFileName, fileNamePtr ) );
-    if( kErr != KErrNone )
-        {
-        // Setting to KDownloadPath
-        fileNamePtr.Insert( rootPath.Length(), KDownloadPath );
-        }
-    }
-#endif
 //  End of File