internetradio2.0/mediaenginesrc/irbuffercontainer.cpp
changeset 0 09774dfdd46b
equal deleted inserted replaced
-1:000000000000 0:09774dfdd46b
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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:  ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "irbuffercontainer.h"
       
    20 #include "irdebug.h"
       
    21 
       
    22 // ============================ MEMBER FUNCTIONS ===============================
       
    23 
       
    24 // ---------------------------------------------------------------------------
       
    25 // Two Phase NewL
       
    26 // returns an instance CIRBufferContainer
       
    27 // Owned by CIRBufferContainer
       
    28 // ---------------------------------------------------------------------------
       
    29 //
       
    30 CIRBufferContainer* CIRBufferContainer::NewL
       
    31 	(TUint8* aAddress,TInt aGranularity)
       
    32 	{
       
    33 	IRLOG_DEBUG( "CIRBufferContainer::NewL" );
       
    34 	CIRBufferContainer *self = 
       
    35 		CIRBufferContainer::NewLC(aAddress,aGranularity);
       
    36 	CleanupStack::Pop(self);
       
    37 	IRLOG_DEBUG( "CIRBufferContainer::NewL - Exiting." );
       
    38 	return self;	
       
    39 	}
       
    40 
       
    41 // ---------------------------------------------------------------------------
       
    42 // Two Phase NewLC
       
    43 // Creates an instance CIRBufferContainer
       
    44 // Owned by CIRBufferContainer
       
    45 // ---------------------------------------------------------------------------
       
    46 //
       
    47 CIRBufferContainer* CIRBufferContainer::NewLC
       
    48 	(TUint8* aAddress,TInt aGranularity)
       
    49 	{
       
    50 	IRLOG_DEBUG( "CIRBufferContainer::NewLC" );
       
    51 	CIRBufferContainer *self = new(ELeave) CIRBufferContainer;
       
    52 	CleanupStack::PushL(self);
       
    53 	self->ConstructL(aAddress,aGranularity);
       
    54 	IRLOG_DEBUG( "CIRBufferContainer::NewLC - Exiting." );
       
    55 	return self;
       
    56 	}
       
    57 	
       
    58 // ---------------------------------------------------------------------------
       
    59 // destructor function
       
    60 // Owned by CIRBufferContainer
       
    61 // ---------------------------------------------------------------------------
       
    62 //
       
    63 CIRBufferContainer::~CIRBufferContainer ()
       
    64 	{
       
    65 	IRLOG_DEBUG( "CIRBufferContainer::~CIRBufferContainer" );
       
    66 	//No implementation
       
    67 	}	
       
    68 	
       
    69 // ---------------------------------------------------------------------------
       
    70 // Function : CIRBufferContainer
       
    71 // default constructor
       
    72 // ---------------------------------------------------------------------------
       
    73 //
       
    74  CIRBufferContainer::CIRBufferContainer()
       
    75 	{
       
    76 	IRLOG_DEBUG( "CIRBufferContainer::CIRBufferContainer" );
       
    77 	//No implementation	
       
    78 	}
       
    79 
       
    80 // ---------------------------------------------------------------------------
       
    81 // Two Phase ConstructL
       
    82 // Owned by CIRBufferContainer
       
    83 // ---------------------------------------------------------------------------
       
    84 //
       
    85 void CIRBufferContainer::ConstructL(TUint8* aAddress,TInt aGranularity)
       
    86 	{
       
    87 	IRLOG_DEBUG( "CIRBufferContainer::ConstructL" );
       
    88 	//address of memory chunk
       
    89 	iDataAddress = aAddress;
       
    90 	//granularity of each chunk
       
    91 	iSize = aGranularity;
       
    92 	IRLOG_DEBUG( "CIRBufferContainer::ConstructL - Exiting." );
       
    93 	}
       
    94 
       
    95