browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrClntSubSession.cpp
changeset 65 5bfc169077b2
parent 38 6297cdf66332
child 68 92a765b5b3e7
equal deleted inserted replaced
42:d39add9822e2 65:5bfc169077b2
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 // INCLUDE FILES
    20 // INCLUDE FILES
    21 #include "DownloadMgrLogger.h"
    21 #include "DownloadMgrLogger.h"
    22 #include <downloadmgrclient.h>
    22 #include "DownloadMgrClient.h"
    23 #include "DownloadMgrServer.h"
    23 #include "DownloadMgrServer.h"
    24 #include "DownloadMgrHandler.h"
    24 #include "DownloadMgrHandler.h"
    25 #include "DownloadMgrStart.h"
    25 #include "DownloadMgrStart.h"
    26 #include "DownloadMgrDef.h"
    26 #include "DownloadMgrDef.h"
    27 #include "DownloadMgrTransObserver.h"
    27 #include "DownloadMgrTransObserver.h"
    29 #include "DownloadMgrDefAttrib.h"
    29 #include "DownloadMgrDefAttrib.h"
    30 #include "DownloadDataServ.h"
    30 #include "DownloadDataServ.h"
    31 
    31 
    32 #include <hash.h>
    32 #include <hash.h>
    33 #include <e32svr.h>
    33 #include <e32svr.h>
    34 #include <coddownload.h>
    34 #include <CodDownload.h>
    35 #include <AiwGenericParam.h>
    35 #include <AiwGenericParam.h>
    36 #include <eikenv.h>
    36 #include <eikenv.h>
    37 #include <httpfiltercommonstringsext.h>
    37 #include <HttpFilterCommonStringsExt.h>
    38 #include <EscapeUtils.h>
    38 #include <EscapeUtils.h>
    39 
    39 
    40 // CONSTANTS
    40 // CONSTANTS
    41 _LIT8( KTransactionCallback, "TransactionCallback" );
    41 _LIT8( KTransactionCallback, "TransactionCallback" );
    42 const TInt KInitPrevCodEvent = -1;
    42 const TInt KInitPrevCodEvent = -1;
   250         // EDlAttrProgressive
   250         // EDlAttrProgressive
   251         TBool   iProgressiveDownload;  
   251         TBool   iProgressiveDownload;  
   252         // EDlAttrPausable
   252         // EDlAttrPausable
   253         TBool   iPausable;             
   253         TBool   iPausable;             
   254         // EDlAttrDestRemovable
   254         // EDlAttrDestRemovable
   255         TInt32   iDestMemType;
   255         TBool   iRemovableDest;
   256 
   256 
   257         //  EDlAttrState THttpDownloadState
   257         //  EDlAttrState THttpDownloadState
   258          TInt32 iDlState;
   258          TInt32 iDlState;
   259         // EDlAttrProgressState
   259         // EDlAttrProgressState
   260         TInt32  iProgState;
   260         TInt32  iProgState;
   398             }
   398             }
   399             break;
   399             break;
   400                   
   400                   
   401        case EDlAttrDestRemovable:
   401        case EDlAttrDestRemovable:
   402             {
   402             {
   403        	     iDestMemType = (aValue) ? KDriveAttRemovable : KDriveAttLocal;
   403        	     iRemovableDest = aValue;
   404             }
   404             }
   405             
   405             
   406         default:
   406         default:
   407             {
   407             {
   408             }
   408             }
   470         case EDlAttrActiveDownload:  
   470         case EDlAttrActiveDownload:  
   471             {
   471             {
   472             iActiveDownload = aValue;
   472             iActiveDownload = aValue;
   473             }
   473             }
   474             break;
   474             break;
   475             
       
   476         case EDlAttrDestRemovable:
       
   477             {
       
   478             iDestMemType = aValue;
       
   479             }
       
   480             
   475             
   481         default:
   476         default:
   482             break;
   477             break;
   483         }
   478         }
   484     }
   479     }
   670             }
   665             }
   671             break;
   666             break;
   672                   
   667                   
   673 		case EDlAttrDestRemovable:
   668 		case EDlAttrDestRemovable:
   674             {
   669             {
   675        	    aValue = (KDriveAttRemovable == iDestMemType) ? ETrue : EFalse ;
   670        	    aValue = iRemovableDest ;
   676             }
   671             }
   677             break;    
   672             break;    
   678         default:
   673         default:
   679             {
   674             {
   680             ret = KErrNotFound;
   675             ret = KErrNotFound;
   729             }
   724             }
   730             break;
   725             break;
   731    
   726    
   732         case EDlAttrDestRemovable:
   727         case EDlAttrDestRemovable:
   733             {
   728             {
   734             aValue = ( KDriveAttRemovable == mediaData->DesRemovable()) ? ETrue : EFalse ;
   729             aValue = mediaData->DesRemovable();
   735             }
   730             }
   736             break;
   731             break;
   737                 
   732                 
   738         default:
   733         default:
   739             {
   734             {
   808             {
   803             {
   809             aValue = iActiveDownload;
   804             aValue = iActiveDownload;
   810             }
   805             }
   811             break;
   806             break;
   812             
   807             
   813         case EDlAttrDestRemovable:
       
   814             {
       
   815             aValue = iDestMemType ;
       
   816             }
       
   817             break;            
       
   818             
       
   819         default:
   808         default:
   820             {
   809             {
   821             ret = KErrNotFound;
   810             ret = KErrNotFound;
   822             }
   811             }
   823             break;
   812             break;
   890             break;
   879             break;
   891 
   880 
   892         case EDlAttrMethod:
   881         case EDlAttrMethod:
   893             {
   882             {
   894             aValue = mediaData->Method();
   883             aValue = mediaData->Method();
   895             }
       
   896             break;
       
   897             
       
   898         case EDlAttrDestRemovable:
       
   899             {
       
   900             aValue = mediaData->DesRemovable();
       
   901             }
   884             }
   902             break;
   885             break;
   903 
   886 
   904         default:
   887         default:
   905             {
   888             {
  2006     
  1989     
  2007     TBool bPausable;
  1990     TBool bPausable;
  2008     GetBoolAttribute(EDlAttrPausable, bPausable);
  1991     GetBoolAttribute(EDlAttrPausable, bPausable);
  2009     iDlExtension->SetBoolAttribute( EDlAttrPausable, bPausable );
  1992     iDlExtension->SetBoolAttribute( EDlAttrPausable, bPausable );
  2010     
  1993     
  2011     TInt32 removableDestStatus;
  1994     TBool bRemovableDest;
  2012     GetIntAttribute(EDlAttrDestRemovable, removableDestStatus);
  1995     GetBoolAttribute(EDlAttrDestRemovable, bRemovableDest);
  2013     iDlExtension->SetIntAttribute( EDlAttrDestRemovable, removableDestStatus );
  1996     iDlExtension->SetBoolAttribute( EDlAttrDestRemovable, bRemovableDest );
  2014     
  1997     
  2015     //    
  1998     //    
  2016         
  1999         
  2017     iDlExtension->SetIntAttribute(EDlAttrActiveDownload, KNonMoIndex);
  2000     iDlExtension->SetIntAttribute(EDlAttrActiveDownload, KNonMoIndex);
  2018 
  2001