mmfenh/progressivedownload/ProgressiveDownloadUtility/src/ProgressiveDownloadUtility.cpp
changeset 16 43d09473c595
parent 14 80975da52420
child 22 128eb6a32b84
equal deleted inserted replaced
14:80975da52420 16:43d09473c595
     1 /*
       
     2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Progressive Download Utility  Progressive Download Utility
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include <ProgressiveDownloadUtility.h>
       
    21 #include "PdProperties.h"
       
    22 /**
       
    23 Concrete implementation of the CProgressDownloadUtility API.
       
    24 @see CProgressDownloadUtility
       
    25 */
       
    26 
       
    27 EXPORT_C CProgressiveDownloadUtility* CProgressiveDownloadUtility::NewL()
       
    28 	{
       
    29     CProgressiveDownloadUtility* self = new(ELeave) CProgressiveDownloadUtility();
       
    30 	CleanupStack::PushL(self);
       
    31 
       
    32 	self->iProperties = CPdProperties::NewL();
       
    33 	CleanupStack::Pop(self);
       
    34 	return self;
       
    35 	}
       
    36 
       
    37 EXPORT_C CProgressiveDownloadUtility::~CProgressiveDownloadUtility()
       
    38 	{
       
    39 	#if _DEBUG
       
    40 	  RDebug::Print(_L("CProgressiveDownloadUtility::~CProgressiveDownloadUtility"));
       
    41     #endif
       
    42     delete iProperties;
       
    43 	}
       
    44 
       
    45 void CProgressiveDownloadUtility::ConstructL()
       
    46 	{
       
    47 
       
    48 	}
       
    49 
       
    50 CProgressiveDownloadUtility::CProgressiveDownloadUtility()
       
    51 	{
       
    52 
       
    53 	}
       
    54 
       
    55 EXPORT_C MAudioPdPlayUtility* CProgressiveDownloadUtility::OpenL(const TDesC& aFileName,MAudioPdPlayUtilityCallback& aCallback)
       
    56 	{
       
    57 	#if _DEBUG
       
    58 	  RDebug::Print(_L("CProgressiveDownloadUtility::OpenL by filename"));
       
    59     #endif
       
    60 	return STATIC_CAST(MAudioPdPlayUtility*,iProperties->OpenL(aFileName,aCallback));
       
    61 
       
    62 	}
       
    63 
       
    64 EXPORT_C MAudioPdPlayUtility* CProgressiveDownloadUtility::OpenL(const RFile& aFileHandle,MAudioPdPlayUtilityCallback& aCallback)
       
    65 	{
       
    66 	#if _DEBUG
       
    67 	  RDebug::Print(_L("CProgressiveDownloadUtility::OpenL by filehandle"));
       
    68     #endif
       
    69 	return STATIC_CAST(MAudioPdPlayUtility*,iProperties->OpenL(aFileHandle,aCallback));
       
    70 	}
       
    71 
       
    72 // ENd of File