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