1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mm_pub/audio_effects_api/inc/LoudnessBase.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,229 @@
1.4 +/*
1.5 +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: This is the definition of the Loudness effect class.
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +#ifndef CLOUDNESS_H
1.23 +#define CLOUDNESS_H
1.24 +
1.25 +// INCLUDES
1.26 +
1.27 +#include <e32base.h>
1.28 +#include <AudioEffectBase.h>
1.29 +#include <LoudnessData.h>
1.30 +#include <MCustomInterface.h>
1.31 +
1.32 +const TUid KUidLoudnessEffect = {0x10207AA8};
1.33 +
1.34 +// FORWARD DELCARATION
1.35 +class CMdaAudioConvertUtility;
1.36 +class CMdaAudioPlayerUtility;
1.37 +class CMdaAudioRecorderUtility;
1.38 +class CMdaAudioInputStream;
1.39 +class CMdaAudioOutputStream;
1.40 +class CMdaAudioToneUtility;
1.41 +class CCustomCommandUtility;
1.42 +class CCustomInterfaceUtility;
1.43 +class CMMFDevSound;
1.44 +class CMidiClientUtility;
1.45 +class CDrmPlayerUtility;
1.46 +class CVideoPlayerUtility;
1.47 +
1.48 +// CLASS DECLARATION
1.49 +
1.50 +/**
1.51 +* This is the Loudness effect class for managing audio Loudness settings.
1.52 +*
1.53 +* @lib LoudnessUtility.lib
1.54 +* @since 3.0
1.55 +*/
1.56 +
1.57 +class CLoudness : public CAudioEffect
1.58 + {
1.59 +
1.60 + public: //New Functions
1.61 +
1.62 + /**
1.63 + * Factory function for creating the audio Loudness object.
1.64 + * @since 3.0
1.65 + * @param aUtility A reference to a convert utility
1.66 + * @return pointer to CLoudness object
1.67 + */
1.68 + IMPORT_C static CLoudness* NewL( CMdaAudioConvertUtility& aUtility );
1.69 +
1.70 + /**
1.71 + * Factory function for creating the Loudness object.
1.72 + * @since 3.0
1.73 + * @param aUtility A reference to an audio input stream utility
1.74 + * @param aEnable Indicate whether the effect will be automatically enabled after creation.
1.75 + * @return pointer to CLoudness object
1.76 + */
1.77 + IMPORT_C static CLoudness* NewL( CMdaAudioInputStream& aUtility , TBool aEnable = EFalse );
1.78 +
1.79 + /**
1.80 + * Factory function for creating the Loudness object.
1.81 + * @since 3.0
1.82 + * @param aUtility A reference to an audio output stream utility
1.83 + * @param aEnable Indicate whether the effect will be automatically enabled after creation.
1.84 + * @return pointer to CLoudness object
1.85 + */
1.86 + IMPORT_C static CLoudness* NewL( CMdaAudioOutputStream& aUtility , TBool aEnable = EFalse );
1.87 +
1.88 + /**
1.89 + * Factory function for creating the Loudness object.
1.90 + * @since 3.0
1.91 + * @param aUtility A reference to an audio player utility
1.92 + * @param aEnable Indicate whether the effect will be automatically enabled after creation.
1.93 + * @return pointer to CLoudness object
1.94 + */
1.95 + IMPORT_C static CLoudness* NewL( CMdaAudioPlayerUtility& aUtility , TBool aEnable = EFalse );
1.96 +
1.97 + /**
1.98 + * Factory function for creating the Loudness object.
1.99 + * @since 3.0
1.100 + * @param aUtility A reference to an audio record utility
1.101 + * @param aRecordStream ETrue if the effect is to be applied to the recording,
1.102 + * EFalse if the effect is to be applied only to the playback
1.103 + * @param aEnable Indicate whether the effect will be automatically enabled after creation.
1.104 + * @return pointer to CLoudness object
1.105 + */
1.106 + IMPORT_C static CLoudness* NewL( CMdaAudioRecorderUtility& aUtility, TBool aRecordStream, TBool aEnable = EFalse );
1.107 +
1.108 + /**
1.109 + * Factory function for creating the Loudness object.
1.110 + * @since 3.0
1.111 + * @param aUtility A reference to an audio tone utility
1.112 + * @param aEnable Indicate whether the effect will be automatically enabled after creation.
1.113 + * @return pointer to CLoudness object
1.114 + */
1.115 + IMPORT_C static CLoudness* NewL( CMdaAudioToneUtility& aUtility , TBool aEnable = EFalse );
1.116 +
1.117 + /**
1.118 + * Factory function for creating the Loudness object.
1.119 + * @since 3.0
1.120 + * @param aDevSound A reference to a DevSound instance
1.121 + * @param aEnable Indicate whether the effect will be automatically enabled after creation.
1.122 + * @return pointer to CLoudness object
1.123 + */
1.124 + IMPORT_C static CLoudness* NewL( CMMFDevSound& aDevSound, TBool aEnable = EFalse );
1.125 +
1.126 + /**
1.127 + * Factory function for creating the Loudness object.
1.128 + * @since 3.0
1.129 + * @param aUtility A reference to a custom command utility
1.130 + * @param aEnable Indicate whether the effect will be automatically enabled after creation.
1.131 + * @return pointer to CLoudness object
1.132 + */
1.133 + IMPORT_C static CLoudness* NewL( CCustomCommandUtility* aUtility , TBool aEnable = EFalse );
1.134 +
1.135 + /**
1.136 + * Factory function for creating the Loudness object.
1.137 + * @since 3.0
1.138 + * @param aCustomInterface A reference to a custom interface
1.139 + * @param aEnable Indicate whether the effect will be automatically enabled after creation.
1.140 + * @return pointer to CLoudness object
1.141 + */
1.142 + IMPORT_C static CLoudness* NewL( MCustomInterface& aCustomInterface, TBool aEnable = EFalse );
1.143 +
1.144 + /**
1.145 + * Factory function for creating the Loudness object.
1.146 + * @since 3.0
1.147 + * @param aUtility A reference to a CMidiClientUtility
1.148 + * @param aEnable Indicate whether the effect will be automatically enabled after creation.
1.149 + * @return pointer to CLoudness object
1.150 + */
1.151 + IMPORT_C static CLoudness* NewL( CMidiClientUtility& aUtility , TBool aEnable = EFalse );
1.152 +
1.153 + /**
1.154 + * Factory function for creating the Loudness object.
1.155 + * @since 3.0
1.156 + * @param CDrmPlayerUtility A reference to a CDrmPlayerUtility object
1.157 + * @return pointer to CLoudness object
1.158 + */
1.159 + IMPORT_C static CLoudness* NewL( CDrmPlayerUtility& aUtility , TBool aEnable = EFalse);
1.160 +
1.161 + /**
1.162 + * Factory function for creating the Loudness object.
1.163 + * @since 3.2
1.164 + * @param CVideoPlayerUtility A reference to a CVideoPlayerUtility object
1.165 + * @return pointer to CLoudness object
1.166 + */
1.167 + IMPORT_C static CLoudness* NewL( CVideoPlayerUtility& aUtility , TBool aEnable = EFalse);
1.168 +
1.169 + /**
1.170 + *
1.171 + * Destructor
1.172 + */
1.173 + IMPORT_C virtual ~CLoudness();
1.174 +
1.175 + public: // functions from base class
1.176 +
1.177 + /*
1.178 + * From CAudioEffect
1.179 + * Get the unique identifier of the audio effect
1.180 + * @since 3.0
1.181 + * @return Unique identifier
1.182 + */
1.183 + IMPORT_C TUid Uid() const;
1.184 +
1.185 + protected: // functions from base class
1.186 +
1.187 + /**
1.188 + * From CAudioEffect
1.189 + * Create a package of the effect data
1.190 + * @since 3.0
1.191 + * @return A descriptor containing the effect data.
1.192 + */
1.193 + IMPORT_C const TDesC8& DoEffectData();
1.194 +
1.195 + /**
1.196 + * From CAudioEffect
1.197 + * Internal function to unpack effect data
1.198 + * @since 3.0
1.199 + * @param aEffectDataBuffer Descriptor containing packed effect data
1.200 + * @return -
1.201 + */
1.202 + IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer );
1.203 +
1.204 + protected:
1.205 +
1.206 + /**
1.207 + * Private C++ constructor for this class.
1.208 + * @since 3.0
1.209 + * @param aEffectObserver reference to event observer object
1.210 + * @return -
1.211 + */
1.212 + IMPORT_C CLoudness();
1.213 +
1.214 +
1.215 + protected:
1.216 +
1.217 + // Loudness data structure
1.218 + TEfLoudnessData iLoudnessData;
1.219 + // Data package sent to server
1.220 + TEfLoudnessDataPckg iDataPckgTo;
1.221 + // Data package received from server
1.222 + TEfLoudnessDataPckg iDataPckgFrom;
1.223 +
1.224 + protected: // Friend classes
1.225 +
1.226 + friend class CLoudnessMessageHandler;
1.227 +
1.228 + };
1.229 +
1.230 +#endif // of CLOUDNESS_H
1.231 +
1.232 +// End of File