engine/src/HttpEventHandler.cpp
branchsymbian1
changeset 336 3d6c1417e8bd
parent 284 69385a7c9810
equal deleted inserted replaced
296:80f1da5ac28b 336:3d6c1417e8bd
    21 #include <httperr.h>
    21 #include <httperr.h>
    22 #include <sysutil.h>
    22 #include <sysutil.h>
    23 #include "HttpEventHandler.h"
    23 #include "HttpEventHandler.h"
    24 #include "bautils.h"
    24 #include "bautils.h"
    25 #include "Httpclient.h"
    25 #include "Httpclient.h"
       
    26 #include "Podcatcher.pan"
    26 
    27 
    27 const TInt64 KMinDiskSpace = 1024 * 1024; // at least 1 MB must remain
    28 const TInt64 KMinDiskSpace = 1024 * 1024; // at least 1 MB must remain
    28 
    29 
    29 void CHttpEventHandler::ConstructL()
    30 void CHttpEventHandler::ConstructL()
    30 	{
    31 	{
    59 	return me;
    60 	return me;
    60 	}
    61 	}
    61 
    62 
    62 void CHttpEventHandler::MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent)
    63 void CHttpEventHandler::MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent)
    63 	{
    64 	{
    64 	DP1("CHttpEventHandler::MHFRunL, aEvent.iStatus=%d", aEvent.iStatus);
    65 	//DP1("CHttpEventHandler::MHFRunL, aEvent.iStatus=%d", aEvent.iStatus);
    65 	switch (aEvent.iStatus)
    66 	switch (aEvent.iStatus)
    66 		{
    67 		{
    67 		case THTTPEvent::EGotResponseHeaders:
    68 		case THTTPEvent::EGotResponseHeaders:
    68 			{
    69 			{
    69 			// HTTP response headers have been received. We can determine now if there is
    70 			// HTTP response headers have been received. We can determine now if there is
   257 	iContinue = aContinue;
   258 	iContinue = aContinue;
   258 	
   259 	
   259 	switch(fName[0])
   260 	switch(fName[0])
   260 		{
   261 		{
   261 		case 'C':
   262 		case 'C':
       
   263 		case '\\':
   262 			iDriveNo = EDriveC;
   264 			iDriveNo = EDriveC;
   263 			break;
   265 			break;
   264 		case 'E':
   266 		case 'E':
   265 			iDriveNo = EDriveE;
   267 			iDriveNo = EDriveE;
   266 			break;
   268 			break;
   269 			break;
   271 			break;
   270 		case 'G':
   272 		case 'G':
   271 			iDriveNo = EDriveG;
   273 			iDriveNo = EDriveG;
   272 			break;
   274 			break;
   273 		default:
   275 		default:
   274 			iDriveNo = -1;
   276 			Panic(EPodcatcherDownloadDrive);
   275 			break;
   277 			break;
   276 		}
   278 		}
   277 	DP1("iDriveNo set to %d", iDriveNo);
   279 	DP1("iDriveNo set to %d", iDriveNo);
   278 	}
   280 	}
   279 
   281