browserutilities/downloadmgr/DownloadMgrUiLib/Src/CUserInteractionsUtils.cpp
changeset 8 7c90e6132015
parent 0 dd21522fd290
child 16 a359256acfc6
--- a/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CUserInteractionsUtils.cpp	Mon Mar 30 12:54:55 2009 +0300
+++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/CUserInteractionsUtils.cpp	Fri May 08 08:25:06 2009 +0300
@@ -18,6 +18,7 @@
 
 
 // INCLUDE FILES
+#include <platform/mw/Browser_platform_variant.hrh>
 #include    "CUserInteractionsUtils.h"
 #include    "MDownloadHandlerObserver.h"
 #include    "CDownloadMgrUiBase.h"
@@ -56,8 +57,11 @@
 #include    <rconnmon.h>
 #include    <DcfEntry.h>
 #include    <DcfRep.h>
+
+#ifdef BRDO_APP_GALLERY_SUPPORTED_FF
 #include    <MGXFileManagerFactory.h>
 #include    <CMGXFileManager.h>
+#endif
 
 // LOCAL CONSTANTS AND MACROS
 const TInt KErrorUiHttpStatusBase = -25000;
@@ -906,9 +910,13 @@
 	   
         if(iCodDownload)
 			{
+			
+			#ifdef BRDO_APP_GALLERY_SUPPORTED_FF
 			CMGXFileManager* mgFileManager = MGXFileManagerFactory::NewFileManagerL(
 	        CEikonEnv::Static()->FsSession() );
 	        
+	        #endif
+	        
 	        //Assume that all files to be deleted are valid.
 	        TBool fileNotFound = EFalse;
 	        
@@ -930,6 +938,8 @@
                     }
 
                 rfs.Delete( fileNamePtr );
+                
+                #ifdef BRDO_APP_GALLERY_SUPPORTED_FF
                 // Notify Media Gallery about new media file
                 if( fileNamePtr.Length() > 0 )
                    {
@@ -940,11 +950,23 @@
                    {
                    TRAP_IGNORE( mgFileManager->UpdateL() );
                    }
+                 
+                 #else
+                    if( fileNamePtr.Length() > 0 )
+                   {
+                   TRAP_IGNORE( UpdateDCFRepositoryL( fileNamePtr ) );
+                   }
+                  
+                 #endif  
+                   
                 CleanupStack::PopAndDestroy( &rfs );
                 CleanupStack::PopAndDestroy( fileName );    
                 }
+                
+                #ifdef BRDO_APP_GALLERY_SUPPORTED_FF
                 delete mgFileManager;
                 mgFileManager = NULL;
+                #endif
                 
                 //Inform the user that atleast one file not found.	
 	   		    if(fileNotFound)
@@ -1754,13 +1776,14 @@
                 (
                     appArcSession.StartDocument( *param, pdPlayerUid, id )
                 );
-            if( aProgressively )
-                {
-                User::LeaveIfError( aDownload.SetIntAttribute( EDlAttrActivePlayedDownload, activeDownloadID ) );
-                }            
+                     
             CleanupStack::PopAndDestroy( &appArcSession );
             CleanupStack::PopAndDestroy( param );
             }
+        if( aProgressively )
+            {
+            User::LeaveIfError( aDownload.SetIntAttribute( EDlAttrActivePlayedDownload, activeDownloadID ) );
+            }   
 
         CleanupStack::PopAndDestroy( param8 );
 		CleanupStack::PopAndDestroy( fileName );