Update contrib.
2 // MmfGlblAudioEffectPlugin.h
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".
11 // Initial Contributors:
12 // Nokia Corporation - initial contribution.
19 #ifndef MMFGLBLAUDIOEFFECTPLUGIN_H
20 #define MMFGLBLAUDIOEFFECTPLUGIN_H
22 #include <mmf/common/mmfglblaudioeffect.h>
31 Implementation of CMmfGlobalAudioEffect.
32 This is the base interface for plugins that provide for global effects. It is intended
33 to be exclusively called from CMmfGlobalAudioEffect itself.
36 class MMmfGlobalAudioImpl
38 friend class CMmfGlobalAudioEffect;
43 Equivalent of destructor - called to request data to be deleted.
45 virtual void Release()=0;
49 Provide implementation of CMmfGlobalAudioEffect::Capability()
51 If true, capabilities are for current situation only - see text
52 @return Capability settings, as given in TCapabilityFlags
53 @see CMmfGlobalAudioEffect::Capability()
55 virtual TUint Capability(TBool aCurrentOnly)=0;
58 Provide implementation of CMmfGlobalAudioEffect::RequestNotificationL()
60 Uid specifying event for which notification is requested
62 @leave KErrNotSupported
63 If Observer passed during construction was NULL.
64 The Uid is not recognised.
65 The feature is simply not supported in this implementation.
66 @see CMmfGlobalAudioEffect::RequestNotificationL()
68 virtual void RequestNotificationL(TUid aEventUid)=0;
71 Provide implementation of CMmfGlobalAudioEffect::IsEnabled()
72 @return True if SetEnabledL(ETrue), or similar, has been called on this effect
73 @see CMmfGlobalAudioEffect::IsEnabled()
75 virtual TBool IsEnabled() const=0;
78 Provide implementation of CMmfGlobalAudioEffect::IsActive()
79 @return True if the effect is in use
80 @see CMmfGlobalAudioEffect::IsActive()
82 virtual TBool IsActive() const=0;
85 Provide implementation of CMmfGlobalAudioEffect::SetEnabledL()
87 If true, enables this specific effect. If false, disables it.
88 @see CMmfGlobalAudioEffect::SetEnabledL()
90 virtual void SetEnabledL(TBool aValue)=0;
93 Provide implementation of CMmfGlobalAudioEffect::SettingsByUidL()
94 @return The Uid used by SetSettingsByUidL()
95 @leave KErrNotSupported
96 The settings cannot be expressed as a Uid (usually means SetSettingsByUidL() was not the last
97 thing to change them).
98 @see CMmfGlobalAudioEffect::SettingsByUidL()
100 virtual TUid SettingsByUidL() const=0;
103 Provide implementation of CMmfGlobalAudioEffect::SetSettingsByUidL()
105 Uid representing the preset in question
106 @leave KErrNotSupported
107 This implementation does not support presets for this effect
109 The value of aUid does not correspond to a known preset
110 @see CMmfGlobalAudioEffect::SetSettingsByUidL()
112 virtual void SetSettingsByUidL(TUid aPresetUid)=0;
115 Provide implementation of CMmfGlobalAudioEffect::SettingsByDesL()
116 @return HBufC8 containing current settings
117 @leave KErrNotSupported
118 This implementation does not support expressing settings in descriptor form
119 @see CMmfGlobalAudioEffect::SettingsByDesL()
121 virtual HBufC8* SettingsByDesL() const=0;
124 Provide implementation of CMmfGlobalAudioEffect::SetSettingsByDesL()
126 Descriptor value to use
127 @leave KErrNotSupported
128 This implementation does not support expressing settings in descriptor form
130 Value in descriptor does not correspond to known format
131 @see CMmfGlobalAudioEffect::SetSettingsByDesL()
133 virtual void SetSettingsByDesL(const TDesC8& aParam)=0;
136 Provide implementation of CMmfGlobalAudioEffect::KnownPresetsL()
137 @see CMmfGlobalAudioEffect::KnownPresetsL()
138 @leave KErrNotSupported
139 This feature may not be supported in some circumstances
141 virtual MMmfGlobalAudioPresetList* KnownPresetsL()=0;
144 Provide implementation of CMmfGlobalAudioEffect::ExtractValuesL()
145 Extract the settings into a struct
146 Note that the implementation should check the size of the supplied package buffer, to check
149 This should be a package buffer wrapping the appropriate class/struct, and will be
150 specific to a particular CMmfGlobalAudioEffect derivitive.
151 @leave KErrNotSupported
152 This will only be supported by some child classes, and even then will not
153 be supported by all implementations.
155 Passed package buffer is not the expected size.
156 @see CMmfGlobalAudioEffect::ExtractValuesL()
158 virtual void ExtractValuesL(TDes8& aPackageBuf)=0;
161 Provide implementation of CMmfGlobalAudioEffect::SetByValuesL().
162 Note that the implementation should check the size of the supplied package buffer, to check
165 This should be a package buffer wrapping the appropriate class/struct, and will be
166 specific to a particular CMmfGlobalAudioEffect derivitive.
167 @leave KErrNotSupported
168 This will only be supported by some child classes, and even then will not
169 be supported by all implementations.
171 Passed package buffer is not the expected size, or individual values are out of range
172 @see CMmfGlobalAudioEffect::SetByValuesL()
174 virtual void SetByValuesL(const TDesC8& aPackageBuf)=0;
177 Request extension feature.
178 This is intended to provide additional features, should a particular global effect
179 need it. In typical use, the global effect will make a call to this interface on
180 construction. Repeatedly calling this interface will have no additional effect -
181 if the interface has already been setup internally, then no further activity will
184 Used to indicate which interface is required.
185 @return Standard error code. KErrNotSupported is used to indicate that the particular
188 virtual TInt CreateCustomInterface(TUid aInterfaceUid)=0;
192 Return previously created extension.
193 This returns a custom interface, used to provide additional features for a certain
194 global effect. This should only be used if CreateCustomInterface() has already
195 been called for the same UID value. This means that any construction for that interface
196 has already been called, and thus this call cannot fail. Typically the returned class
197 will be another Mixin.No transfer of ownership is implied.
200 Used to indicate which interface is required.
201 @return The requested interface, or NULL if not known.
202 @see CreateCustomInterface()
204 virtual TAny* CustomInterface(TUid aInterfaceUid)=0;
209 Called on construction so plugin takes responsibility to call REComSession::DestroyedImplementation()
210 @param aDestructorKey
211 The Uid returned by REComSession::CreateImplementationL() or similar
213 virtual void PassDestructorKey(TUid aDestructorKey)=0;
216 Complete construction.
217 Pass additional values from the construction phase, used subsequently by the plugin.
219 The CMmfGlobalAudioEffect that created this object
221 Observer as passed to CMmfGlobalAudioEffect::BaseConstructL()
222 @see CMmfGlobalAudioEffect::BaseConstructL()
224 virtual void CompleteConstructL(CMmfGlobalAudioEffect* aParent, MMmfGlobalAudioEffectObserver* aObserver)=0;
227 static MMmfGlobalAudioImpl* NewL(TUid aImplementationUid,
228 CMmfGlobalAudioEffect* aParent,
229 MMmfGlobalAudioEffectObserver* aObserver);
234 #endif // MMFGLBLAUDIOEFFECTPLUGIN_