browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpDownload.cpp
changeset 8 7c90e6132015
parent 0 dd21522fd290
child 13 10e98eab6f85
--- a/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpDownload.cpp	Mon Mar 30 12:54:55 2009 +0300
+++ b/browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpDownload.cpp	Fri May 08 08:25:06 2009 +0300
@@ -18,6 +18,7 @@
 
 
 // INCLUDE FILES
+#include <platform/mw/Browser_platform_variant.hrh>
 #include    "HeaderField.h"
 #include    "HttpDownloadManagerServerEngine.h"
 #include    "HttpClientApp.h"
@@ -34,8 +35,12 @@
 #include    <HttpFilterCommonStringsExt.h>
 #include    <tinternetdate.h>
 #include    <SysUtil.h>
+
+#ifdef BRDO_APP_GALLERY_SUPPORTED_FF
 #include    <MGXFileManagerFactory.h>
 #include    <CMGXFileManager.h>
+#endif
+
 #include    <DcfEntry.h>
 #include    <DcfRep.h>
 
@@ -614,8 +619,6 @@
                 if( iClAppInstance )
                     {
                     SetDownloadStatus( EHttpProgNone, EHttpDlDeleting );
-                    //Deref Attach Download instance
-                    aClAppInstance->ClientApp()->UnregisterDownload( this ); 
                     return;
                     }
                 }
@@ -625,8 +628,6 @@
                 if( iPDClAppInstance )
                     {
                     SetDownloadStatus( EHttpProgNone, EHttpDlDeleting );
-                    //Deref Master Client Instance
-                    aClAppInstance->ClientApp()->UnregisterDownload( this );                    
                     return;
                     }
                 }        
@@ -672,7 +673,7 @@
 	        CLOG_WRITE("Keep file");
 	        closeOp = CHttpStorage::EKeepFile;
 	        }
-    
+	        
 	if( iStorage->RFileSetByClient())
 	    {
 	    TBool pausable;
@@ -682,6 +683,7 @@
             CLOG_WRITE("Keep file");
 	        closeOp = CHttpStorage::EKeepFile;
             }
+		
 	    }
     if( iCodDlData )
 	    {
@@ -721,7 +723,7 @@
     	iStorage->CloseDestinationFile( closeOp );
     	}
     // when delete there's no store -> no leave
-    aClAppInstance->ClientApp()->UnregisterDownload( this ); 
+    //  aClAppInstance->ClientApp()->UnregisterDownload( this ); 
     }
 
 
@@ -7025,6 +7027,9 @@
 
 	LOGGER_ENTERFN( "CHttpDownload::NotifyMediaGalleryL" );
     CLOG_WRITE_1(" notifying Gallery and DcfReposory about move for: %S",&aFileName);
+
+#ifdef BRDO_APP_GALLERY_SUPPORTED_FF    
+    
     //
     // Notify Media Gallery about new media file
     CMGXFileManager* mgFileManager = MGXFileManagerFactory::NewFileManagerL(
@@ -7039,6 +7044,8 @@
         TRAP_IGNORE( mgFileManager->UpdateL() );
         }
     CleanupStack::PopAndDestroy( mgFileManager );
+    
+#endif    
     //
     // Notify DCF repository
     TRAP_IGNORE( UpdateDCFRepositoryL( aFileName ) );