browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrClntSubSession.cpp
branchRCL_3
changeset 49 919f36ff910f
parent 48 79859ed3eea9
equal deleted inserted replaced
48:79859ed3eea9 49:919f36ff910f
    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;
    43 
    43 
   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         TBool   iRemovableDest;
   255         TInt32   iDestMemType;
   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        	     iRemovableDest = aValue;
   403        	     iDestMemType = (aValue) ? KDriveAttRemovable : KDriveAttLocal;
   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             }
   475             
   480             
   476         default:
   481         default:
   477             break;
   482             break;
   478         }
   483         }
   479     }
   484     }
   665             }
   670             }
   666             break;
   671             break;
   667                   
   672                   
   668 		case EDlAttrDestRemovable:
   673 		case EDlAttrDestRemovable:
   669             {
   674             {
   670        	    aValue = iRemovableDest ;
   675        	    aValue = (KDriveAttRemovable == iDestMemType) ? ETrue : EFalse ;
   671             }
   676             }
   672             break;    
   677             break;    
   673         default:
   678         default:
   674             {
   679             {
   675             ret = KErrNotFound;
   680             ret = KErrNotFound;
   724             }
   729             }
   725             break;
   730             break;
   726    
   731    
   727         case EDlAttrDestRemovable:
   732         case EDlAttrDestRemovable:
   728             {
   733             {
   729             aValue = mediaData->DesRemovable();
   734             aValue = ( KDriveAttRemovable == mediaData->DesRemovable()) ? ETrue : EFalse ;
   730             }
   735             }
   731             break;
   736             break;
   732                 
   737                 
   733         default:
   738         default:
   734             {
   739             {
   803             {
   808             {
   804             aValue = iActiveDownload;
   809             aValue = iActiveDownload;
   805             }
   810             }
   806             break;
   811             break;
   807             
   812             
       
   813         case EDlAttrDestRemovable:
       
   814             {
       
   815             aValue = iDestMemType ;
       
   816             }
       
   817             break;            
       
   818             
   808         default:
   819         default:
   809             {
   820             {
   810             ret = KErrNotFound;
   821             ret = KErrNotFound;
   811             }
   822             }
   812             break;
   823             break;
   879             break;
   890             break;
   880 
   891 
   881         case EDlAttrMethod:
   892         case EDlAttrMethod:
   882             {
   893             {
   883             aValue = mediaData->Method();
   894             aValue = mediaData->Method();
       
   895             }
       
   896             break;
       
   897             
       
   898         case EDlAttrDestRemovable:
       
   899             {
       
   900             aValue = mediaData->DesRemovable();
   884             }
   901             }
   885             break;
   902             break;
   886 
   903 
   887         default:
   904         default:
   888             {
   905             {
  1989     
  2006     
  1990     TBool bPausable;
  2007     TBool bPausable;
  1991     GetBoolAttribute(EDlAttrPausable, bPausable);
  2008     GetBoolAttribute(EDlAttrPausable, bPausable);
  1992     iDlExtension->SetBoolAttribute( EDlAttrPausable, bPausable );
  2009     iDlExtension->SetBoolAttribute( EDlAttrPausable, bPausable );
  1993     
  2010     
  1994     TBool bRemovableDest;
  2011     TInt32 removableDestStatus;
  1995     GetBoolAttribute(EDlAttrDestRemovable, bRemovableDest);
  2012     GetIntAttribute(EDlAttrDestRemovable, removableDestStatus);
  1996     iDlExtension->SetBoolAttribute( EDlAttrDestRemovable, bRemovableDest );
  2013     iDlExtension->SetIntAttribute( EDlAttrDestRemovable, removableDestStatus );
  1997     
  2014     
  1998     //    
  2015     //    
  1999         
  2016         
  2000     iDlExtension->SetIntAttribute(EDlAttrActiveDownload, KNonMoIndex);
  2017     iDlExtension->SetIntAttribute(EDlAttrActiveDownload, KNonMoIndex);
  2001 
  2018 
  2718     	if(!iDlExtension)
  2735     	if(!iDlExtension)
  2719     		{
  2736     		{
  2720     		return KErrGeneral;
  2737     		return KErrGeneral;
  2721     		}
  2738     		}
  2722     		iDlExtension->SetBoolAttribute( aAttribute, aValue);
  2739     		iDlExtension->SetBoolAttribute( aAttribute, aValue);
  2723     		return;
  2740     		return KErrNone;
  2724     	}
  2741     	}
  2725     	
  2742     	
  2726 	if (aAttribute == EDlAttrProgressive)
  2743 	if (aAttribute == EDlAttrProgressive)
  2727 	{
  2744 	{
  2728 		if (iCodDownload)
  2745 		if (iCodDownload)