codhandler/codeng/src/CodEngBase.cpp
changeset 10 a359256acfc6
parent 0 dd21522fd290
child 11 c8a366e56285
equal deleted inserted replaced
5:10e98eab6f85 10:a359256acfc6
  1836             User::Leave( KErrCodInsufficientSpace );
  1836             User::Leave( KErrCodInsufficientSpace );
  1837             }
  1837             }
  1838 #endif
  1838 #endif
  1839         }
  1839         }
  1840 
  1840 
  1841 #ifdef __SYNCML_DM_FOTA
       
  1842     if ( fota )
       
  1843         {
       
  1844         // Transient FOTA session is used to check store space -> waste.
       
  1845         // Pre-allocate FOTA saver to avoid this (??) makes the saver's
       
  1846         // lifespan hard to follow, error-prone. TODO (??)
       
  1847         CLOG(( ECodEng, 2, _L("  FOTA check (%d)"), size ));
       
  1848         RFotaEngineSession fotaEng;
       
  1849         CleanupClosePushL<RFotaEngineSession>( fotaEng );
       
  1850         fotaEng.OpenL();
       
  1851         if ( !fotaEng.IsPackageStoreSizeAvailable( size ) )
       
  1852             {
       
  1853             User::Leave( KErrCodInsufficientSpace );
       
  1854             }
       
  1855         CleanupStack::PopAndDestroy( &fotaEng );
       
  1856         }
       
  1857 #endif /*def __SYNCML_DM_FOTA */
       
  1858 
       
  1859 	//When reached here, it is assured that capability check is done successfully
  1841 	//When reached here, it is assured that capability check is done successfully
  1860 	//for the active download.
  1842 	//for the active download.
  1861 	//Content type check is done for this track
  1843 	//Content type check is done for this track
  1862 	iContentTypeCheck = ETrue;
  1844 	iContentTypeCheck = ETrue;
  1863 	
  1845 	
  1878     	{
  1860     	{
  1879     	return NULL;
  1861     	return NULL;
  1880     	}
  1862     	}
  1881     
  1863     
  1882 // DD1 and DD2 cases
  1864 // DD1 and DD2 cases
  1883     if (( aType.Find( KOma2TriggerContentType ) != KErrNotFound) || ( aType.Find( KDd2DataType ) != KErrNotFound )|| ( aType.Find( KOma1WbxmlRoContentType ) != KErrNotFound ))
  1865     if (( aType.Find( KOma2TriggerContentType ) != KErrNotFound) || ( aType.Find( KDd2DataType ) != KErrNotFound )|| ( aType.Find( KOma1WbxmlRoContentType ) != KErrNotFound )|| ( aType.Find( KOma1XmlRoContentType ) != KErrNotFound ))
  1884         {
  1866         {
  1885         iSaver = CRoapSaver::NewL( aType, iRoapData, iProgress, KRoapProgressMax, (*iData)[iData->ActiveDownload()]->iTempPath, (*iData)[iData->ActiveDownload()]->iRootPath, KNullDesC());
  1867         iSaver = CRoapSaver::NewL( aType, iRoapData, iProgress, KRoapProgressMax, (*iData)[iData->ActiveDownload()]->iTempPath, (*iData)[iData->ActiveDownload()]->iRootPath, KNullDesC());
  1886         iSaver->SetObserver( iObserver );
  1868         iSaver->SetObserver( iObserver );
  1887         iSaver->SetParams( iParams );
  1869         iSaver->SetParams( iParams );
  1888         iSaver->SetMaxSize( iData->Size() );
  1870         iSaver->SetMaxSize( iData->Size() );
  2695     	aMOData->SetTempFilenameL( objMedia->FullName() );
  2677     	aMOData->SetTempFilenameL( objMedia->FullName() );
  2696     	}  
  2678     	}  
  2697     
  2679     
  2698     for (TInt type = 0; type < objMedia->TypesCount(); ++type)
  2680     for (TInt type = 0; type < objMedia->TypesCount(); ++type)
  2699         aMOData->AddTypeL( objMedia->Types().MdcaPoint(type) );
  2681         aMOData->AddTypeL( objMedia->Types().MdcaPoint(type) );
       
  2682     aMOData->SetStatusCode( objMedia->iStatusCode );
  2700     }
  2683     }
  2701 
  2684 
  2702 //------------------------------------------------------------------------
  2685 //------------------------------------------------------------------------
  2703 //CCodEngBase::UpdateMediaInfoL
  2686 //CCodEngBase::UpdateMediaInfoL
  2704 //------------------------------------------------------------------------    
  2687 //------------------------------------------------------------------------