1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mm_pub/audio_effects_api/inc/BassBoostBase.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,228 @@
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 Bass Boost effect class.
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +#ifndef BASSBOOSTBASE_H
1.23 +#define BASSBOOSTBASE_H
1.24 +
1.25 +// INCLUDES
1.26 +
1.27 +#include <e32base.h>
1.28 +#include <AudioEffectBase.h>
1.29 +#include <BassBoostData.h>
1.30 +#include <MCustomInterface.h>
1.31 +
1.32 +const TUid KUidBassBoostEffect = {0x10203827};
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 bass boost effect class for managing audio bass boost settings.
1.52 +*
1.53 +* @lib BassBoostUtility.lib
1.54 +* @since 3.0
1.55 +*/
1.56 +
1.57 +class CBassBoost : public CAudioEffect
1.58 + {
1.59 +
1.60 + public: //New Functions
1.61 +
1.62 + /**
1.63 + * Factory function for creating the bass boost object.
1.64 + * @since 3.0
1.65 + * @param aDevSound A reference to a DevSound instance
1.66 + * @param aEnable Indicate whether the effect will be automatically enabled after creation.
1.67 + * @return pointer to CBassBoost object
1.68 + */
1.69 + IMPORT_C static CBassBoost* NewL( CMMFDevSound& aDevSound, TBool aEnable = EFalse );
1.70 +
1.71 + /**
1.72 + * Factory function for creating the bass boost object.
1.73 + * @since 3.0
1.74 + * @param aUtility A reference to an audio convert utility
1.75 + * @param aEnable Indicate whether the effect will be automatically enabled after creation.
1.76 + * @return pointer to CBassBoost object
1.77 + */
1.78 + IMPORT_C static CBassBoost* NewL( CMdaAudioConvertUtility& aUtility, TBool aEnable = EFalse );
1.79 +
1.80 + /**
1.81 + * Factory function for creating the bass boost object.
1.82 + * @since 3.0
1.83 + * @param aUtility A reference to an audio input stream utility
1.84 + * @param aEnable Indicate whether the effect will be automatically enabled after creation.
1.85 + * @return pointer to CBassBoost object
1.86 + */
1.87 + IMPORT_C static CBassBoost* NewL( CMdaAudioInputStream& aUtility, TBool aEnable = EFalse );
1.88 +
1.89 + /**
1.90 + * Factory function for creating the bass boost object.
1.91 + * @since 3.0
1.92 + * @param aUtility A reference to an audio output stream utility
1.93 + * @param aEnable Indicate whether the effect will be automatically enabled after creation.
1.94 + * @return pointer to CBassBoost object
1.95 + */
1.96 + IMPORT_C static CBassBoost* NewL( CMdaAudioOutputStream& aUtility, TBool aEnable = EFalse );
1.97 +
1.98 + /**
1.99 + * Factory function for creating the bass boost object.
1.100 + * @since 3.0
1.101 + * @param aUtility A reference to an audio player utility
1.102 + * @param aEnable Indicate whether the effect will be automatically enabled after creation.
1.103 + * @return pointer to CBassBoost object
1.104 + */
1.105 + IMPORT_C static CBassBoost* NewL( CMdaAudioPlayerUtility& aUtility, TBool aEnable = EFalse );
1.106 +
1.107 + /**
1.108 + * Factory function for creating the bass boost object.
1.109 + * @since 3.0
1.110 + * @param aUtility A reference to an audio record utility
1.111 + * @param aRecordStream ETrue if the effect is to be applied to the recording,
1.112 + * EFalse if the effect is to be applied only to the playback
1.113 + * @param aEnable Indicate whether the effect will be automatically enabled after creation.
1.114 + * @return pointer to CBassBoost object
1.115 + */
1.116 + IMPORT_C static CBassBoost* NewL( CMdaAudioRecorderUtility& aUtility, TBool aRecordStream, TBool aEnable = EFalse );
1.117 +
1.118 + /**
1.119 + * Factory function for creating the bass boost object.
1.120 + * @since 3.0
1.121 + * @param aUtility A reference to an audio tone utility
1.122 + * @param aEnable Indicate whether the effect will be automatically enabled after creation.
1.123 + * @return pointer to CBassBoost object
1.124 + */
1.125 + IMPORT_C static CBassBoost* NewL( CMdaAudioToneUtility& aUtility, TBool aEnable = EFalse );
1.126 +
1.127 + /**
1.128 + * Factory function for creating the bass boost 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 CBassBoost object
1.133 + */
1.134 + IMPORT_C static CBassBoost* NewL( CCustomCommandUtility* aUtility, TBool aEnable = EFalse );
1.135 +
1.136 + /**
1.137 + * Factory function for creating the bass boost 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 CBassBoost object
1.142 + */
1.143 + IMPORT_C static CBassBoost* NewL( MCustomInterface& aCustomInterface, TBool aEnable = EFalse );
1.144 +
1.145 + /**
1.146 + * Factory function for creating the bass boost 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 CBassBoost object
1.151 + */
1.152 + IMPORT_C static CBassBoost* NewL( CMidiClientUtility& aUtility, TBool aEnable = EFalse );
1.153 +
1.154 + /**
1.155 + * Factory function for creating the bass boost object.
1.156 + * @since 3.0
1.157 + * @param CDrmPlayerUtility A reference to a CDrmPlayerUtility object
1.158 + * @return pointer to CBassBoost object
1.159 + */
1.160 + IMPORT_C static CBassBoost* NewL( CDrmPlayerUtility& aUtility, TBool aEnable = EFalse );
1.161 +
1.162 + /**
1.163 + * Factory function for creating the bass boost object.
1.164 + * @since 3.2
1.165 + * @param CVideoPlayerUtility A reference to a CVideoPlayerUtility object
1.166 + * @return pointer to CBassBoost object
1.167 + */
1.168 + IMPORT_C static CBassBoost* NewL( CVideoPlayerUtility& aUtility, TBool aEnable = EFalse );
1.169 +
1.170 + /**
1.171 + *
1.172 + * Destructor
1.173 + */
1.174 + IMPORT_C virtual ~CBassBoost();
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 classes
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 CBassBoost();
1.214 +
1.215 + protected:
1.216 +
1.217 + // BassBoost data structure
1.218 + TEfBassBoostData iBassBoostData;
1.219 + // Data package sent to server
1.220 + TEfBassBoostDataPckg iDataPckgTo;
1.221 + // Data package received from server
1.222 + TEfBassBoostDataPckg iDataPckgFrom;
1.223 +
1.224 + protected: // Friend classes
1.225 +
1.226 + friend class CBassBoostMessageHandler;
1.227 + };
1.228 +
1.229 +#endif // of BASSBOOSTBASE_H
1.230 +
1.231 +// End of File