1.1 --- a/epoc32/include/environmentalreverbutility.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/environmentalreverbutility.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,370 @@
1.4 -environmentalreverbutility.h
1.5 +/*
1.6 +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: This is the definition of the audio EnvironmentalReverb utility class.
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +
1.24 +#ifndef CENVIRONMENTALREVERBUTILITY_H
1.25 +#define CENVIRONMENTALREVERBUTILITY_H
1.26 +
1.27 +// INCLUDES
1.28 +#include <e32base.h>
1.29 +#include <e32svr.h>
1.30 +#include <EnvironmentalReverbBase.h>
1.31 +#include <centralrepository.h>
1.32 +#include "EnvironmentalReverbUtilityData.h"
1.33 +
1.34 +// FORWARD DECLARATIONS
1.35 +class TEfEnvironmentalReverbUtilityPreset;
1.36 +class CEnvironmentalReverb;
1.37 +class CMdaAudioConvertUtility;
1.38 +class CMdaAudioPlayerUtility;
1.39 +class CMdaAudioRecorderUtility;
1.40 +class CMdaAudioInputStream;
1.41 +class CMdaAudioOutputStream;
1.42 +class CMdaAudioToneUtility;
1.43 +class CCustomCommandUtility;
1.44 +class CCustomInterfaceUtility;
1.45 +class CMMFDevSound;
1.46 +class CRepository;
1.47 +class CMidiClientUtility;
1.48 +class CDrmPlayerUtility;
1.49 +class CVideoPlayerUtility;
1.50 +
1.51 +// CLASS DECLARATION
1.52 +
1.53 +/**
1.54 +* This is the EnvironmentalReverb Utility class for managing audio EnvironmentalReverb presets.
1.55 +*
1.56 +* @lib EnvironmentalReverbUtility.lib
1.57 +* @since 3.0
1.58 +*/
1.59 +
1.60 +class CEnvironmentalReverbUtility : public CBase
1.61 + {
1.62 + public: // Constructors and destructor
1.63 +
1.64 +
1.65 + /**
1.66 + * Factory function for creating the audio EnvironmentalReverb utility object.
1.67 + * @since 3.0
1.68 + * @param aUtility A reference to a Devsound Instance
1.69 + * @return pointer to CEnvironmentalReverbUtility object
1.70 + */
1.71 + IMPORT_C static CEnvironmentalReverbUtility* NewL(CMMFDevSound& aDevSound);
1.72 +
1.73 + /**
1.74 + * Factory function for creating the audio EnvironmentalReverb utility object.
1.75 + * @since 3.0
1.76 + * @param aUtility A reference to a convert utility
1.77 + * @return pointer to CEnvironmentalReverbUtility object
1.78 + */
1.79 + IMPORT_C static CEnvironmentalReverbUtility* NewL(CMdaAudioConvertUtility& aUtility);
1.80 +
1.81 + /**
1.82 + * Factory function for creating the audio EnvironmentalReverb utility object.
1.83 + * @since 3.0
1.84 + * @param aUtility A reference to a audio input stream utility
1.85 + * @return pointer to CEnvironmentalReverbUtility object
1.86 + */
1.87 + IMPORT_C static CEnvironmentalReverbUtility* NewL(CMdaAudioInputStream& aUtility);
1.88 +
1.89 + /**
1.90 + * Factory function for creating the audio EnvironmentalReverb utility object.
1.91 + * @since 3.0
1.92 + * @param aUtility A reference to a audio output stream utility
1.93 + * @return pointer to CEnvironmentalReverbUtility object
1.94 + */
1.95 + IMPORT_C static CEnvironmentalReverbUtility* NewL(CMdaAudioOutputStream& aUtility);
1.96 +
1.97 + /**
1.98 + * Factory function for creating the audio EnvironmentalReverb utility object.
1.99 + * @since 3.0
1.100 + * @param aUtility A reference to a audio player utility
1.101 + * @return pointer to CEnvironmentalReverbUtility object
1.102 + */
1.103 + IMPORT_C static CEnvironmentalReverbUtility* NewL(CMdaAudioPlayerUtility& aUtility);
1.104 +
1.105 + /**
1.106 + * Factory function for creating the audio EnvironmentalReverb utility object.
1.107 + * @since 3.0
1.108 + * @param aUtility A reference to a audio recorder utility
1.109 + * @return pointer to CEnvironmentalReverbUtility object
1.110 + */
1.111 + IMPORT_C static CEnvironmentalReverbUtility* NewL(CMdaAudioRecorderUtility& aUtility);
1.112 +
1.113 + /**
1.114 + * Factory function for creating the audio EnvironmentalReverb utility object.
1.115 + * @since 3.0
1.116 + * @param aUtility A reference to a audio tone utility
1.117 + * @return pointer to CEnvironmentalReverbUtility object
1.118 + */
1.119 + IMPORT_C static CEnvironmentalReverbUtility* NewL(CMdaAudioToneUtility& aUtility);
1.120 +
1.121 + /**
1.122 + * Factory function for creating the audio EnvironmentalReverb utility object.
1.123 + * @since 3.0
1.124 + * @param aUtility A reference to custom command utility
1.125 + * @return pointer to CEnvironmentalReverbUtility object
1.126 + */
1.127 + IMPORT_C static CEnvironmentalReverbUtility* NewL(CCustomCommandUtility* aUtility);
1.128 +
1.129 + /**
1.130 + * Factory function for creating the audio EnvironmentalReverb utility object.
1.131 + * @since 3.0
1.132 + * @param aUtility A reference to custom interface utility
1.133 + * @return pointer to CEnvironmentalReverbUtility object
1.134 + */
1.135 + IMPORT_C static CEnvironmentalReverbUtility* NewL(MCustomInterface& aCustomInterface);
1.136 +
1.137 +
1.138 + /**
1.139 + * Factory function for creating the audio EnvironmentalReverb utility object.
1.140 + * @since 3.0
1.141 + * @param aUtility A reference to CMidiClientUtility
1.142 + * @return pointer to CEnvironmentalReverbUtility object
1.143 + */
1.144 + IMPORT_C static CEnvironmentalReverbUtility* NewL(CMidiClientUtility& aUtility);
1.145 +
1.146 +
1.147 + /**
1.148 + * Factory function for creating the audio equalizer object.
1.149 + * @since 3.0
1.150 + * @param CDrmPlayerUtility A reference to a CDrmPlayerUtility object
1.151 + * @return pointer to CAudioEqualizer object
1.152 + */
1.153 + IMPORT_C static CEnvironmentalReverbUtility* NewL(CDrmPlayerUtility& aUtility);
1.154 +
1.155 + /**
1.156 + * Factory function for creating the audio equalizer object.
1.157 + * @since 3.2
1.158 + * @param CVideoPlayerUtility A reference to a CVideoPlayerUtility object
1.159 + * @return pointer to CAudioEqualizer object
1.160 + */
1.161 + IMPORT_C static CEnvironmentalReverbUtility* NewL(CVideoPlayerUtility& aUtility);
1.162 +
1.163 + /**
1.164 + * Destructor.
1.165 + */
1.166 + virtual ~CEnvironmentalReverbUtility();
1.167 +
1.168 + /**
1.169 + * Apply the Preset Index value
1.170 + * @since 3.0
1.171 + * @param aPreset Preset Value
1.172 + */
1.173 + IMPORT_C void ApplyPresetL(TInt aPreset);
1.174 +
1.175 + /**
1.176 + * Disable the EnvironmentalReverb
1.177 + * @since 3.0
1.178 + */
1.179 + IMPORT_C void DisableEnvironmentalReverbL();
1.180 +
1.181 + /**
1.182 + * Create a Preset with the given Name and EnvironmentalReverb Settings
1.183 + * @since 3.0
1.184 + * @param aName Name of the Preset
1.185 + * @param aEnvironmentalReverb EnvironmentalReverb Settings for the Preset
1.186 + */
1.187 + IMPORT_C void CreatePresetL(TDesC& aName, CEnvironmentalReverb& aEnvironmentalReverbUI);
1.188 +
1.189 + /**
1.190 + * Delete a Preset with the given index in the Central Repository
1.191 + * @since 3.0
1.192 + * @param aPresetIndex Index of the Preset in the Array
1.193 + */
1.194 + IMPORT_C void DeletePresetL(TInt aPresetIndex);
1.195 +
1.196 + /**
1.197 + * Retrieves a Preset with the given index from the Central Repository
1.198 + * @since 3.0
1.199 + * @param aPresetIndex Index of the Preset in the Array
1.200 + */
1.201 + IMPORT_C const TDesC& GetPresetL(TInt aPresetIndex);
1.202 +
1.203 + /**
1.204 + * Get the reference to the EnvironmentalReverb Object
1.205 + * @since 3.0
1.206 + * @return Reference to the EnvironmentalReverb Object.
1.207 + */
1.208 + IMPORT_C CEnvironmentalReverb& EnvironmentalReverb();
1.209 +
1.210 + /**
1.211 + * Modify a Preset with the given Name and EnvironmentalReverb Settings
1.212 + * @since 3.0
1.213 + * @param aPresetIndex Array Index of the Preset
1.214 + * @param aName Name of the Preset
1.215 + * @param aEnvironmentalReverb EnvironmentalReverb Settings for the Preset
1.216 + */
1.217 + IMPORT_C void ModifyPresetL(TInt aPresetIndex, TDesC& aName, CEnvironmentalReverb& aEnvironmentalReverbUI);
1.218 +
1.219 + /**
1.220 + * Get the number of Pre Defined Presets
1.221 + * @since 3.0
1.222 + * @return Number of Pre Defined Presets
1.223 + */
1.224 + IMPORT_C TUint32 NumberOfPreDefinedPresets() const;
1.225 +
1.226 + /**
1.227 + * Get all the Presets defined in the Central Repository
1.228 + * @since 3.0
1.229 + * @return Array of all Presets.
1.230 + */
1.231 + IMPORT_C TArray<TEfEnvironmentalReverbUtilityPreset> Presets();
1.232 +
1.233 + /**
1.234 + * Reset a System Defined Preset with the given index in the Array returned from Presets()
1.235 + * @since 3.0
1.236 + * @param aPresetIndex Index of the Preset in the Array
1.237 + */
1.238 + IMPORT_C void ResetPresetL(TInt aPresetIndex);
1.239 +
1.240 + private:
1.241 +
1.242 + /**
1.243 + * C++ default constructor.
1.244 + */
1.245 + CEnvironmentalReverbUtility();
1.246 +
1.247 + /**
1.248 + * By default Symbian 2nd phase constructor is private.
1.249 + */
1.250 +
1.251 + /**
1.252 + * Second Phase Costructor for DevSound Instance
1.253 + * @since 3.0
1.254 + * @param aDevSound DevSound Referece
1.255 + */
1.256 + void ConstructL(CMMFDevSound& aDevSound);
1.257 +
1.258 + /**
1.259 + * Second Phase Costructor for Audio Convert Utility
1.260 + * @since 3.0
1.261 + * @param aUtility CMdaAudioConvertUtility Referece
1.262 + */
1.263 + void ConstructL(CMdaAudioConvertUtility& aUtility);
1.264 +
1.265 + /**
1.266 + * Second Phase Costructor for CMdaAudioInputStream
1.267 + * @since 3.0
1.268 + * @param aUtility CMdaAudioInputStream Referece
1.269 + */
1.270 + void ConstructL(CMdaAudioInputStream& aUtility);
1.271 +
1.272 + /**
1.273 + * Second Phase Costructor for CMdaAudioOutputStream
1.274 + * @since 3.0
1.275 + * @param aUtilityCMdaAudioOutputStream Referece
1.276 + */
1.277 + void ConstructL(CMdaAudioOutputStream& aUtility);
1.278 +
1.279 + /**
1.280 + * Second Phase Costructor for CMdaAudioPlayerUtility
1.281 + * @since 3.0
1.282 + * @param aUtility CMdaAudioPlayerUtility Referece
1.283 + */
1.284 + void ConstructL(CMdaAudioPlayerUtility& aUtility);
1.285 +
1.286 + /**
1.287 + * Second Phase Costructor for CMdaAudioRecordUtility
1.288 + * @since 3.0
1.289 + * @param aUtility CMdaAudioRecordUtility Referece
1.290 + */
1.291 + void ConstructL(CMdaAudioRecorderUtility& aUtility);
1.292 +
1.293 + /**
1.294 + * Second Phase Costructor for CMdaAudioToneUtility
1.295 + * @since 3.0
1.296 + * @param aUtility CMdaAudioToneUtility Referece
1.297 + */
1.298 + void ConstructL(CMdaAudioToneUtility& aUtility);
1.299 +
1.300 + /**
1.301 + * Second Phase Costructor for MCustomCommand
1.302 + * @since 3.0
1.303 + * @param aUtility MCustomCommand Referece
1.304 + */
1.305 + void ConstructL(CCustomCommandUtility* aUtility);
1.306 +
1.307 + /**
1.308 + * Second Phase Costructor for MCustomInterface
1.309 + * @since 3.0
1.310 + * @param aUtility MCustomInterface Referece
1.311 + */
1.312 + void ConstructL(MCustomInterface& aCustomInterface);
1.313 +
1.314 + /**
1.315 + * Second Phase Costructor for CMidiClientUtility
1.316 + * @since 3.0
1.317 + * @param aUtility CMidiClientUtility Referece
1.318 + */
1.319 + void ConstructL(CMidiClientUtility& aUtility);
1.320 +
1.321 + /**
1.322 + * Second Phase Costructor for CDrmPlayerUtility
1.323 + * @since 3.0
1.324 + * @param aUtility CDrmPlayerUtility Referece
1.325 + */
1.326 + void ConstructL(CDrmPlayerUtility& aUtility);
1.327 +
1.328 + /**
1.329 + * Second Phase Costructor for CVideoPlayerUtility
1.330 + * @since 3.2
1.331 + * @param aUtility CVideoPlayerUtility Referece
1.332 + */
1.333 + void ConstructL(CVideoPlayerUtility& aUtility);
1.334 +
1.335 + /**
1.336 + * Function for Updating the Array from the Central Repository
1.337 + * @since 3.0
1.338 + * @param aUtility MCustomInterface Referece
1.339 + */
1.340 + void UpdateFullPresetArrayFromCenRep(RArray<TEfEnvironmentalReverbUtilityPreset> &aFullPresetArray);
1.341 +
1.342 + /**
1.343 + * Function of Updating the Preset Array for the User
1.344 + * @since 3.0
1.345 + * @param aUtility MCustomInterface Referece
1.346 + */
1.347 + void UpdatePresetArray(RArray<TEfEnvironmentalReverbUtilityPreset>& aPresetArray,const RArray<TEfEnvironmentalReverbUtilityPreset> &aFullPresetArray);
1.348 +
1.349 +
1.350 + private: // Data
1.351 +
1.352 + // Array for Storing the Current State of the Repository
1.353 + // which has been compacted after the transaction
1.354 + // with the Central Repository
1.355 + RArray<TEfEnvironmentalReverbUtilityPreset> iPresetArray;
1.356 +
1.357 + // Array Which contains the full information from the
1.358 + // Central Repository except the Description Values
1.359 + RArray<TEfEnvironmentalReverbUtilityPreset> iFullPresetArray;
1.360 +
1.361 + // Pointer to the EnvironmentalReverb Object
1.362 + CEnvironmentalReverb* iEnvironmentalReverb;
1.363 +
1.364 + // Pointer to the EnvironmentalReverb Object
1.365 + // which is returned to the UI for Manipulation
1.366 + CEnvironmentalReverb* iTransEnvironmentalReverb;
1.367 +
1.368 + // Pointer to the Preset Repository
1.369 + CRepository* iPresetRepository;
1.370 + };
1.371 +
1.372 +#endif // CENVIRONMENTALREVERBUTILITY_H
1.373 +
1.374 +// End of File