|
1 |
|
2 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 // All rights reserved. |
|
4 // This component and the accompanying materials are made available |
|
5 // under the terms of "Eclipse Public License v1.0" |
|
6 // which accompanies this distribution, and is available |
|
7 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 // |
|
9 // Initial Contributors: |
|
10 // Nokia Corporation - initial contribution. |
|
11 // |
|
12 // Contributors: |
|
13 // |
|
14 // Description: |
|
15 // |
|
16 |
|
17 #ifndef TESTGLOBALEFFECTPLUGIN_H |
|
18 #define TESTGLOBALEFFECTPLUGIN_H |
|
19 |
|
20 #include <mmf/plugin/mmfglblaudioeffectplugin.h> |
|
21 |
|
22 #include "../src/TestEffectCustom.h" |
|
23 #include "PresetList.h" |
|
24 |
|
25 // Test global audio effect - does nothing but supports setting, getting etc |
|
26 |
|
27 class CTestEffect : public CBase, |
|
28 public MMmfGlobalAudioImpl, |
|
29 public MTestEffectCustomIf |
|
30 { |
|
31 public: |
|
32 static MMmfGlobalAudioImpl* NewL(); |
|
33 ~CTestEffect(); |
|
34 |
|
35 enum TValueState |
|
36 { |
|
37 ESetByUnknown, |
|
38 ESetByUid, |
|
39 ESetByDes, |
|
40 ESetByValue |
|
41 }; |
|
42 |
|
43 protected: |
|
44 // from MMmfGlobalAudioImpl |
|
45 void Release(); |
|
46 TUint Capability(TBool aCurrentOnly); |
|
47 void RequestNotificationL(TUid aEventUid); |
|
48 TBool IsEnabled() const; |
|
49 TBool IsActive() const; |
|
50 void SetEnabledL(TBool aBool); |
|
51 TUid SettingsByUidL() const; |
|
52 void SetSettingsByUidL(TUid aPresetUid); |
|
53 HBufC8* SettingsByDesL() const; |
|
54 void SetSettingsByDesL(const TDesC8& aParam); |
|
55 MMmfGlobalAudioPresetList* KnownPresetsL(); |
|
56 void ExtractValuesL(TDes8& aPackageBuf); |
|
57 void SetByValuesL(const TDesC8& aPackageBuf); |
|
58 TInt CreateCustomInterface(TUid aInterfaceUid); |
|
59 TAny* CustomInterface(TUid aInterfaceUid); |
|
60 void PassDestructorKey(TUid aDestructorKey); |
|
61 void CompleteConstructL(CMmfGlobalAudioEffect* aParent, MMmfGlobalAudioEffectObserver* aObserver); |
|
62 |
|
63 // from MTestEffectCustomIf |
|
64 void SetActive(TBool aValue); |
|
65 void GenCallbackL(); |
|
66 |
|
67 private: |
|
68 CTestEffect(); |
|
69 private: |
|
70 TUid iDestructorKey; |
|
71 CMmfGlobalAudioEffect* iParent; |
|
72 MMmfGlobalAudioEffectObserver* iObserver; |
|
73 TUid iSettingsUid; |
|
74 HBufC8* iSettingsDes; |
|
75 TInt iSettingsValue; |
|
76 TValueState iValueState; |
|
77 TBool iEnabled; |
|
78 TBool iIsActive; |
|
79 CPresetList* iPresetList; |
|
80 TUid iNotifyUid; |
|
81 }; |
|
82 |
|
83 #endif |