16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 |
19 |
20 // INCLUDE FILES |
20 // INCLUDE FILES |
|
21 #include <platform/mw/Browser_platform_variant.hrh> |
21 #include "CUserInteractionsUtils.h" |
22 #include "CUserInteractionsUtils.h" |
22 #include "MDownloadHandlerObserver.h" |
23 #include "MDownloadHandlerObserver.h" |
23 #include "CDownloadMgrUiBase.h" |
24 #include "CDownloadMgrUiBase.h" |
24 #include "CDownloadMgrUiLibRegistry.h" |
25 #include "CDownloadMgrUiLibRegistry.h" |
25 #include "CDownloadMgrUiDownloadsList.h" |
26 #include "CDownloadMgrUiDownloadsList.h" |
54 #include <etelmm.h> |
55 #include <etelmm.h> |
55 #include <MmTsy_names.h> |
56 #include <MmTsy_names.h> |
56 #include <rconnmon.h> |
57 #include <rconnmon.h> |
57 #include <DcfEntry.h> |
58 #include <DcfEntry.h> |
58 #include <DcfRep.h> |
59 #include <DcfRep.h> |
|
60 |
|
61 #ifdef BRDO_APP_GALLERY_SUPPORTED_FF |
59 #include <MGXFileManagerFactory.h> |
62 #include <MGXFileManagerFactory.h> |
60 #include <CMGXFileManager.h> |
63 #include <CMGXFileManager.h> |
|
64 #endif |
61 |
65 |
62 // LOCAL CONSTANTS AND MACROS |
66 // LOCAL CONSTANTS AND MACROS |
63 const TInt KErrorUiHttpStatusBase = -25000; |
67 const TInt KErrorUiHttpStatusBase = -25000; |
64 const TInt KMinimumSoftNotePriority = 1000; |
68 const TInt KMinimumSoftNotePriority = 1000; |
65 #define GLOBAL_HTTP_ERROR( err ) ( KErrorUiHttpStatusBase - err ) |
69 #define GLOBAL_HTTP_ERROR( err ) ( KErrorUiHttpStatusBase - err ) |
904 aDownload.GetBoolAttribute( EDlAttrCodDownload,iCodDownload ); |
908 aDownload.GetBoolAttribute( EDlAttrCodDownload,iCodDownload ); |
905 |
909 |
906 |
910 |
907 if(iCodDownload) |
911 if(iCodDownload) |
908 { |
912 { |
|
913 |
|
914 #ifdef BRDO_APP_GALLERY_SUPPORTED_FF |
909 CMGXFileManager* mgFileManager = MGXFileManagerFactory::NewFileManagerL( |
915 CMGXFileManager* mgFileManager = MGXFileManagerFactory::NewFileManagerL( |
910 CEikonEnv::Static()->FsSession() ); |
916 CEikonEnv::Static()->FsSession() ); |
|
917 |
|
918 #endif |
911 |
919 |
912 //Assume that all files to be deleted are valid. |
920 //Assume that all files to be deleted are valid. |
913 TBool fileNotFound = EFalse; |
921 TBool fileNotFound = EFalse; |
914 |
922 |
915 for(TInt i = 1; i <= numMediaObjects; i++) |
923 for(TInt i = 1; i <= numMediaObjects; i++) |
928 //Found out that at least one file is not found |
936 //Found out that at least one file is not found |
929 fileNotFound =ETrue; |
937 fileNotFound =ETrue; |
930 } |
938 } |
931 |
939 |
932 rfs.Delete( fileNamePtr ); |
940 rfs.Delete( fileNamePtr ); |
|
941 |
|
942 #ifdef BRDO_APP_GALLERY_SUPPORTED_FF |
933 // Notify Media Gallery about new media file |
943 // Notify Media Gallery about new media file |
934 if( fileNamePtr.Length() > 0 ) |
944 if( fileNamePtr.Length() > 0 ) |
935 { |
945 { |
936 TRAP_IGNORE( mgFileManager->UpdateL( fileNamePtr ) ); |
946 TRAP_IGNORE( mgFileManager->UpdateL( fileNamePtr ) ); |
937 TRAP_IGNORE( UpdateDCFRepositoryL( fileNamePtr ) ); |
947 TRAP_IGNORE( UpdateDCFRepositoryL( fileNamePtr ) ); |
938 } |
948 } |
939 else |
949 else |
940 { |
950 { |
941 TRAP_IGNORE( mgFileManager->UpdateL() ); |
951 TRAP_IGNORE( mgFileManager->UpdateL() ); |
942 } |
952 } |
|
953 |
|
954 #else |
|
955 if( fileNamePtr.Length() > 0 ) |
|
956 { |
|
957 TRAP_IGNORE( UpdateDCFRepositoryL( fileNamePtr ) ); |
|
958 } |
|
959 |
|
960 #endif |
|
961 |
943 CleanupStack::PopAndDestroy( &rfs ); |
962 CleanupStack::PopAndDestroy( &rfs ); |
944 CleanupStack::PopAndDestroy( fileName ); |
963 CleanupStack::PopAndDestroy( fileName ); |
945 } |
964 } |
|
965 |
|
966 #ifdef BRDO_APP_GALLERY_SUPPORTED_FF |
946 delete mgFileManager; |
967 delete mgFileManager; |
947 mgFileManager = NULL; |
968 mgFileManager = NULL; |
|
969 #endif |
948 |
970 |
949 //Inform the user that atleast one file not found. |
971 //Inform the user that atleast one file not found. |
950 if(fileNotFound) |
972 if(fileNotFound) |
951 { |
973 { |
952 HBufC* infoPrompt = StringLoader::LoadLC( R_DMUL_ERROR_FILE_NOT_FOUND); |
974 HBufC* infoPrompt = StringLoader::LoadLC( R_DMUL_ERROR_FILE_NOT_FOUND); |
1752 TThreadId id; |
1774 TThreadId id; |
1753 User::LeaveIfError |
1775 User::LeaveIfError |
1754 ( |
1776 ( |
1755 appArcSession.StartDocument( *param, pdPlayerUid, id ) |
1777 appArcSession.StartDocument( *param, pdPlayerUid, id ) |
1756 ); |
1778 ); |
1757 if( aProgressively ) |
1779 |
1758 { |
|
1759 User::LeaveIfError( aDownload.SetIntAttribute( EDlAttrActivePlayedDownload, activeDownloadID ) ); |
|
1760 } |
|
1761 CleanupStack::PopAndDestroy( &appArcSession ); |
1780 CleanupStack::PopAndDestroy( &appArcSession ); |
1762 CleanupStack::PopAndDestroy( param ); |
1781 CleanupStack::PopAndDestroy( param ); |
1763 } |
1782 } |
|
1783 if( aProgressively ) |
|
1784 { |
|
1785 User::LeaveIfError( aDownload.SetIntAttribute( EDlAttrActivePlayedDownload, activeDownloadID ) ); |
|
1786 } |
1764 |
1787 |
1765 CleanupStack::PopAndDestroy( param8 ); |
1788 CleanupStack::PopAndDestroy( param8 ); |
1766 CleanupStack::PopAndDestroy( fileName ); |
1789 CleanupStack::PopAndDestroy( fileName ); |
1767 CleanupStack::PopAndDestroy( genParList ); |
1790 CleanupStack::PopAndDestroy( genParList ); |
1768 } |
1791 } |