sl@0: /* sl@0: * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: This is the definition of the audio StereoWidening utility class. sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: #ifndef STEREOWIDENINGUTILITY_H sl@0: #define STEREOWIDENINGUTILITY_H sl@0: sl@0: // INCLUDES sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: // FORWARD DECLARATIONS sl@0: class TEfStereoWideningUtilityPreset; sl@0: class CStereoWidening; sl@0: class CMdaAudioConvertUtility; sl@0: class CMdaAudioPlayerUtility; sl@0: class CMdaAudioRecorderUtility; sl@0: class CMdaAudioInputStream; sl@0: class CMdaAudioOutputStream; sl@0: class CMdaAudioToneUtility; sl@0: class CCustomCommandUtility; sl@0: class CCustomInterfaceUtility; sl@0: class CMMFDevSound; sl@0: class CRepository; sl@0: class CMidiClientUtility; sl@0: class CDrmPlayerUtility; sl@0: class CVideoPlayerUtility; sl@0: sl@0: // CLASS DECLARATION sl@0: sl@0: /** sl@0: * This is the StereoWidening Utility class for managing audio StereoWidening presets. sl@0: * sl@0: * @lib StereoWideningUtility.lib sl@0: * @since 3.0 sl@0: */ sl@0: sl@0: class CStereoWideningUtility : public CBase sl@0: { sl@0: public: // Constructors and destructor sl@0: sl@0: sl@0: /** sl@0: * Factory function for creating the audio StereoWidening utility object. sl@0: * @since 3.0 sl@0: * @param aUtility A reference to a Devsound Instance sl@0: * @return pointer to CStereoWideningUtility object sl@0: */ sl@0: IMPORT_C static CStereoWideningUtility* NewL(CMMFDevSound& aDevSound); sl@0: sl@0: /** sl@0: * Factory function for creating the audio StereoWidening utility object. sl@0: * @since 3.0 sl@0: * @param aUtility A reference to a convert utility sl@0: * @return pointer to CStereoWideningUtility object sl@0: */ sl@0: IMPORT_C static CStereoWideningUtility* NewL(CMdaAudioConvertUtility& aUtility); sl@0: sl@0: /** sl@0: * Factory function for creating the audio StereoWidening utility object. sl@0: * @since 3.0 sl@0: * @param aUtility A reference to a audio input stream utility sl@0: * @return pointer to CStereoWideningUtility object sl@0: */ sl@0: IMPORT_C static CStereoWideningUtility* NewL(CMdaAudioInputStream& aUtility); sl@0: sl@0: /** sl@0: * Factory function for creating the audio StereoWidening utility object. sl@0: * @since 3.0 sl@0: * @param aUtility A reference to a audio output stream utility sl@0: * @return pointer to CStereoWideningUtility object sl@0: */ sl@0: IMPORT_C static CStereoWideningUtility* NewL(CMdaAudioOutputStream& aUtility); sl@0: sl@0: /** sl@0: * Factory function for creating the audio StereoWidening utility object. sl@0: * @since 3.0 sl@0: * @param aUtility A reference to a audio player utility sl@0: * @return pointer to CStereoWideningUtility object sl@0: */ sl@0: IMPORT_C static CStereoWideningUtility* NewL(CMdaAudioPlayerUtility& aUtility); sl@0: sl@0: /** sl@0: * Factory function for creating the audio StereoWidening utility object. sl@0: * @since 3.0 sl@0: * @param aUtility A reference to a audio recorder utility sl@0: * @return pointer to CStereoWideningUtility object sl@0: */ sl@0: IMPORT_C static CStereoWideningUtility* NewL(CMdaAudioRecorderUtility& aUtility); sl@0: sl@0: /** sl@0: * Factory function for creating the audio StereoWidening utility object. sl@0: * @since 3.0 sl@0: * @param aUtility A reference to a audio tone utility sl@0: * @return pointer to CStereoWideningUtility object sl@0: */ sl@0: IMPORT_C static CStereoWideningUtility* NewL(CMdaAudioToneUtility& aUtility); sl@0: sl@0: /** sl@0: * Factory function for creating the audio StereoWidening utility object. sl@0: * @since 3.0 sl@0: * @param aUtility A reference to custom command utility sl@0: * @return pointer to CStereoWideningUtility object sl@0: */ sl@0: IMPORT_C static CStereoWideningUtility* NewL(CCustomCommandUtility* aUtility); sl@0: sl@0: /** sl@0: * Factory function for creating the audio StereoWidening utility object. sl@0: * @since 3.0 sl@0: * @param aUtility A reference to custom interface utility sl@0: * @return pointer to CStereoWideningUtility object sl@0: */ sl@0: IMPORT_C static CStereoWideningUtility* NewL(MCustomInterface& aCustomInterface); sl@0: sl@0: /** sl@0: * Factory function for creating the audio StereoWidening utility object. sl@0: * @since 3.0 sl@0: * @param aUtility A reference to CMidiClientUtility sl@0: * @return pointer to CStereoWideningUtility object sl@0: */ sl@0: IMPORT_C static CStereoWideningUtility* NewL(CMidiClientUtility& aUtility); sl@0: sl@0: /** sl@0: * Factory function for creating the audio StereoWidening utility object. sl@0: * @since 3.0 sl@0: * @param CDrmPlayerUtility A reference to a CDrmPlayerUtility object sl@0: * @return pointer to CStereoWideningUtility object sl@0: */ sl@0: IMPORT_C static CStereoWideningUtility* NewL( CDrmPlayerUtility& aUtility ); sl@0: sl@0: /** sl@0: * Factory function for creating the audio StereoWidening utility object. sl@0: * @since 3.2 sl@0: * @param CVideoPlayerUtility A reference to a CVideoPlayerUtility object sl@0: * @return pointer to CStereoWideningUtility object sl@0: */ sl@0: IMPORT_C static CStereoWideningUtility* NewL( CVideoPlayerUtility& aUtility ); sl@0: sl@0: /** sl@0: * Destructor. sl@0: */ sl@0: virtual ~CStereoWideningUtility(); sl@0: sl@0: /** sl@0: * Apply the Preset Index value sl@0: * @since 3.0 sl@0: * @param aPreset Preset Value sl@0: */ sl@0: IMPORT_C void ApplyPresetL(TInt aPreset); sl@0: sl@0: /** sl@0: * Disable the StereoWidening sl@0: * @since 3.0 sl@0: */ sl@0: IMPORT_C void DisableStereoWideningL(); sl@0: sl@0: /** sl@0: * Create a Preset with the given Name and StereoWidening Settings sl@0: * @since 3.0 sl@0: * @param aName Name of the Preset sl@0: * @param aStereoWidening StereoWidening Settings for the Preset sl@0: */ sl@0: IMPORT_C void CreatePresetL(TDesC& aName, CStereoWidening& aStereoWideningUI); sl@0: sl@0: /** sl@0: * Delete a Preset with the given index in the Central Repository sl@0: * @since 3.0 sl@0: * @param aPresetIndex Index of the Preset in the Array sl@0: */ sl@0: IMPORT_C void DeletePresetL(TInt aPresetIndex); sl@0: sl@0: /** sl@0: * Retrieves a Preset with the given index from the Central Repository sl@0: * @since 3.0 sl@0: * @param aPresetIndex Index of the Preset in the Array sl@0: */ sl@0: IMPORT_C const TDesC& GetPresetL(TInt aPresetIndex); sl@0: sl@0: /** sl@0: * Get the reference to the StereoWidening Object sl@0: * @since 3.0 sl@0: * @return Reference to the StereoWidening Object. sl@0: */ sl@0: IMPORT_C CStereoWidening& StereoWidening(); sl@0: sl@0: /** sl@0: * Modify a Preset with the given Name and StereoWidening Settings sl@0: * @since 3.0 sl@0: * @param aPresetIndex Array Index of the Preset sl@0: * @param aName Name of the Preset sl@0: * @param aStereoWidening StereoWidening Settings for the Preset sl@0: */ sl@0: IMPORT_C void ModifyPresetL(TInt aPresetIndex, TDesC& aName, CStereoWidening& aStereoWideningUI); sl@0: sl@0: /** sl@0: * Get the number of Pre Defined Presets sl@0: * @since 3.0 sl@0: * @return Number of Pre Defined Presets sl@0: */ sl@0: IMPORT_C TUint32 NumberOfPreDefinedPresets() const; sl@0: sl@0: /** sl@0: * Get all the Presets defined in the Central Repository sl@0: * @since 3.0 sl@0: * @return Array of all Presets. sl@0: */ sl@0: IMPORT_C TArray Presets(); sl@0: sl@0: /** sl@0: * Reset a System Defined Preset with the given index in the Array returned from Presets() sl@0: * @since 3.0 sl@0: * @param aPresetIndex Index of the Preset in the Array sl@0: */ sl@0: IMPORT_C void ResetPresetL(TInt aPresetIndex); sl@0: sl@0: private: sl@0: sl@0: /** sl@0: * C++ default constructor. sl@0: */ sl@0: CStereoWideningUtility(); sl@0: sl@0: /** sl@0: * By default Symbian 2nd phase constructor is private. sl@0: */ sl@0: sl@0: /** sl@0: * Second Phase Costructor for DevSound Instance sl@0: * @since 3.0 sl@0: * @param aDevSound DevSound Referece sl@0: */ sl@0: void ConstructL(CMMFDevSound& aDevSound); sl@0: sl@0: /** sl@0: * Second Phase Costructor for Audio Convert Utility sl@0: * @since 3.0 sl@0: * @param aUtility CMdaAudioConvertUtility Referece sl@0: */ sl@0: void ConstructL(CMdaAudioConvertUtility& aUtility); sl@0: sl@0: /** sl@0: * Second Phase Costructor for CMdaAudioInputStream sl@0: * @since 3.0 sl@0: * @param aUtility CMdaAudioInputStream Referece sl@0: */ sl@0: void ConstructL(CMdaAudioInputStream& aUtility); sl@0: sl@0: /** sl@0: * Second Phase Costructor for CMdaAudioOutputStream sl@0: * @since 3.0 sl@0: * @param aUtilityCMdaAudioOutputStream Referece sl@0: */ sl@0: void ConstructL(CMdaAudioOutputStream& aUtility); sl@0: sl@0: /** sl@0: * Second Phase Costructor for CMdaAudioPlayerUtility sl@0: * @since 3.0 sl@0: * @param aUtility CMdaAudioPlayerUtility Referece sl@0: */ sl@0: void ConstructL(CMdaAudioPlayerUtility& aUtility); sl@0: sl@0: /** sl@0: * Second Phase Costructor for CMdaAudioRecordUtility sl@0: * @since 3.0 sl@0: * @param aUtility CMdaAudioRecordUtility Referece sl@0: */ sl@0: void ConstructL(CMdaAudioRecorderUtility& aUtility); sl@0: sl@0: /** sl@0: * Second Phase Costructor for CMdaAudioToneUtility sl@0: * @since 3.0 sl@0: * @param aUtility CMdaAudioToneUtility Referece sl@0: */ sl@0: void ConstructL(CMdaAudioToneUtility& aUtility); sl@0: sl@0: /** sl@0: * Second Phase Costructor for MCustomCommand sl@0: * @since 3.0 sl@0: * @param aUtility MCustomCommand Referece sl@0: */ sl@0: void ConstructL(CCustomCommandUtility* aUtility); sl@0: sl@0: /** sl@0: * Second Phase Costructor for MCustomInterface sl@0: * @since 3.0 sl@0: * @param aUtility MCustomInterface Referece sl@0: */ sl@0: void ConstructL(MCustomInterface& aCustomInterface); sl@0: sl@0: /** sl@0: * Second Phase Costructor for CMidiClientUtility sl@0: * @since 3.0 sl@0: * @param aUtility CMidiClientUtility Referece sl@0: */ sl@0: void ConstructL(CMidiClientUtility& aUtility); sl@0: sl@0: /** sl@0: * Second Phase Costructor for CDrmPlayerUtility sl@0: * @since 3.0 sl@0: * @param aUtility CDrmPlayerUtility Referece sl@0: */ sl@0: void ConstructL(CDrmPlayerUtility& aUtility); sl@0: sl@0: /** sl@0: * Second Phase Costructor for CVideoPlayerUtility sl@0: * @since 3.2 sl@0: * @param aUtility CVideoPlayerUtility Referece sl@0: */ sl@0: void ConstructL(CVideoPlayerUtility& aUtility); sl@0: sl@0: /** sl@0: * Function for Updating the Array from the Central Repository sl@0: * @since 3.0 sl@0: * @param aUtility MCustomInterface Referece sl@0: */ sl@0: void UpdateFullPresetArrayFromCenRep(RArray &aFullPresetArray); sl@0: sl@0: /** sl@0: * Function of Updating the Preset Array for the User sl@0: * @since 3.0 sl@0: * @param aUtility MCustomInterface Referece sl@0: */ sl@0: void UpdatePresetArray(RArray& aPresetArray,const RArray &aFullPresetArray); sl@0: sl@0: sl@0: private: // Data sl@0: sl@0: // Array for Storing the Current State of the Repository sl@0: // which has been compacted after the transaction sl@0: // with the Central Repository sl@0: RArray iPresetArray; sl@0: sl@0: // Array Which contains the full information from the sl@0: // Central Repository except the Description Values sl@0: RArray iFullPresetArray; sl@0: sl@0: // Pointer to the StereoWidening Object sl@0: CStereoWidening* iStereoWidening; sl@0: sl@0: // Pointer to the StereoWidening Object sl@0: // which is returned to the UI for Manipulation sl@0: CStereoWidening* iTransStereoWidening; sl@0: sl@0: // Pointer to the Preset Repository sl@0: CRepository* iPresetRepository; sl@0: }; sl@0: sl@0: #endif // CStereoWideningUTILITY_H sl@0: sl@0: // End of File