os/mm/devsoundextensions/effects/SrcOrientation/SourceOrientationMessageHandler/src/EffectDataQueItem.cpp
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/devsoundextensions/effects/SrcOrientation/SourceOrientationMessageHandler/src/EffectDataQueItem.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,83 @@
1.4 +/*
1.5 +* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: This file contains the implementation of Effect Data Queue Item.
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +
1.23 +// INCLUDE FILES
1.24 +
1.25 +#include "EffectDataQueItem.h"
1.26 +
1.27 +
1.28 +// ============================ MEMBER FUNCTIONS ===============================
1.29 +
1.30 +// -----------------------------------------------------------------------------
1.31 +// CEffectDataQueItem::CEffectDataQueItem
1.32 +// C++ default constructor can NOT contain any code, that
1.33 +// might leave.
1.34 +// -----------------------------------------------------------------------------
1.35 +//
1.36 +CEffectDataQueItem::CEffectDataQueItem()
1.37 + : iData(NULL)
1.38 + {
1.39 + }
1.40 +
1.41 +// -----------------------------------------------------------------------------
1.42 +// CEffectDataQueItem::~CEffectDataQueItem
1.43 +// Destructor
1.44 +// -----------------------------------------------------------------------------
1.45 +//
1.46 +CEffectDataQueItem::~CEffectDataQueItem()
1.47 + {
1.48 + delete iData;
1.49 + }
1.50 +
1.51 +// -----------------------------------------------------------------------------
1.52 +// CEffectDataQueItem::ConstructL
1.53 +// Symbian 2nd phase constructor can leave.
1.54 +// -----------------------------------------------------------------------------
1.55 +//
1.56 +void CEffectDataQueItem::ConstructL(
1.57 + TDesC8* aDataBuffer )
1.58 + {
1.59 + iData = (HBufC8*)aDataBuffer;
1.60 + }
1.61 +
1.62 +// -----------------------------------------------------------------------------
1.63 +// CEffectDataQueItem::NewL
1.64 +// Two-phased constructor.
1.65 +// -----------------------------------------------------------------------------
1.66 +//
1.67 +CEffectDataQueItem* CEffectDataQueItem::NewL(
1.68 + TDesC8* aDataBuffer )
1.69 + {
1.70 + CEffectDataQueItem* self = new (ELeave) CEffectDataQueItem();
1.71 + CleanupStack::PushL(self);
1.72 + self->ConstructL(aDataBuffer);
1.73 + CleanupStack::Pop(self);
1.74 + return self;
1.75 + }
1.76 +
1.77 +// -----------------------------------------------------------------------------
1.78 +// CEffectDataQueItem::EffectData
1.79 +// Symbian 2nd phase constructor can leave.
1.80 +// -----------------------------------------------------------------------------
1.81 +//
1.82 +TDesC8& CEffectDataQueItem::EffectData()
1.83 + {
1.84 + return *iData;
1.85 + }
1.86 +