audioequalizerutility.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : AUDIOEQUALIZERUTILITY.h
00004 *  Part of     : Audio Effects Framework
00005 *  Description : This is the definition of the audio equalizer utility class.
00006 *  Version     : %version: 6 %
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 CAUDIOEQUALIZERUTILITY_H
00022 #define CAUDIOEQUALIZERUTILITY_H
00023 
00024 //  INCLUDES
00025 #include <e32base.h>
00026 #include <e32svr.h>
00027 #include <AudioEqualizerBase.h>
00028 #include <BassBoostBase.h>
00029 #include <centralrepository.h>
00030 #include <AudioEqualizerUtilityData.h>
00031 
00032 // FORWARD DECLARATIONS
00033 class TEfAudioEqualizerUtilityPreset;
00034 class CAudioEqualizer;
00035 class CBassBoost;
00036 class CMdaAudioConvertUtility;
00037 class CMdaAudioPlayerUtility;
00038 class CMdaAudioRecorderUtility;
00039 class CMdaAudioInputStream;
00040 class CMdaAudioOutputStream;
00041 class CMdaAudioToneUtility;
00042 class CCustomCommandUtility;
00043 class CCustomInterfaceUtility;
00044 class CMMFDevSound;
00045 class CRepository;
00046 class CMidiClientUtility;
00047 class CDrmPlayerUtility;
00048 class CVideoPlayerUtility;
00049 
00050 // CLASS DECLARATION
00051 
00059 class CAudioEqualizerUtility : public CBase
00060     {
00061     public:  // Constructors and destructor
00062 
00063 
00070         IMPORT_C static CAudioEqualizerUtility* NewL(CMMFDevSound& aDevSound);
00071 
00078                 IMPORT_C static CAudioEqualizerUtility* NewL(CMdaAudioConvertUtility& aUtility);
00079 
00086                 IMPORT_C static CAudioEqualizerUtility* NewL(CMdaAudioInputStream& aUtility);
00087 
00094                 IMPORT_C static CAudioEqualizerUtility* NewL(CMdaAudioOutputStream& aUtility);
00095 
00102                 IMPORT_C static CAudioEqualizerUtility* NewL(CMdaAudioPlayerUtility& aUtility);
00103 
00110                 IMPORT_C static CAudioEqualizerUtility* NewL(CMdaAudioRecorderUtility& aUtility);
00111 
00118                 IMPORT_C static CAudioEqualizerUtility* NewL(CMdaAudioToneUtility& aUtility);
00119 
00126                 IMPORT_C static CAudioEqualizerUtility* NewL(CCustomCommandUtility* aUtility);
00127 
00134                 IMPORT_C static CAudioEqualizerUtility* NewL(MCustomInterface& aCustomInterface);
00135                 
00142                 IMPORT_C static CAudioEqualizerUtility* NewL(CMidiClientUtility& aUtility);
00143                 
00150                 IMPORT_C static CAudioEqualizerUtility* NewL( CDrmPlayerUtility& aUtility );
00151 
00158                 IMPORT_C static CAudioEqualizerUtility* NewL( CVideoPlayerUtility& aUtility );
00159 
00163         virtual ~CAudioEqualizerUtility();
00164 
00170                 IMPORT_C void ApplyPresetL(TInt aPreset);
00171 
00176                 IMPORT_C void DisableEqualizerL();
00177 
00184                 IMPORT_C void CreatePresetL(TDesC& aName, CAudioEqualizer& aAudioEqualizerUI);
00185 
00191                 IMPORT_C void DeletePresetL(TInt aPresetIndex);
00192 
00198                 IMPORT_C  const TDesC& GetPresetL(TInt aPresetIndex);
00199 
00205                 IMPORT_C CAudioEqualizer& Equalizer();
00206 
00212                 IMPORT_C CBassBoost& BassBoost();
00213 
00221                 IMPORT_C void ModifyPresetL(TInt aPresetIndex, TDesC& aName, CAudioEqualizer& aAudioEqualizerUI);
00222 
00228                 IMPORT_C TUint32 NumberOfPreDefinedPresets() const;
00229 
00235                 IMPORT_C TArray<TEfAudioEqualizerUtilityPreset> Presets();
00236 
00242                 IMPORT_C void ResetPresetL(TInt aPresetIndex);
00243 
00244     private:
00245 
00249         CAudioEqualizerUtility();
00250 
00260         void ConstructL(CMMFDevSound& aDevSound);
00261 
00267                 void ConstructL(CMdaAudioConvertUtility& aUtility);
00268 
00274                 void ConstructL(CMdaAudioInputStream& aUtility);
00275 
00281                 void ConstructL(CMdaAudioOutputStream& aUtility);
00282 
00288                 void ConstructL(CMdaAudioPlayerUtility& aUtility);
00289 
00295                 void ConstructL(CMdaAudioRecorderUtility& aUtility);
00296 
00302                 void ConstructL(CMdaAudioToneUtility& aUtility);
00303 
00309                 void ConstructL(CCustomCommandUtility* aUtility);
00310 
00316                 void ConstructL(MCustomInterface& aCustomInterface);
00317 
00323                 void ConstructL(CMidiClientUtility& aUtility);
00324                 
00330                 void ConstructL(CDrmPlayerUtility& aUtility);           
00331 
00337                 void ConstructL(CVideoPlayerUtility& aUtility);         
00338 
00344                 void UpdateFullPresetArrayFromCenRep(RArray<TEfAudioEqualizerUtilityPreset> &aFullPresetArray);
00345 
00351                 void UpdatePresetArray(RArray<TEfAudioEqualizerUtilityPreset>& aPresetArray,const RArray<TEfAudioEqualizerUtilityPreset> &aFullPresetArray);
00352 
00353 
00354         private: // Data
00355 
00356                 // Array for Storing the Current State of the Repository
00357                 // which has been compacted after the transaction
00358                 // with the Central Repository
00359                 RArray<TEfAudioEqualizerUtilityPreset> iPresetArray;
00360 
00361                 // Array Which contains the full information from the
00362                 // Central Repository except the Description Values
00363                 RArray<TEfAudioEqualizerUtilityPreset> iFullPresetArray;
00364 
00365                 // Pointer to the Equalizer Object
00366                 CAudioEqualizer* iAudioEqualizer;
00367 
00368                 // Pointer to the Equalizer Object
00369                 // which is returned to the UI for Manipulation
00370                 CAudioEqualizer* iTransAudioEqualizer;
00371 
00372                 // Pointer to the Bass Boost Ojbect
00373                 CBassBoost* iBassBoost;
00374 
00375                 // Pointer to the Preset Repository
00376                 CRepository* iPresetRepository;
00377    };
00378 
00379 // CAUDIOEQUALIZERUTILITY_H
00380 #endif
00381 
00382 // End of File

Copyright © Nokia Corporation 2001-2008
Back to top