0
|
1 |
|
|
2 |
// MmfGlblAudioEffectPlugin.h
|
|
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 |
#ifndef MMFGLBLAUDIOEFFECTPLUGIN_H
|
|
20 |
#define MMFGLBLAUDIOEFFECTPLUGIN_H
|
|
21 |
|
|
22 |
#include <mmf/common/mmfglblaudioeffect.h>
|
|
23 |
|
|
24 |
/**
|
|
25 |
@publishedPartner
|
|
26 |
@released
|
|
27 |
@file
|
|
28 |
*/
|
|
29 |
|
|
30 |
/**
|
|
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.
|
|
34 |
*/
|
|
35 |
|
|
36 |
class MMmfGlobalAudioImpl
|
|
37 |
{
|
|
38 |
friend class CMmfGlobalAudioEffect;
|
|
39 |
|
|
40 |
public:
|
|
41 |
/**
|
|
42 |
Release object.
|
|
43 |
Equivalent of destructor - called to request data to be deleted.
|
|
44 |
*/
|
|
45 |
virtual void Release()=0;
|
|
46 |
|
|
47 |
protected:
|
|
48 |
/*
|
|
49 |
Provide implementation of CMmfGlobalAudioEffect::Capability()
|
|
50 |
@param aCurrentOnly
|
|
51 |
If true, capabilities are for current situation only - see text
|
|
52 |
@return Capability settings, as given in TCapabilityFlags
|
|
53 |
@see CMmfGlobalAudioEffect::Capability()
|
|
54 |
*/
|
|
55 |
virtual TUint Capability(TBool aCurrentOnly)=0;
|
|
56 |
|
|
57 |
/**
|
|
58 |
Provide implementation of CMmfGlobalAudioEffect::RequestNotificationL()
|
|
59 |
@param aEventUid
|
|
60 |
Uid specifying event for which notification is requested
|
|
61 |
|
|
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()
|
|
67 |
*/
|
|
68 |
virtual void RequestNotificationL(TUid aEventUid)=0;
|
|
69 |
|
|
70 |
/**
|
|
71 |
Provide implementation of CMmfGlobalAudioEffect::IsEnabled()
|
|
72 |
@return True if SetEnabledL(ETrue), or similar, has been called on this effect
|
|
73 |
@see CMmfGlobalAudioEffect::IsEnabled()
|
|
74 |
*/
|
|
75 |
virtual TBool IsEnabled() const=0;
|
|
76 |
|
|
77 |
/**
|
|
78 |
Provide implementation of CMmfGlobalAudioEffect::IsActive()
|
|
79 |
@return True if the effect is in use
|
|
80 |
@see CMmfGlobalAudioEffect::IsActive()
|
|
81 |
*/
|
|
82 |
virtual TBool IsActive() const=0;
|
|
83 |
|
|
84 |
/**
|
|
85 |
Provide implementation of CMmfGlobalAudioEffect::SetEnabledL()
|
|
86 |
@param aValue
|
|
87 |
If true, enables this specific effect. If false, disables it.
|
|
88 |
@see CMmfGlobalAudioEffect::SetEnabledL()
|
|
89 |
*/
|
|
90 |
virtual void SetEnabledL(TBool aValue)=0;
|
|
91 |
|
|
92 |
/**
|
|
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()
|
|
99 |
*/
|
|
100 |
virtual TUid SettingsByUidL() const=0;
|
|
101 |
|
|
102 |
/**
|
|
103 |
Provide implementation of CMmfGlobalAudioEffect::SetSettingsByUidL()
|
|
104 |
@param aPresetUid
|
|
105 |
Uid representing the preset in question
|
|
106 |
@leave KErrNotSupported
|
|
107 |
This implementation does not support presets for this effect
|
|
108 |
@leave KErrUnknown
|
|
109 |
The value of aUid does not correspond to a known preset
|
|
110 |
@see CMmfGlobalAudioEffect::SetSettingsByUidL()
|
|
111 |
*/
|
|
112 |
virtual void SetSettingsByUidL(TUid aPresetUid)=0;
|
|
113 |
|
|
114 |
/**
|
|
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()
|
|
120 |
*/
|
|
121 |
virtual HBufC8* SettingsByDesL() const=0;
|
|
122 |
|
|
123 |
/**
|
|
124 |
Provide implementation of CMmfGlobalAudioEffect::SetSettingsByDesL()
|
|
125 |
@param aParam
|
|
126 |
Descriptor value to use
|
|
127 |
@leave KErrNotSupported
|
|
128 |
This implementation does not support expressing settings in descriptor form
|
|
129 |
@leave KErrCorrupt
|
|
130 |
Value in descriptor does not correspond to known format
|
|
131 |
@see CMmfGlobalAudioEffect::SetSettingsByDesL()
|
|
132 |
*/
|
|
133 |
virtual void SetSettingsByDesL(const TDesC8& aParam)=0;
|
|
134 |
|
|
135 |
/**
|
|
136 |
Provide implementation of CMmfGlobalAudioEffect::KnownPresetsL()
|
|
137 |
@see CMmfGlobalAudioEffect::KnownPresetsL()
|
|
138 |
@leave KErrNotSupported
|
|
139 |
This feature may not be supported in some circumstances
|
|
140 |
*/
|
|
141 |
virtual MMmfGlobalAudioPresetList* KnownPresetsL()=0;
|
|
142 |
|
|
143 |
/**
|
|
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
|
|
147 |
it is as expected.
|
|
148 |
@param aPackageBuf
|
|
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.
|
|
154 |
@leave KErrArgument
|
|
155 |
Passed package buffer is not the expected size.
|
|
156 |
@see CMmfGlobalAudioEffect::ExtractValuesL()
|
|
157 |
*/
|
|
158 |
virtual void ExtractValuesL(TDes8& aPackageBuf)=0;
|
|
159 |
|
|
160 |
/**
|
|
161 |
Provide implementation of CMmfGlobalAudioEffect::SetByValuesL().
|
|
162 |
Note that the implementation should check the size of the supplied package buffer, to check
|
|
163 |
it is as expected.
|
|
164 |
@param aPackageBuf
|
|
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.
|
|
170 |
@leave KErrArgument
|
|
171 |
Passed package buffer is not the expected size, or individual values are out of range
|
|
172 |
@see CMmfGlobalAudioEffect::SetByValuesL()
|
|
173 |
*/
|
|
174 |
virtual void SetByValuesL(const TDesC8& aPackageBuf)=0;
|
|
175 |
|
|
176 |
/**
|
|
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
|
|
182 |
take place.
|
|
183 |
@param aInterfaceUid
|
|
184 |
Used to indicate which interface is required.
|
|
185 |
@return Standard error code. KErrNotSupported is used to indicate that the particular
|
|
186 |
plugin is used.
|
|
187 |
*/
|
|
188 |
virtual TInt CreateCustomInterface(TUid aInterfaceUid)=0;
|
|
189 |
|
|
190 |
|
|
191 |
/**
|
|
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.
|
|
198 |
|
|
199 |
@param aInterfaceUid
|
|
200 |
Used to indicate which interface is required.
|
|
201 |
@return The requested interface, or NULL if not known.
|
|
202 |
@see CreateCustomInterface()
|
|
203 |
*/
|
|
204 |
virtual TAny* CustomInterface(TUid aInterfaceUid)=0;
|
|
205 |
|
|
206 |
|
|
207 |
/**
|
|
208 |
Pass destructor key.
|
|
209 |
Called on construction so plugin takes responsibility to call REComSession::DestroyedImplementation()
|
|
210 |
@param aDestructorKey
|
|
211 |
The Uid returned by REComSession::CreateImplementationL() or similar
|
|
212 |
*/
|
|
213 |
virtual void PassDestructorKey(TUid aDestructorKey)=0;
|
|
214 |
|
|
215 |
/**
|
|
216 |
Complete construction.
|
|
217 |
Pass additional values from the construction phase, used subsequently by the plugin.
|
|
218 |
@param aParent
|
|
219 |
The CMmfGlobalAudioEffect that created this object
|
|
220 |
@param aObserver
|
|
221 |
Observer as passed to CMmfGlobalAudioEffect::BaseConstructL()
|
|
222 |
@see CMmfGlobalAudioEffect::BaseConstructL()
|
|
223 |
*/
|
|
224 |
virtual void CompleteConstructL(CMmfGlobalAudioEffect* aParent, MMmfGlobalAudioEffectObserver* aObserver)=0;
|
|
225 |
|
|
226 |
private:
|
|
227 |
static MMmfGlobalAudioImpl* NewL(TUid aImplementationUid,
|
|
228 |
CMmfGlobalAudioEffect* aParent,
|
|
229 |
MMmfGlobalAudioEffectObserver* aObserver);
|
|
230 |
|
|
231 |
};
|
|
232 |
|
|
233 |
|
|
234 |
#endif // MMFGLBLAUDIOEFFECTPLUGIN_
|