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: 5 % 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 class CMidiClientUtility; 00045 class CDrmPlayerUtility; 00046 class CVideoPlayerUtility; 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 00140 IMPORT_C static CStereoWideningUtility* NewL(CMidiClientUtility& aUtility); 00141 00148 IMPORT_C static CStereoWideningUtility* NewL( CDrmPlayerUtility& aUtility ); 00149 00156 IMPORT_C static CStereoWideningUtility* NewL( CVideoPlayerUtility& aUtility ); 00157 00161 virtual ~CStereoWideningUtility(); 00162 00168 IMPORT_C void ApplyPresetL(TInt aPreset); 00169 00174 IMPORT_C void DisableStereoWideningL(); 00175 00182 IMPORT_C void CreatePresetL(TDesC& aName, CStereoWidening& aStereoWideningUI); 00183 00189 IMPORT_C void DeletePresetL(TInt aPresetIndex); 00190 00196 IMPORT_C const TDesC& GetPresetL(TInt aPresetIndex); 00197 00203 IMPORT_C CStereoWidening& StereoWidening(); 00204 00212 IMPORT_C void ModifyPresetL(TInt aPresetIndex, TDesC& aName, CStereoWidening& aStereoWideningUI); 00213 00219 IMPORT_C TUint32 NumberOfPreDefinedPresets() const; 00220 00226 IMPORT_C TArray<TEfStereoWideningUtilityPreset> Presets(); 00227 00233 IMPORT_C void ResetPresetL(TInt aPresetIndex); 00234 00235 private: 00236 00240 CStereoWideningUtility(); 00241 00251 void ConstructL(CMMFDevSound& aDevSound); 00252 00258 void ConstructL(CMdaAudioConvertUtility& aUtility); 00259 00265 void ConstructL(CMdaAudioInputStream& aUtility); 00266 00272 void ConstructL(CMdaAudioOutputStream& aUtility); 00273 00279 void ConstructL(CMdaAudioPlayerUtility& aUtility); 00280 00286 void ConstructL(CMdaAudioRecorderUtility& aUtility); 00287 00293 void ConstructL(CMdaAudioToneUtility& aUtility); 00294 00300 void ConstructL(CCustomCommandUtility* aUtility); 00301 00307 void ConstructL(MCustomInterface& aCustomInterface); 00308 00314 void ConstructL(CMidiClientUtility& aUtility); 00315 00321 void ConstructL(CDrmPlayerUtility& aUtility); 00322 00328 void ConstructL(CVideoPlayerUtility& aUtility); 00329 00335 void UpdateFullPresetArrayFromCenRep(RArray<TEfStereoWideningUtilityPreset> &aFullPresetArray); 00336 00342 void UpdatePresetArray(RArray<TEfStereoWideningUtilityPreset>& aPresetArray,const RArray<TEfStereoWideningUtilityPreset> &aFullPresetArray); 00343 00344 00345 private: // Data 00346 00347 // Array for Storing the Current State of the Repository 00348 // which has been compacted after the transaction 00349 // with the Central Repository 00350 RArray<TEfStereoWideningUtilityPreset> iPresetArray; 00351 00352 // Array Which contains the full information from the 00353 // Central Repository except the Description Values 00354 RArray<TEfStereoWideningUtilityPreset> iFullPresetArray; 00355 00356 // Pointer to the StereoWidening Object 00357 CStereoWidening* iStereoWidening; 00358 00359 // Pointer to the StereoWidening Object 00360 // which is returned to the UI for Manipulation 00361 CStereoWidening* iTransStereoWidening; 00362 00363 // Pointer to the Preset Repository 00364 CRepository* iPresetRepository; 00365 }; 00366 00367 // CStereoWideningUTILITY_H 00368 #endif 00369 00370 // End of File