ncdengine/engine/transport/src/catalogshttpdownloadmanagerimpl.cpp
changeset 60 245df5276b97
parent 53 ae54820ef82c
child 64 48c14c385b0e
equal deleted inserted replaced
53:ae54820ef82c 60:245df5276b97
    75 CCatalogsHttpDownloadManager::~CCatalogsHttpDownloadManager()
    75 CCatalogsHttpDownloadManager::~CCatalogsHttpDownloadManager()
    76     {
    76     {
    77     DLTRACEIN( ( "" ) );
    77     DLTRACEIN( ( "" ) );
    78 
    78 
    79     Cancel();
    79     Cancel();
    80     iEventQueue.Close();
    80     // HLa iEventQueue.Close();
    81 
    81 
    82     // Release downloads
    82     // Release downloads
    83     TInt count = iDownloads.Count() - 1;
    83     TInt count = iDownloads.Count() - 1;
    84     while( count > -1 )
    84     while( count > -1 )
    85         {
    85         {
   634 //        
   634 //        
   635 void CCatalogsHttpDownloadManager::RestoreDownloadsL()
   635 void CCatalogsHttpDownloadManager::RestoreDownloadsL()
   636     {
   636     {
   637     DLTRACEIN((""));
   637     DLTRACEIN((""));
   638     
   638     
       
   639     const TInt KMaxUrlLength = 2048; // HLa
   639     TBuf8<KMaxUrlLength> url;
   640     TBuf8<KMaxUrlLength> url;
   640     
   641     
   641     
   642     
   642     QList<WRT::Download*> downloads = iDmgr->currentDownloads();
   643     QList<WRT::Download*> downloads = iDmgr->currentDownloads();
   643 
   644 
   690     
   691     
   691 
   692 
   692 // ---------------------------------------------------------------------------
   693 // ---------------------------------------------------------------------------
   693 // Finds the index for the given download in iDownloads
   694 // Finds the index for the given download in iDownloads
   694 // ---------------------------------------------------------------------------
   695 // ---------------------------------------------------------------------------
   695 //            
   696 //   
       
   697 /* HLa
   696 TInt CCatalogsHttpDownloadManager::FindInDownloads( 
   698 TInt CCatalogsHttpDownloadManager::FindInDownloads( 
   697     const RCatalogsHttpOperationArray& aArray,
   699     const RCatalogsHttpOperationArray& aArray,
   698     RHttpDownload* aDownload ) const
   700     RHttpDownload* aDownload ) const
   699     {    
   701     {    
   700     DASSERT( aDownload );
   702     DASSERT( aDownload );
   710             return i;
   712             return i;
   711             }
   713             }
   712         }
   714         }
   713     return KErrNotFound;
   715     return KErrNotFound;
   714     }
   716     }
   715 
   717 */
   716 
   718 
   717 // ---------------------------------------------------------------------------
   719 // ---------------------------------------------------------------------------
   718 // Finds the index for the given download in the given array
   720 // Finds the index for the given download in the given array
   719 // ---------------------------------------------------------------------------
   721 // ---------------------------------------------------------------------------
   720 //            
   722 //            
   832 void CCatalogsHttpDownloadManager::RunL()
   834 void CCatalogsHttpDownloadManager::RunL()
   833     {
   835     {
   834     DLTRACEIN(( "Event queue count: %d", iEventQueue.Count() ));
   836     DLTRACEIN(( "Event queue count: %d", iEventQueue.Count() ));
   835    
   837    
   836     // Handle the event queue 
   838     // Handle the event queue 
       
   839     /* HLa
   837     while ( iEventQueue.Count() ) 
   840     while ( iEventQueue.Count() ) 
   838         {
   841         {
   839         
   842         
   840         TDownloadEvent dlEvent( iEventQueue[0] );
   843         TDownloadEvent dlEvent( iEventQueue[0] );
   841         iEventQueue.Remove( 0 );
   844         iEventQueue.Remove( 0 );
   893                 DLERROR(( "Observer was NULL" ));
   896                 DLERROR(( "Observer was NULL" ));
   894                 User::Leave( eventErr );
   897                 User::Leave( eventErr );
   895                 }
   898                 }
   896             }
   899             }
   897         }
   900         }
       
   901         */
   898     }
   902     }
   899     
   903     
   900     
   904     
   901 void CCatalogsHttpDownloadManager::DoCancel()
   905 void CCatalogsHttpDownloadManager::DoCancel()
   902     {
   906     {
   918     
   922     
   919     
   923     
   920 void CCatalogsHttpDownloadManager::ContinueEventHandling()
   924 void CCatalogsHttpDownloadManager::ContinueEventHandling()
   921     {
   925     {
   922     DLTRACEIN((""));
   926     DLTRACEIN((""));
       
   927     /* HLa
   923     if( iEventQueue.Count() && !IsActive() ) 
   928     if( iEventQueue.Count() && !IsActive() ) 
   924         {
   929         {
   925         DLTRACE(("More events to handle"));
   930         DLTRACE(("More events to handle"));
   926         iStatus = KRequestPending;
   931         iStatus = KRequestPending;
   927         SetActive();
   932         SetActive();
   928         TRequestStatus* status = &iStatus;
   933         TRequestStatus* status = &iStatus;
   929         User::RequestComplete( status, KErrNone );
   934         User::RequestComplete( status, KErrNone );
   930         }
   935         }
   931     }
   936         */
   932     
   937     }
   933     
   938 
       
   939     
       
   940     /* HLa
   934 void CCatalogsHttpDownloadManager::RemoveUnhandledEvents( 
   941 void CCatalogsHttpDownloadManager::RemoveUnhandledEvents( 
   935     const TDownloadEvent& aEvent )
   942     const TDownloadEvent& aEvent )
   936     {
   943     {
   937     DLTRACEIN((""));
   944     DLTRACEIN((""));
   938     TInt index = iEventQueue.Count();
   945     TInt index = iEventQueue.Count();
   943             DLTRACE(("Removing unhandled event"));
   950             DLTRACE(("Removing unhandled event"));
   944             iEventQueue.Remove( index );
   951             iEventQueue.Remove( index );
   945             }        
   952             }        
   946         }    
   953         }    
   947     }
   954     }
   948 
   955 */
   949 
   956 
       
   957 /* HLa
   950 void CCatalogsHttpDownloadManager::RemoveUnhandledProgressEvents( 
   958 void CCatalogsHttpDownloadManager::RemoveUnhandledProgressEvents( 
   951     const TDownloadEvent& aEvent )
   959     const TDownloadEvent& aEvent )
   952     {
   960     {
   953     DLTRACEIN((""));
   961     DLTRACEIN((""));
   954     TInt index = iEventQueue.Count();
   962     TInt index = iEventQueue.Count();
   961             iEventQueue.Remove( index );
   969             iEventQueue.Remove( index );
   962             break;
   970             break;
   963             }        
   971             }        
   964         }    
   972         }    
   965     }
   973     }
   966 
   974 */
   967 
   975 
   968 TInt CCatalogsHttpDownloadManager::NewDownloadId()
   976 TInt CCatalogsHttpDownloadManager::NewDownloadId()
   969     {
   977     {
   970     return ++iCurrentDlId;
   978     return ++iCurrentDlId;
   971     }
   979     }