sl@0: sl@0: // MmfGlblAudioEffectPlugin.cpp sl@0: sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: #include sl@0: #include sl@0: sl@0: #include //needed for CleanupResetAndDestroyPushL() sl@0: sl@0: // construct implementation of global plugin sl@0: sl@0: MMmfGlobalAudioImpl* MMmfGlobalAudioImpl::NewL(TUid aImplementationUid, sl@0: CMmfGlobalAudioEffect* aParent, sl@0: MMmfGlobalAudioEffectObserver* aObserver) sl@0: { sl@0: // The Uid of the plugin will be the match string sl@0: TInt uidAsInteger = aImplementationUid.iUid; sl@0: TBuf8<20> tempBuffer; sl@0: tempBuffer.Num(uidAsInteger, EHex); // has value sl@0: TUid interfaceUid = {KUidGlobalAudioEffectInterface}; sl@0: sl@0: TUid destructorKey; sl@0: MMmfGlobalAudioImpl* self = sl@0: static_cast sl@0: (MmPluginUtils::CreateImplementationL(interfaceUid, destructorKey, tempBuffer, KRomOnlyResolverUid)); sl@0: sl@0: self->PassDestructorKey(destructorKey); sl@0: sl@0: CleanupReleasePushL(*self); sl@0: self->CompleteConstructL(aParent, aObserver); sl@0: CleanupStack::Pop(self); sl@0: sl@0: return self; sl@0: }