os/mm/mmlibs/mmfw/Effect/src/MmfGlblAudioEffectPlugin.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 
     2 // MmfGlblAudioEffectPlugin.cpp
     3 
     4 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     5 // All rights reserved.
     6 // This component and the accompanying materials are made available
     7 // under the terms of "Eclipse Public License v1.0"
     8 // which accompanies this distribution, and is available
     9 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    10 //
    11 // Initial Contributors:
    12 // Nokia Corporation - initial contribution.
    13 //
    14 // Contributors:
    15 //
    16 // Description:
    17 //
    18 
    19 #include <mmf/common/mmfglblaudioeffect.h>
    20 #include <mmf/plugin/mmfglblaudioeffectplugin.h>
    21 #include <mmf/plugin/mmfglblaudioeffect.hrh>
    22 
    23 #include <ecom/ecom.h>
    24 #include <mm/mmpluginutils.h>
    25 
    26 #include <mmf/common/mmfcontroller.h> //needed for CleanupResetAndDestroyPushL()
    27 
    28 // construct implementation of global plugin
    29 
    30 MMmfGlobalAudioImpl* MMmfGlobalAudioImpl::NewL(TUid aImplementationUid, 
    31 							   CMmfGlobalAudioEffect* aParent,
    32 	                           MMmfGlobalAudioEffectObserver* aObserver)
    33 	{
    34 	// The Uid of the plugin will be the match string
    35 	TInt uidAsInteger = aImplementationUid.iUid;
    36 	TBuf8<20> tempBuffer;
    37 	tempBuffer.Num(uidAsInteger, EHex); // has value
    38 	TUid interfaceUid = {KUidGlobalAudioEffectInterface};
    39 
    40 	TUid destructorKey;
    41 	MMmfGlobalAudioImpl* self = 
    42 		static_cast<MMmfGlobalAudioImpl*>
    43 			(MmPluginUtils::CreateImplementationL(interfaceUid, destructorKey, tempBuffer, KRomOnlyResolverUid));
    44 
    45 	self->PassDestructorKey(destructorKey);
    46 
    47 	CleanupReleasePushL(*self);
    48 	self->CompleteConstructL(aParent, aObserver);
    49 	CleanupStack::Pop(self);
    50 	
    51 	return self;
    52 	}