|
1 |
|
2 // GlobalEffectTest.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 "TestEffect.h" |
|
20 #include "TestGlobalEffect.hrh" |
|
21 #include "TestEffectCustom.h" |
|
22 |
|
23 const TUid KUidTestGlblPlugin = {KUidTestGlblPluginDefine}; |
|
24 const TUid KUidTestGlbCustomCall = {KUidTestGlbCustomCallDefine}; |
|
25 |
|
26 // |
|
27 // TestGlobalEffect - note normally this will be in a separate DLL to the calling code, |
|
28 // but seems no point in doing that for this test code |
|
29 // |
|
30 |
|
31 CTestGlobalEffect* CTestGlobalEffect::NewL(MMmfGlobalAudioEffectObserver* aObserver) |
|
32 { |
|
33 CTestGlobalEffect* self = new (ELeave) CTestGlobalEffect; |
|
34 CleanupStack::PushL(self); |
|
35 self->ConstructL(aObserver); |
|
36 CleanupStack::Pop(self); |
|
37 return self; |
|
38 } |
|
39 |
|
40 CTestGlobalEffect::CTestGlobalEffect() |
|
41 { |
|
42 // empty constructor |
|
43 } |
|
44 |
|
45 void CTestGlobalEffect::ConstructL(MMmfGlobalAudioEffectObserver* aObserver) |
|
46 { |
|
47 BaseConstructL(KUidTestGlblPlugin, aObserver); |
|
48 User::LeaveIfError(CreateCustomInterface(KUidTestGlbCustomCall)); |
|
49 } |
|
50 |
|
51 void CTestGlobalEffect::SetActive(TBool aValue) |
|
52 { |
|
53 MTestEffectCustomIf* custIf = |
|
54 static_cast<MTestEffectCustomIf*>(CustomInterface(KUidTestGlbCustomCall)); |
|
55 custIf->SetActive(aValue); |
|
56 } |
|
57 |
|
58 void CTestGlobalEffect::GenCallbackL() |
|
59 { |
|
60 MTestEffectCustomIf* custIf = |
|
61 static_cast<MTestEffectCustomIf*>(CustomInterface(KUidTestGlbCustomCall)); |
|
62 custIf->GenCallbackL(); |
|
63 } |
|
64 |