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@2: * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: * which accompanies this distribution, and is available williamr@2: * at the URL "http://www.symbianfoundation.org/legal/licencesv10.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 Loudness effect class. williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #ifndef CLOUDNESS_H williamr@2: #define CLOUDNESS_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 KUidLoudnessEffect = {0x10207AA8}; 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 Loudness effect class for managing audio Loudness settings. williamr@2: * williamr@2: * @lib LoudnessUtility.lib williamr@2: * @since 3.0 williamr@2: */ williamr@2: williamr@2: class CLoudness : public CAudioEffect williamr@2: { williamr@2: williamr@2: public: //New Functions williamr@2: williamr@2: /** williamr@2: * Factory function for creating the audio Loudness object. williamr@2: * @since 3.0 williamr@2: * @param aUtility A reference to a convert utility williamr@2: * @return pointer to CLoudness object williamr@2: */ williamr@2: IMPORT_C static CLoudness* NewL( CMdaAudioConvertUtility& aUtility ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the Loudness 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 CLoudness object williamr@2: */ williamr@2: IMPORT_C static CLoudness* NewL( CMdaAudioInputStream& aUtility , TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the Loudness 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 CLoudness object williamr@2: */ williamr@2: IMPORT_C static CLoudness* NewL( CMdaAudioOutputStream& aUtility , TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the Loudness 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 CLoudness object williamr@2: */ williamr@2: IMPORT_C static CLoudness* NewL( CMdaAudioPlayerUtility& aUtility , TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the Loudness 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 CLoudness object williamr@2: */ williamr@2: IMPORT_C static CLoudness* NewL( CMdaAudioRecorderUtility& aUtility, TBool aRecordStream, TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the Loudness 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 CLoudness object williamr@2: */ williamr@2: IMPORT_C static CLoudness* NewL( CMdaAudioToneUtility& aUtility , TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the Loudness 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 CLoudness object williamr@2: */ williamr@2: IMPORT_C static CLoudness* NewL( CMMFDevSound& aDevSound, TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the Loudness 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 CLoudness object williamr@2: */ williamr@2: IMPORT_C static CLoudness* NewL( CCustomCommandUtility* aUtility , TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the Loudness 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 CLoudness object williamr@2: */ williamr@2: IMPORT_C static CLoudness* NewL( MCustomInterface& aCustomInterface, TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the Loudness 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 CLoudness object williamr@2: */ williamr@2: IMPORT_C static CLoudness* NewL( CMidiClientUtility& aUtility , TBool aEnable = EFalse ); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the Loudness object. williamr@2: * @since 3.0 williamr@2: * @param CDrmPlayerUtility A reference to a CDrmPlayerUtility object williamr@2: * @return pointer to CLoudness object williamr@2: */ williamr@2: IMPORT_C static CLoudness* NewL( CDrmPlayerUtility& aUtility , TBool aEnable = EFalse); williamr@2: williamr@2: /** williamr@2: * Factory function for creating the Loudness object. williamr@2: * @since 3.2 williamr@2: * @param CVideoPlayerUtility A reference to a CVideoPlayerUtility object williamr@2: * @return pointer to CLoudness object williamr@2: */ williamr@2: IMPORT_C static CLoudness* NewL( CVideoPlayerUtility& aUtility , TBool aEnable = EFalse); williamr@2: williamr@2: /** williamr@2: * williamr@2: * Destructor williamr@2: */ williamr@2: IMPORT_C virtual ~CLoudness(); 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 class 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 CLoudness(); williamr@2: williamr@2: williamr@2: protected: williamr@2: williamr@2: // Loudness data structure williamr@2: TEfLoudnessData iLoudnessData; williamr@2: // Data package sent to server williamr@2: TEfLoudnessDataPckg iDataPckgTo; williamr@2: // Data package received from server williamr@2: TEfLoudnessDataPckg iDataPckgFrom; williamr@2: williamr@2: protected: // Friend classes williamr@2: williamr@2: friend class CLoudnessMessageHandler; williamr@2: williamr@2: }; williamr@2: williamr@2: #endif // of CLOUDNESS_H williamr@2: williamr@2: // End of File