1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/Effect/src/MmfGlblAudioEffectPlugin.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,52 @@
1.4 +
1.5 +// MmfGlblAudioEffectPlugin.cpp
1.6 +
1.7 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.8 +// All rights reserved.
1.9 +// This component and the accompanying materials are made available
1.10 +// under the terms of "Eclipse Public License v1.0"
1.11 +// which accompanies this distribution, and is available
1.12 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.13 +//
1.14 +// Initial Contributors:
1.15 +// Nokia Corporation - initial contribution.
1.16 +//
1.17 +// Contributors:
1.18 +//
1.19 +// Description:
1.20 +//
1.21 +
1.22 +#include <mmf/common/mmfglblaudioeffect.h>
1.23 +#include <mmf/plugin/mmfglblaudioeffectplugin.h>
1.24 +#include <mmf/plugin/mmfglblaudioeffect.hrh>
1.25 +
1.26 +#include <ecom/ecom.h>
1.27 +#include <mm/mmpluginutils.h>
1.28 +
1.29 +#include <mmf/common/mmfcontroller.h> //needed for CleanupResetAndDestroyPushL()
1.30 +
1.31 +// construct implementation of global plugin
1.32 +
1.33 +MMmfGlobalAudioImpl* MMmfGlobalAudioImpl::NewL(TUid aImplementationUid,
1.34 + CMmfGlobalAudioEffect* aParent,
1.35 + MMmfGlobalAudioEffectObserver* aObserver)
1.36 + {
1.37 + // The Uid of the plugin will be the match string
1.38 + TInt uidAsInteger = aImplementationUid.iUid;
1.39 + TBuf8<20> tempBuffer;
1.40 + tempBuffer.Num(uidAsInteger, EHex); // has value
1.41 + TUid interfaceUid = {KUidGlobalAudioEffectInterface};
1.42 +
1.43 + TUid destructorKey;
1.44 + MMmfGlobalAudioImpl* self =
1.45 + static_cast<MMmfGlobalAudioImpl*>
1.46 + (MmPluginUtils::CreateImplementationL(interfaceUid, destructorKey, tempBuffer, KRomOnlyResolverUid));
1.47 +
1.48 + self->PassDestructorKey(destructorKey);
1.49 +
1.50 + CleanupReleasePushL(*self);
1.51 + self->CompleteConstructL(aParent, aObserver);
1.52 + CleanupStack::Pop(self);
1.53 +
1.54 + return self;
1.55 + }