browserutilities/downloadmgr/DownloadMgrUiLib/Src/CDownloadMgrUiUserInteractions.cpp
equal
deleted
inserted
replaced
16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 |
19 |
20 // INCLUDE FILES |
20 // INCLUDE FILES |
21 #include "CDownloadMgrUiUserInteractions.h" |
21 #include "cdownloadmgruiuserinteractions.h" |
22 #include "CUserInteractionsUtils.h" |
22 #include "CUserInteractionsUtils.h" |
23 #include "CDownloadMgrUiDownloadsList.h" |
23 #include "cdownloadmgruidownloadslist.h" |
24 #include "CDownloadMgrUiLibRegistry.h" |
24 #include "cdownloadmgruilibregistry.h" |
25 #include "UserInteractionsEventHandler.h" |
25 #include "UserInteractionsEventHandler.h" |
26 #include "AsyncEventHandlerArray.h" |
26 #include "AsyncEventHandlerArray.h" |
27 #include "UiLibLogger.h" |
27 #include "UiLibLogger.h" |
28 #include "DMgrUiLibPanic.h" |
28 #include "DMgrUiLibPanic.h" |
29 #include "MDownloadHandlerObserver.h" |
29 #include "MDownloadHandlerObserver.h" |
910 THttpDownloadState state; |
910 THttpDownloadState state; |
911 const CDownloadArray& downloads = iRegistryModel.DownloadMgr().CurrentDownloads(); |
911 const CDownloadArray& downloads = iRegistryModel.DownloadMgr().CurrentDownloads(); |
912 for( TInt i = 0; i < downloadCnt; ++i ) |
912 for( TInt i = 0; i < downloadCnt; ++i ) |
913 { |
913 { |
914 RHttpDownload* dl = downloads.At(i); // current download |
914 RHttpDownload* dl = downloads.At(i); // current download |
|
915 // we do not have to show the download in case of invalid descriptor |
|
916 HBufC* name = HBufC::NewLC( KMaxUrlLength ); |
|
917 TPtr tempPtr = name->Des(); |
|
918 dl->GetStringAttribute( EDlAttrName, tempPtr ); |
915 err = dl->GetBoolAttribute( EDlAttrPausable, isPausable ); |
919 err = dl->GetBoolAttribute( EDlAttrPausable, isPausable ); |
916 if ( !err ) |
920 if ( !err ) |
917 { |
921 { |
918 err = dl->GetBoolAttribute( EDlAttrHidden, isHidden ); |
922 err = dl->GetBoolAttribute( EDlAttrHidden, isHidden ); |
919 } |
923 } |
936 if ( !err ) |
940 if ( !err ) |
937 { |
941 { |
938 err = dl->GetBoolAttribute( EDlAttrNoMedia, isNoMedia ); |
942 err = dl->GetBoolAttribute( EDlAttrNoMedia, isNoMedia ); |
939 } |
943 } |
940 CLOG_WRITE_FORMAT(" err: %d",err); |
944 CLOG_WRITE_FORMAT(" err: %d",err); |
941 if ( !err && ( !isPausable || isHidden ||isNoMedia || state == EHttpDlMultipleMOCompleted ) ) |
945 if ( !err && ( !isPausable || isHidden ||isNoMedia || state == EHttpDlMultipleMOCompleted || !tempPtr.Length() ) ) |
942 { |
946 { |
943 ++ignoredDownloads; |
947 ++ignoredDownloads; |
944 } |
948 } |
|
949 CleanupStack::PopAndDestroy( name ); // name |
945 } |
950 } |
946 CLOG_WRITE_FORMAT(" downloadCnt: %d",downloadCnt); |
951 CLOG_WRITE_FORMAT(" downloadCnt: %d",downloadCnt); |
947 CLOG_WRITE_FORMAT(" ignoredDownloads: %d",ignoredDownloads); |
952 CLOG_WRITE_FORMAT(" ignoredDownloads: %d",ignoredDownloads); |
948 |
953 |
949 // the new downloadCnt holds only those downloads, that count from the |
954 // the new downloadCnt holds only those downloads, that count from the |