00001 /* 00002 * ============================================================================== 00003 * Name : EnvironmentalReverbUTILITY.h 00004 * Part of : Audio Effects Framework 00005 * Description : This is the definition of the audio EnvironmentalReverb utility class. 00006 * Version : %version: 4 % 00007 * 00008 * Copyright © 2006 Nokia. All rights reserved. 00009 * This material, including documentation and any related 00010 * computer programs, is protected by copyright controlled by 00011 * Nokia. All rights are reserved. Copying, including 00012 * reproducing, storing, adapting or translating, any 00013 * or all of this material requires the prior written consent of 00014 * Nokia. This material also contains confidential 00015 * information which may not be disclosed to others without the 00016 * prior written consent of Nokia. 00017 * ============================================================================== 00018 */ 00019 00020 00021 #ifndef CENVIRONMENTALREVERBUTILITY_H 00022 #define CENVIRONMENTALREVERBUTILITY_H 00023 00024 // INCLUDES 00025 #include <e32base.h> 00026 #include <e32svr.h> 00027 #include <EnvironmentalReverbBase.h> 00028 #include <centralrepository.h> 00029 #include "EnvironmentalReverbUtilityData.h" 00030 00031 // FORWARD DECLARATIONS 00032 class TEfEnvironmentalReverbUtilityPreset; 00033 class CEnvironmentalReverb; 00034 class CMdaAudioConvertUtility; 00035 class CMdaAudioPlayerUtility; 00036 class CMdaAudioRecorderUtility; 00037 class CMdaAudioInputStream; 00038 class CMdaAudioOutputStream; 00039 class CMdaAudioToneUtility; 00040 class CCustomCommandUtility; 00041 class CCustomInterfaceUtility; 00042 class CMMFDevSound; 00043 class CRepository; 00044 #start_since SINCE_3_1_SDK 00045 class CMidiClientUtility; 00046 #end_since SINCE_3_1_SDK 00047 00048 00049 // CLASS DECLARATION 00050 00058 class CEnvironmentalReverbUtility : public CBase 00059 { 00060 public: // Constructors and destructor 00061 00062 00069 IMPORT_C static CEnvironmentalReverbUtility* NewL(CMMFDevSound& aDevSound); 00070 00077 IMPORT_C static CEnvironmentalReverbUtility* NewL(CMdaAudioConvertUtility& aUtility); 00078 00085 IMPORT_C static CEnvironmentalReverbUtility* NewL(CMdaAudioInputStream& aUtility); 00086 00093 IMPORT_C static CEnvironmentalReverbUtility* NewL(CMdaAudioOutputStream& aUtility); 00094 00101 IMPORT_C static CEnvironmentalReverbUtility* NewL(CMdaAudioPlayerUtility& aUtility); 00102 00109 IMPORT_C static CEnvironmentalReverbUtility* NewL(CMdaAudioRecorderUtility& aUtility); 00110 00117 IMPORT_C static CEnvironmentalReverbUtility* NewL(CMdaAudioToneUtility& aUtility); 00118 00125 IMPORT_C static CEnvironmentalReverbUtility* NewL(CCustomCommandUtility* aUtility); 00126 00133 IMPORT_C static CEnvironmentalReverbUtility* NewL(MCustomInterface& aCustomInterface); 00134 00135 00136 #start_since SINCE_3_1_SDK 00137 00144 IMPORT_C static CEnvironmentalReverbUtility* NewL(CMidiClientUtility& aUtility); 00145 #end_since SINCE_3_1_SDK 00146 00147 00148 00152 virtual ~CEnvironmentalReverbUtility(); 00153 00159 IMPORT_C void ApplyPresetL(TInt aPreset); 00160 00165 IMPORT_C void DisableEnvironmentalReverbL(); 00166 00173 IMPORT_C void CreatePresetL(TDesC& aName, CEnvironmentalReverb& aEnvironmentalReverbUI); 00174 00180 IMPORT_C void DeletePresetL(TInt aPresetIndex); 00181 00187 IMPORT_C const TDesC& GetPresetL(TInt aPresetIndex); 00188 00194 IMPORT_C CEnvironmentalReverb& EnvironmentalReverb(); 00195 00203 IMPORT_C void ModifyPresetL(TInt aPresetIndex, TDesC& aName, CEnvironmentalReverb& aEnvironmentalReverbUI); 00204 00210 IMPORT_C TUint32 NumberOfPreDefinedPresets() const; 00211 00217 IMPORT_C TArray<TEfEnvironmentalReverbUtilityPreset> Presets(); 00218 00224 IMPORT_C void ResetPresetL(TInt aPresetIndex); 00225 00226 private: 00227 00231 CEnvironmentalReverbUtility(); 00232 00242 void ConstructL(CMMFDevSound& aDevSound); 00243 00249 void ConstructL(CMdaAudioConvertUtility& aUtility); 00250 00256 void ConstructL(CMdaAudioInputStream& aUtility); 00257 00263 void ConstructL(CMdaAudioOutputStream& aUtility); 00264 00270 void ConstructL(CMdaAudioPlayerUtility& aUtility); 00271 00277 void ConstructL(CMdaAudioRecorderUtility& aUtility); 00278 00284 void ConstructL(CMdaAudioToneUtility& aUtility); 00285 00291 void ConstructL(CCustomCommandUtility* aUtility); 00292 00298 void ConstructL(MCustomInterface& aCustomInterface); 00299 00300 #start_since SINCE_3_1_SDK 00301 00307 void ConstructL(CMidiClientUtility& aUtility); 00308 #end_since SINCE_3_1_SDK 00309 00310 00316 void UpdateFullPresetArrayFromCenRep(RArray<TEfEnvironmentalReverbUtilityPreset> &aFullPresetArray); 00317 00323 void UpdatePresetArray(RArray<TEfEnvironmentalReverbUtilityPreset>& aPresetArray,const RArray<TEfEnvironmentalReverbUtilityPreset> &aFullPresetArray); 00324 00325 00326 private: // Data 00327 00328 // Array for Storing the Current State of the Repository 00329 // which has been compacted after the transaction 00330 // with the Central Repository 00331 RArray<TEfEnvironmentalReverbUtilityPreset> iPresetArray; 00332 00333 // Array Which contains the full information from the 00334 // Central Repository except the Description Values 00335 RArray<TEfEnvironmentalReverbUtilityPreset> iFullPresetArray; 00336 00337 // Pointer to the EnvironmentalReverb Object 00338 CEnvironmentalReverb* iEnvironmentalReverb; 00339 00340 // Pointer to the EnvironmentalReverb Object 00341 // which is returned to the UI for Manipulation 00342 CEnvironmentalReverb* iTransEnvironmentalReverb; 00343 00344 // Pointer to the Preset Repository 00345 CRepository* iPresetRepository; 00346 }; 00347 00348 // CENVIRONMENTALREVERBUTILITY_H 00349 #endif 00350 00351 // End of File