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 RoomLevel effect class. sl@0: * sl@0: */ sl@0: sl@0: sl@0: #ifndef CROOMLEVEL_H sl@0: #define CROOMLEVEL_H sl@0: sl@0: // INCLUDES sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: const TUid KUidRoomLevelEffect = {0x10207B3C}; sl@0: sl@0: // FORWARD DELCARATION 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 CMidiClientUtility; sl@0: class CEnvironmentalReverb; sl@0: class CDrmPlayerUtility; sl@0: class CVideoPlayerUtility; sl@0: sl@0: // CLASS DECLARATION sl@0: sl@0: /** sl@0: * This is the Environmental RoomLevel effect class for managing RoomLevel settings. sl@0: * sl@0: * @lib RoomLevelEffect.lib sl@0: * @since 3.0 sl@0: */ sl@0: sl@0: class CRoomLevel : public CAudioEffect sl@0: { sl@0: sl@0: public: //New Functions sl@0: /** sl@0: * Factory function for creating the audio RoomLevel object. sl@0: * @since 3.0 sl@0: * @param aUtility A reference to a convert utility sl@0: * @param aReverb A reference to a environmental reverb utility sl@0: * @return pointer to CRoomLevel object sl@0: */ sl@0: IMPORT_C static CRoomLevel* NewL( CMdaAudioConvertUtility& aUtility, CEnvironmentalReverb& aReverb); sl@0: sl@0: /** sl@0: * Factory function for creating the audio RoomLevel object. sl@0: * @since 3.0 sl@0: * @param aUtility A reference to an audio input stream utility sl@0: * @param aReverb A reference to a environmental reverb utility sl@0: * @return pointer to CRoomLevel object sl@0: */ sl@0: IMPORT_C static CRoomLevel* NewL( CMdaAudioInputStream& aUtility, CEnvironmentalReverb& aReverb ); sl@0: sl@0: /** sl@0: * Factory function for creating the audio RoomLevel object. sl@0: * @since 3.0 sl@0: * @param aUtility A reference to an audio output stream utility sl@0: * @param aReverb A reference to a environmental reverb utility sl@0: * @return pointer to CRoomLevel object sl@0: */ sl@0: IMPORT_C static CRoomLevel* NewL( CMdaAudioOutputStream& aUtility, CEnvironmentalReverb& aReverb); sl@0: sl@0: /** sl@0: * Factory function for creating the audio RoomLevel object. sl@0: * @since 3.0 sl@0: * @param aUtility A reference to an audio player utility sl@0: * @param aReverb A reference to a environmental reverb utility sl@0: * @return pointer to CRoomLevel object sl@0: */ sl@0: IMPORT_C static CRoomLevel* NewL( CMdaAudioPlayerUtility& aUtility, CEnvironmentalReverb& aReverb ); sl@0: sl@0: /** sl@0: * Factory function for creating the audio RoomLevel object. sl@0: * @since 3.0 sl@0: * @param aUtility A reference to an audio record utility sl@0: * @param aRecordStream ETrue if the effect is to be applied to the recording, sl@0: * EFalse if the effect is to be applied only to the playback sl@0: * @param aReverb A reference to a environmental reverb utility sl@0: * @return pointer to CRoomLevel object sl@0: */ sl@0: IMPORT_C static CRoomLevel* NewL( CMdaAudioRecorderUtility& aUtility, TBool aRecordStream, CEnvironmentalReverb& aReverb); sl@0: sl@0: /** sl@0: * Factory function for creating the audio RoomLevel object. sl@0: * @since 3.0 sl@0: * @param aUtility A reference to an audio tone utility sl@0: * @param aReverb A reference to a environmental reverb utility sl@0: * @return pointer to CRoomLevel object sl@0: */ sl@0: IMPORT_C static CRoomLevel* NewL( CMdaAudioToneUtility& aUtility, CEnvironmentalReverb& aReverb ); sl@0: sl@0: /** sl@0: * Factory function for creating the audio RoomLevel object. sl@0: * @since 3.0 sl@0: * @param aDevSound A reference to a DevSound instance sl@0: * @param aReverb A reference to a environmental reverb utility sl@0: * @return pointer to CRoomLevel object sl@0: */ sl@0: IMPORT_C static CRoomLevel* NewL( CMMFDevSound& aDevSound, CEnvironmentalReverb& aReverb); sl@0: sl@0: /** sl@0: * Factory function for creating the audio RoomLevel object. sl@0: * @since 3.0 sl@0: * @param aUtility A reference to a custom command utility sl@0: * @param aReverb A reference to a environmental reverb utility sl@0: * @return pointer to CRoomLevel object sl@0: */ sl@0: IMPORT_C static CRoomLevel* NewL( CCustomCommandUtility* aUtility, CEnvironmentalReverb& aReverb ); sl@0: sl@0: /** sl@0: * Factory function for creating the audio RoomLevel object. sl@0: * @since 3.0 sl@0: * @param aCustomInterface A reference to a custom interface sl@0: * @param aReverb A reference to a environmental reverb utility sl@0: * @return pointer to CRoomLevel object sl@0: */ sl@0: IMPORT_C static CRoomLevel* NewL( MCustomInterface& aCustomInterface, CEnvironmentalReverb& aReverb ); sl@0: sl@0: /** sl@0: * Factory function for creating the audio RoomLevel object. sl@0: * @since 3.0 sl@0: * @param aUtility A reference to a CMidiClientUtility object sl@0: * @param aReverb A reference to a environmental reverb utility sl@0: * @return pointer to CRoomLevel object sl@0: */ sl@0: IMPORT_C static CRoomLevel* NewL( CMidiClientUtility& aUtility, CEnvironmentalReverb& aReverb); sl@0: sl@0: /** sl@0: * Factory function for creating the RoomLevel object. sl@0: * @since 3.0 sl@0: * @param CDrmPlayerUtility A reference to a CDrmPlayerUtility object sl@0: * @return pointer to CRoomLevel object sl@0: */ sl@0: IMPORT_C static CRoomLevel* NewL( CDrmPlayerUtility& aUtility, CEnvironmentalReverb& aReverb ); sl@0: sl@0: /** sl@0: * Factory function for creating the RoomLevel object. sl@0: * @since 3.2 sl@0: * @param CVideoPlayerUtility A reference to a CVideoPlayerUtility object sl@0: * @return pointer to CRoomLevel object sl@0: */ sl@0: IMPORT_C static CRoomLevel* NewL( CVideoPlayerUtility& aUtility, CEnvironmentalReverb& aReverb ); sl@0: sl@0: /** sl@0: * sl@0: * Destructor sl@0: */ sl@0: IMPORT_C virtual ~CRoomLevel(); sl@0: sl@0: /** sl@0: * Gets the RoomLevel current level in mB sl@0: * @since 3.0 sl@0: * @return RoomLevel current level sl@0: */ sl@0: IMPORT_C TInt32 Level() const; sl@0: sl@0: /** sl@0: * Gets the RoomLevel current level maximum and minimum in mB sl@0: * @since 3.0 sl@0: * @param aMin Minimum current level sl@0: * @param aMax Maximum current level sl@0: * @return - sl@0: */ sl@0: IMPORT_C void LevelRange( TInt32& aMin, TInt32& aMax ); sl@0: sl@0: /** sl@0: * Sets the RoomLevel level, it will leave if aRoomLevel is not within range of Min and Max sl@0: * @since 3.0 sl@0: * @param aRoomLevelLevel The RoomLevel level in mB sl@0: */ sl@0: IMPORT_C void SetRoomLevelL( TInt32 aRoomLevel ); sl@0: sl@0: sl@0: public: // functions from base class sl@0: sl@0: /* sl@0: * From CAudioEffect sl@0: * Get the unique identifier of the audio effect sl@0: * @since 3.0 sl@0: * @return Unique identifier sl@0: */ sl@0: IMPORT_C TUid Uid() const; sl@0: sl@0: protected: // Functions from base classes sl@0: sl@0: /** sl@0: * From CAudioEffect sl@0: * Create a package of the effect data sl@0: * @since 3.0 sl@0: * @return A descriptor containing the effect data. sl@0: */ sl@0: IMPORT_C const TDesC8& DoEffectData(); sl@0: sl@0: /** sl@0: * From CAudioEffect sl@0: * Internal function to unpack effect data sl@0: * @since 3.0 sl@0: * @param aEffectDataBuffer Descriptor containing packed effect data sl@0: * @return - sl@0: */ sl@0: IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer ); sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: sl@0: protected: sl@0: sl@0: /** sl@0: * Private C++ constructor for this class. sl@0: * @since 3.0 sl@0: * @return - sl@0: */ sl@0: IMPORT_C CRoomLevel(); sl@0: sl@0: protected: sl@0: CEnvironmentalReverb* iClientReverb; sl@0: // RoomLevel data structure sl@0: TEfRoomLevel iRoomLevelData; sl@0: // Data package sent to server sl@0: TEfRoomLevelDataPckg iDataPckgTo; sl@0: // Data package received from server sl@0: TEfRoomLevelDataPckg iDataPckgFrom; sl@0: sl@0: friend class CRoomLevelMessageHandler; sl@0: // friend class CEnvironmentalReverbImpl; sl@0: sl@0: }; sl@0: sl@0: #endif // of CROOMLEVEL_H sl@0: sl@0: // End of File