os/mm/mmhais/a3facl/src/audiocontextfactory/audiocontextfactory.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mmhais/a3facl/src/audiocontextfactory/audiocontextfactory.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,73 @@
     1.4 +//audiocontextfactory.cpp
     1.5 +
     1.6 +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +// All rights reserved.
     1.8 +// This component and the accompanying materials are made available
     1.9 +// under the terms of "Eclipse Public License v1.0"
    1.10 +// which accompanies this distribution, and is available
    1.11 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.12 +//
    1.13 +// Initial Contributors:
    1.14 +// Nokia Corporation - initial contribution.
    1.15 +//
    1.16 +// Contributors:
    1.17 +//
    1.18 +// Description:
    1.19 +//
    1.20 +
    1.21 +
    1.22 +
    1.23 +#include <a3f/audiocontextfactory.h>
    1.24 +
    1.25 +#include "audiocontext.h"
    1.26 +
    1.27 +
    1.28 +CAudioContextFactory::CAudioContextFactory()
    1.29 +	{
    1.30 +	}
    1.31 +
    1.32 +EXPORT_C CAudioContextFactory* CAudioContextFactory::NewL()
    1.33 +	{
    1.34 +	DP_STATIC_CONTEXT(CAudioContextFactory::NewL *CD0*, CtxDevSound, DPLOCAL);
    1.35 +	DP_IN();
    1.36 +	CAudioContextFactory* self = new(ELeave) CAudioContextFactory();
    1.37 +	CleanupStack::PushL(self);
    1.38 +	self->ConstructL();
    1.39 +	CleanupStack::Pop(self);
    1.40 +	DP0_RET(self, "0x%x");
    1.41 +	}
    1.42 +
    1.43 +void CAudioContextFactory::ConstructL()
    1.44 +	{
    1.45 +	DP_CONTEXT(CAudioContextFactory::ConstructL *CD1*, CtxDevSound, DPLOCAL);
    1.46 +	DP_IN();
    1.47 +	DP_OUT();
    1.48 +	}
    1.49 +
    1.50 +EXPORT_C CAudioContextFactory::~CAudioContextFactory()
    1.51 +	{
    1.52 +	DP_CONTEXT(CAudioContextFactory::~CAudioContextFactory *CD1*, CtxDevSound, DPLOCAL);
    1.53 +	DP_IN();
    1.54 +	DP_OUT();
    1.55 +	}
    1.56 +
    1.57 +EXPORT_C TInt CAudioContextFactory::CreateAudioContext(MAudioContext*& aContext)
    1.58 +	{
    1.59 +	DP_CONTEXT(CAudioContextFactory::CreateAudioContext *CD1*, CtxDevSound, DPLOCAL);
    1.60 +	DP_IN();
    1.61 +	DP_OUT();
    1.62 +	TRAPD(err,aContext = CAudioContext::NewL());
    1.63 +	return err;
    1.64 +	}
    1.65 +	
    1.66 +EXPORT_C void CAudioContextFactory::DeleteAudioContext(MAudioContext*& aContext)
    1.67 +	{
    1.68 +	DP_CONTEXT(CAudioContextFactory::DeleteAudioContext *CD1*, CtxDevSound, DPLOCAL);
    1.69 +	DP_IN();
    1.70 +	CAudioContext* contextPtr = static_cast<CAudioContext*>(aContext);
    1.71 +	delete contextPtr;
    1.72 +	DP_OUT();
    1.73 +	//DP0_RET(KErrNone, "%d");
    1.74 +	}
    1.75 +
    1.76 +// End of file