os/mm/mmlibs/mmfw/tsrc/mmfunittest/GEF/src/TestEffect.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmfunittest/GEF/src/TestEffect.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,64 @@
     1.4 +
     1.5 +// GlobalEffectTest.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 "TestEffect.h"
    1.23 +#include "TestGlobalEffect.hrh"
    1.24 +#include "TestEffectCustom.h"
    1.25 +
    1.26 +const TUid KUidTestGlblPlugin = {KUidTestGlblPluginDefine};
    1.27 +const TUid KUidTestGlbCustomCall = {KUidTestGlbCustomCallDefine};
    1.28 +
    1.29 +//
    1.30 +// TestGlobalEffect - note normally this will be in a separate DLL to the calling code,
    1.31 +//                    but seems no point in doing that for this test code
    1.32 +//
    1.33 +
    1.34 +CTestGlobalEffect* CTestGlobalEffect::NewL(MMmfGlobalAudioEffectObserver* aObserver)
    1.35 +	{
    1.36 +	CTestGlobalEffect* self = new (ELeave) CTestGlobalEffect;
    1.37 +	CleanupStack::PushL(self);
    1.38 +	self->ConstructL(aObserver);
    1.39 +	CleanupStack::Pop(self);
    1.40 +	return self;
    1.41 +	}
    1.42 +	
    1.43 +CTestGlobalEffect::CTestGlobalEffect()
    1.44 +	{
    1.45 +	// empty constructor
    1.46 +	}
    1.47 +	
    1.48 +void CTestGlobalEffect::ConstructL(MMmfGlobalAudioEffectObserver* aObserver)
    1.49 +	{
    1.50 +	BaseConstructL(KUidTestGlblPlugin, aObserver);
    1.51 +	User::LeaveIfError(CreateCustomInterface(KUidTestGlbCustomCall));
    1.52 +	}
    1.53 +	
    1.54 +void CTestGlobalEffect::SetActive(TBool aValue)
    1.55 +	{
    1.56 +	MTestEffectCustomIf* custIf = 
    1.57 +		static_cast<MTestEffectCustomIf*>(CustomInterface(KUidTestGlbCustomCall));
    1.58 +	custIf->SetActive(aValue);
    1.59 +	}
    1.60 +	
    1.61 +void CTestGlobalEffect::GenCallbackL()
    1.62 +	{
    1.63 +	MTestEffectCustomIf* custIf = 
    1.64 +		static_cast<MTestEffectCustomIf*>(CustomInterface(KUidTestGlbCustomCall));
    1.65 +	custIf->GenCallbackL();
    1.66 +	}
    1.67 +