33 |
33 |
34 #include <f32file.h> |
34 #include <f32file.h> |
35 #include <HttpDownloadMgrCommon.h> |
35 #include <HttpDownloadMgrCommon.h> |
36 #include <DocumentHandler.h> |
36 #include <DocumentHandler.h> |
37 #include <pathinfo.h> |
37 #include <pathinfo.h> |
|
38 |
|
39 #ifdef BRDO_APP_GALLERY_SUPPORTED_FF |
38 #include <MGXFileManagerFactory.h> |
40 #include <MGXFileManagerFactory.h> |
39 #include <CMGXFileManager.h> |
41 #include <CMGXFileManager.h> |
|
42 #endif |
|
43 |
40 #include <DcfEntry.h> |
44 #include <DcfEntry.h> |
41 #include <DcfRep.h> |
45 #include <DcfRep.h> |
42 |
46 |
43 const TInt KDefaultStorageBufferSize = 128 * 1024; |
47 const TInt KDefaultStorageBufferSize = 128 * 1024; |
44 const TInt KDefaultStorageBufferSizePD = 16 * 1024; |
48 const TInt KDefaultStorageBufferSizePD = 16 * 1024; |
601 // CFileSaver::UpdateMediaGalleryIfNeededL() |
605 // CFileSaver::UpdateMediaGalleryIfNeededL() |
602 // Calls MediaGallery Update method so that media gallery |
606 // Calls MediaGallery Update method so that media gallery |
603 // knows update its view. |
607 // knows update its view. |
604 // --------------------------------------------------------- |
608 // --------------------------------------------------------- |
605 // |
609 // |
|
610 |
|
611 |
606 void CFileSaver::UpdateMediaGalleryIfNeededL( const TDesC& aFileName ) |
612 void CFileSaver::UpdateMediaGalleryIfNeededL( const TDesC& aFileName ) |
607 { |
613 { |
|
614 #ifdef BRDO_APP_GALLERY_SUPPORTED_FF |
608 CMGXFileManager* fm = MGXFileManagerFactory::NewFileManagerL( iFs ); |
615 CMGXFileManager* fm = MGXFileManagerFactory::NewFileManagerL( iFs ); |
609 CleanupStack::PushL(fm); |
616 CleanupStack::PushL(fm); |
610 fm->UpdateL(aFileName); |
617 fm->UpdateL(aFileName); |
611 CleanupStack::PopAndDestroy(); // fm |
618 CleanupStack::PopAndDestroy(); // fm |
|
619 #endif |
612 } |
620 } |
613 // --------------------------------------------------------- |
621 // --------------------------------------------------------- |
614 // CFileSaver::NotifyMediaGalleryL() |
622 // CFileSaver::NotifyMediaGalleryL() |
615 // Notify media gallery about the new file. |
623 // Notify media gallery about the new file. |
616 // --------------------------------------------------------- |
624 // --------------------------------------------------------- |
617 // |
625 // |
618 void CFileSaver::NotifyMediaGalleryL( const TDesC& aFileName ) |
626 void CFileSaver::NotifyMediaGalleryL( const TDesC& aFileName ) |
619 { |
627 { |
|
628 #ifdef BRDO_APP_GALLERY_SUPPORTED_FF |
|
629 |
620 CMGXFileManager* mgFileManager = MGXFileManagerFactory::NewFileManagerL( iFs ); |
630 CMGXFileManager* mgFileManager = MGXFileManagerFactory::NewFileManagerL( iFs ); |
621 CleanupStack::PushL( mgFileManager ); |
631 CleanupStack::PushL( mgFileManager ); |
622 |
632 |
623 TRAP_IGNORE( mgFileManager->UpdateL() ); |
633 TRAP_IGNORE( mgFileManager->UpdateL() ); |
624 CleanupStack::PopAndDestroy( mgFileManager ); |
634 CleanupStack::PopAndDestroy( mgFileManager ); |
625 |
635 |
626 // Notify Media Gallery |
636 // Notify Media Gallery |
627 TRAP_IGNORE( UpdateMediaGalleryIfNeededL( aFileName ) ); |
637 TRAP_IGNORE( UpdateMediaGalleryIfNeededL( aFileName ) ); |
|
638 |
|
639 #endif |
|
640 |
628 |
641 |
629 // Notify DCF repository |
642 // Notify DCF repository |
630 TRAP_IGNORE( UpdateDCFRepositoryL( aFileName ) ); |
643 TRAP_IGNORE( UpdateDCFRepositoryL( aFileName ) ); |
631 } |
644 } |
632 // --------------------------------------------------------- |
645 // --------------------------------------------------------- |