williamr@2: /* williamr@2: * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@4: * under the terms of "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: This is the definition of the Bass Boost effect class. williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #ifndef BASSBOOSTBASE_H williamr@2: #define BASSBOOSTBASE_H williamr@2: williamr@2: // INCLUDES williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: const TUid KUidBassBoostEffect = {0x10203827}; williamr@2: williamr@2: // FORWARD DELCARATION williamr@2: class CMdaAudioConvertUtility; williamr@2: class CMdaAudioPlayerUtility; williamr@2: class CMdaAudioRecorderUtility; williamr@2: class CMdaAudioInputStream; williamr@2: class CMdaAudioOutputStream; williamr@2: class CMdaAudioToneUtility; williamr@2: class CCustomCommandUtility; williamr@2: class CCustomInterfaceUtility; williamr@2: class CMMFDevSound; williamr@2: class CMidiClientUtility; williamr@2: class CDrmPlayerUtility; williamr@2: class CVideoPlayerUtility; williamr@2: williamr@2: // CLASS DECLARATION williamr@2: williamr@2: /** williamr@2: * This is the bass boost effect class for managing audio bass boost settings. williamr@2: * williamr@2: * @lib BassBoostUtility.lib williamr@2: * @since 3.0 williamr@2: */ williamr@2: williamr@2: class CBassBoost : public CAudioEffect williamr@2: { williamr@2: williamr@2: public: //New Functions williamr@2: williamr@2: /** williamr@2: * Factory function for creating the bass boost object. williamr@2: * @since 3.0 williamr@2: * @param aDevSound A reference to a DevSound instance williamr@2: * @param aEnable Indicate whether the effect will be automatically enabled after creation. williamr@2: * @return pointer to CBassBoost object williamr@2: */ williamr@2: IMPORT_C static CBassBoost* NewL( CMMFDevSound& aDevSound, TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the bass boost object. williamr@2: * @since 3.0 williamr@2: * @param aUtility A reference to an audio convert utility williamr@2: * @param aEnable Indicate whether the effect will be automatically enabled after creation. williamr@2: * @return pointer to CBassBoost object williamr@2: */ williamr@2: IMPORT_C static CBassBoost* NewL( CMdaAudioConvertUtility& aUtility, TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the bass boost object. williamr@2: * @since 3.0 williamr@2: * @param aUtility A reference to an audio input stream utility williamr@2: * @param aEnable Indicate whether the effect will be automatically enabled after creation. williamr@2: * @return pointer to CBassBoost object williamr@2: */ williamr@2: IMPORT_C static CBassBoost* NewL( CMdaAudioInputStream& aUtility, TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the bass boost object. williamr@2: * @since 3.0 williamr@2: * @param aUtility A reference to an audio output stream utility williamr@2: * @param aEnable Indicate whether the effect will be automatically enabled after creation. williamr@2: * @return pointer to CBassBoost object williamr@2: */ williamr@2: IMPORT_C static CBassBoost* NewL( CMdaAudioOutputStream& aUtility, TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the bass boost object. williamr@2: * @since 3.0 williamr@2: * @param aUtility A reference to an audio player utility williamr@2: * @param aEnable Indicate whether the effect will be automatically enabled after creation. williamr@2: * @return pointer to CBassBoost object williamr@2: */ williamr@2: IMPORT_C static CBassBoost* NewL( CMdaAudioPlayerUtility& aUtility, TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the bass boost object. williamr@2: * @since 3.0 williamr@2: * @param aUtility A reference to an audio record utility williamr@2: * @param aRecordStream ETrue if the effect is to be applied to the recording, williamr@2: * EFalse if the effect is to be applied only to the playback williamr@2: * @param aEnable Indicate whether the effect will be automatically enabled after creation. williamr@2: * @return pointer to CBassBoost object williamr@2: */ williamr@2: IMPORT_C static CBassBoost* NewL( CMdaAudioRecorderUtility& aUtility, TBool aRecordStream, TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the bass boost object. williamr@2: * @since 3.0 williamr@2: * @param aUtility A reference to an audio tone utility williamr@2: * @param aEnable Indicate whether the effect will be automatically enabled after creation. williamr@2: * @return pointer to CBassBoost object williamr@2: */ williamr@2: IMPORT_C static CBassBoost* NewL( CMdaAudioToneUtility& aUtility, TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the bass boost object. williamr@2: * @since 3.0 williamr@2: * @param aUtility A reference to a custom command utility williamr@2: * @param aEnable Indicate whether the effect will be automatically enabled after creation. williamr@2: * @return pointer to CBassBoost object williamr@2: */ williamr@2: IMPORT_C static CBassBoost* NewL( CCustomCommandUtility* aUtility, TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the bass boost object. williamr@2: * @since 3.0 williamr@2: * @param aCustomInterface A reference to a custom interface williamr@2: * @param aEnable Indicate whether the effect will be automatically enabled after creation. williamr@2: * @return pointer to CBassBoost object williamr@2: */ williamr@2: IMPORT_C static CBassBoost* NewL( MCustomInterface& aCustomInterface, TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the bass boost object. williamr@2: * @since 3.0 williamr@2: * @param aUtility A reference to a CMidiClientUtility williamr@2: * @param aEnable Indicate whether the effect will be automatically enabled after creation. williamr@2: * @return pointer to CBassBoost object williamr@2: */ williamr@2: IMPORT_C static CBassBoost* NewL( CMidiClientUtility& aUtility, TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the bass boost object. williamr@2: * @since 3.0 williamr@2: * @param CDrmPlayerUtility A reference to a CDrmPlayerUtility object williamr@2: * @return pointer to CBassBoost object williamr@2: */ williamr@2: IMPORT_C static CBassBoost* NewL( CDrmPlayerUtility& aUtility, TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the bass boost object. williamr@2: * @since 3.2 williamr@2: * @param CVideoPlayerUtility A reference to a CVideoPlayerUtility object williamr@2: * @return pointer to CBassBoost object williamr@2: */ williamr@2: IMPORT_C static CBassBoost* NewL( CVideoPlayerUtility& aUtility, TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * williamr@2: * Destructor williamr@2: */ williamr@2: IMPORT_C virtual ~CBassBoost(); williamr@2: williamr@2: public: // functions from base class williamr@2: williamr@2: /* williamr@2: * From CAudioEffect williamr@2: * Get the unique identifier of the audio effect williamr@2: * @since 3.0 williamr@2: * @return Unique identifier williamr@2: */ williamr@2: IMPORT_C TUid Uid() const; williamr@2: williamr@2: protected: // Functions from base classes williamr@2: williamr@2: /** williamr@2: * From CAudioEffect williamr@2: * Create a package of the effect data williamr@2: * @since 3.0 williamr@2: * @return A descriptor containing the effect data. williamr@2: */ williamr@2: IMPORT_C const TDesC8& DoEffectData(); williamr@2: williamr@2: /** williamr@2: * From CAudioEffect williamr@2: * Internal function to unpack effect data williamr@2: * @since 3.0 williamr@2: * @param aEffectDataBuffer Descriptor containing packed effect data williamr@2: * @return - williamr@2: */ williamr@2: IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer ); williamr@2: williamr@2: protected: williamr@2: williamr@2: /** williamr@2: * Private C++ constructor for this class. williamr@2: * @since 3.0 williamr@2: * @param aEffectObserver reference to event observer object williamr@2: * @return - williamr@2: */ williamr@2: IMPORT_C CBassBoost(); williamr@2: williamr@2: protected: williamr@2: williamr@2: // BassBoost data structure williamr@2: TEfBassBoostData iBassBoostData; williamr@2: // Data package sent to server williamr@2: TEfBassBoostDataPckg iDataPckgTo; williamr@2: // Data package received from server williamr@2: TEfBassBoostDataPckg iDataPckgFrom; williamr@2: williamr@2: protected: // Friend classes williamr@2: williamr@2: friend class CBassBoostMessageHandler; williamr@2: }; williamr@2: williamr@2: #endif // of BASSBOOSTBASE_H williamr@2: williamr@2: // End of File