00001 /* 00002 * ============================================================================== 00003 * Name : StereoWideningUTILITY.h 00004 * Part of : Audio Effects Framework 00005 * Description : This is the definition of the audio StereoWidening 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 STEREOWIDENINGUTILITY_H 00022 #define STEREOWIDENINGUTILITY_H 00023 00024 // INCLUDES 00025 #include <e32base.h> 00026 #include <e32svr.h> 00027 #include <StereoWideningBase.h> 00028 #include <centralrepository.h> 00029 #include <StereoWideningUtilityData.h> 00030 00031 // FORWARD DECLARATIONS 00032 class TEfStereoWideningUtilityPreset; 00033 class CStereoWidening; 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 // CLASS DECLARATION 00049 00057 class CStereoWideningUtility : public CBase 00058 { 00059 public: // Constructors and destructor 00060 00061 00068 IMPORT_C static CStereoWideningUtility* NewL(CMMFDevSound& aDevSound); 00069 00076 IMPORT_C static CStereoWideningUtility* NewL(CMdaAudioConvertUtility& aUtility); 00077 00084 IMPORT_C static CStereoWideningUtility* NewL(CMdaAudioInputStream& aUtility); 00085 00092 IMPORT_C static CStereoWideningUtility* NewL(CMdaAudioOutputStream& aUtility); 00093 00100 IMPORT_C static CStereoWideningUtility* NewL(CMdaAudioPlayerUtility& aUtility); 00101 00108 IMPORT_C static CStereoWideningUtility* NewL(CMdaAudioRecorderUtility& aUtility); 00109 00116 IMPORT_C static CStereoWideningUtility* NewL(CMdaAudioToneUtility& aUtility); 00117 00124 IMPORT_C static CStereoWideningUtility* NewL(CCustomCommandUtility* aUtility); 00125 00132 IMPORT_C static CStereoWideningUtility* NewL(MCustomInterface& aCustomInterface); 00133 00134 #start_since SINCE_3_1_SDK 00135 00142 IMPORT_C static CStereoWideningUtility* NewL(CMidiClientUtility& aUtility); 00143 #end_since SINCE_3_1_SDK 00144 00145 00149 virtual ~CStereoWideningUtility(); 00150 00156 IMPORT_C void ApplyPresetL(TInt aPreset); 00157 00162 IMPORT_C void DisableStereoWideningL(); 00163 00170 IMPORT_C void CreatePresetL(TDesC& aName, CStereoWidening& aStereoWideningUI); 00171 00177 IMPORT_C void DeletePresetL(TInt aPresetIndex); 00178 00184 IMPORT_C const TDesC& GetPresetL(TInt aPresetIndex); 00185 00191 IMPORT_C CStereoWidening& StereoWidening(); 00192 00200 IMPORT_C void ModifyPresetL(TInt aPresetIndex, TDesC& aName, CStereoWidening& aStereoWideningUI); 00201 00207 IMPORT_C TUint32 NumberOfPreDefinedPresets() const; 00208 00214 IMPORT_C TArray<TEfStereoWideningUtilityPreset> Presets(); 00215 00221 IMPORT_C void ResetPresetL(TInt aPresetIndex); 00222 00223 private: 00224 00228 CStereoWideningUtility(); 00229 00239 void ConstructL(CMMFDevSound& aDevSound); 00240 00246 void ConstructL(CMdaAudioConvertUtility& aUtility); 00247 00253 void ConstructL(CMdaAudioInputStream& aUtility); 00254 00260 void ConstructL(CMdaAudioOutputStream& aUtility); 00261 00267 void ConstructL(CMdaAudioPlayerUtility& aUtility); 00268 00274 void ConstructL(CMdaAudioRecorderUtility& aUtility); 00275 00281 void ConstructL(CMdaAudioToneUtility& aUtility); 00282 00288 void ConstructL(CCustomCommandUtility* aUtility); 00289 00295 void ConstructL(MCustomInterface& aCustomInterface); 00296 00297 #start_since SINCE_3_1_SDK 00298 00304 void ConstructL(CMidiClientUtility& aUtility); 00305 #end_since SINCE_3_1_SDK 00306 00307 00313 void UpdateFullPresetArrayFromCenRep(RArray<TEfStereoWideningUtilityPreset> &aFullPresetArray); 00314 00320 void UpdatePresetArray(RArray<TEfStereoWideningUtilityPreset>& aPresetArray,const RArray<TEfStereoWideningUtilityPreset> &aFullPresetArray); 00321 00322 00323 private: // Data 00324 00325 // Array for Storing the Current State of the Repository 00326 // which has been compacted after the transaction 00327 // with the Central Repository 00328 RArray<TEfStereoWideningUtilityPreset> iPresetArray; 00329 00330 // Array Which contains the full information from the 00331 // Central Repository except the Description Values 00332 RArray<TEfStereoWideningUtilityPreset> iFullPresetArray; 00333 00334 // Pointer to the StereoWidening Object 00335 CStereoWidening* iStereoWidening; 00336 00337 // Pointer to the StereoWidening Object 00338 // which is returned to the UI for Manipulation 00339 CStereoWidening* iTransStereoWidening; 00340 00341 // Pointer to the Preset Repository 00342 CRepository* iPresetRepository; 00343 }; 00344 00345 // CStereoWideningUTILITY_H 00346 #endif 00347 00348 // End of File