os/mm/mm_pub/audio_effects_api/inc/BassBoostBase.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description:  This is the definition of the Bass Boost effect class.
sl@0
    15
*
sl@0
    16
*/
sl@0
    17
sl@0
    18
sl@0
    19
#ifndef BASSBOOSTBASE_H
sl@0
    20
#define BASSBOOSTBASE_H
sl@0
    21
sl@0
    22
// INCLUDES
sl@0
    23
sl@0
    24
#include <e32base.h>
sl@0
    25
#include <AudioEffectBase.h>
sl@0
    26
#include <BassBoostData.h>
sl@0
    27
#include <MCustomInterface.h>
sl@0
    28
sl@0
    29
const TUid KUidBassBoostEffect = {0x10203827};
sl@0
    30
sl@0
    31
// FORWARD DELCARATION
sl@0
    32
class CMdaAudioConvertUtility;
sl@0
    33
class CMdaAudioPlayerUtility;
sl@0
    34
class CMdaAudioRecorderUtility;
sl@0
    35
class CMdaAudioInputStream;
sl@0
    36
class CMdaAudioOutputStream;
sl@0
    37
class CMdaAudioToneUtility;
sl@0
    38
class CCustomCommandUtility;
sl@0
    39
class CCustomInterfaceUtility;
sl@0
    40
class CMMFDevSound;
sl@0
    41
class CMidiClientUtility;
sl@0
    42
class CDrmPlayerUtility;
sl@0
    43
class CVideoPlayerUtility;
sl@0
    44
sl@0
    45
// CLASS DECLARATION
sl@0
    46
sl@0
    47
/**
sl@0
    48
*  This is the bass boost effect class for managing audio bass boost settings.
sl@0
    49
*
sl@0
    50
*  @lib BassBoostUtility.lib
sl@0
    51
*  @since 3.0
sl@0
    52
*/
sl@0
    53
sl@0
    54
class CBassBoost : public CAudioEffect
sl@0
    55
	{
sl@0
    56
sl@0
    57
	public:		//New Functions
sl@0
    58
sl@0
    59
	    /**
sl@0
    60
        * Factory function for creating the bass boost object.
sl@0
    61
        * @since 3.0
sl@0
    62
        * @param aDevSound A reference to a DevSound instance
sl@0
    63
        * @param aEnable Indicate whether the effect will be automatically enabled after creation.
sl@0
    64
        * @return pointer to CBassBoost object
sl@0
    65
        */
sl@0
    66
		IMPORT_C static CBassBoost* NewL( CMMFDevSound& aDevSound, TBool aEnable = EFalse );
sl@0
    67
sl@0
    68
	    /**
sl@0
    69
        * Factory function for creating the bass boost object.
sl@0
    70
        * @since 3.0
sl@0
    71
        * @param aUtility A reference to an audio convert utility
sl@0
    72
        * @param aEnable Indicate whether the effect will be automatically enabled after creation.
sl@0
    73
        * @return pointer to CBassBoost object
sl@0
    74
        */
sl@0
    75
		IMPORT_C static CBassBoost* NewL( CMdaAudioConvertUtility& aUtility, TBool aEnable = EFalse );
sl@0
    76
sl@0
    77
	    /**
sl@0
    78
        * Factory function for creating the bass boost object.
sl@0
    79
        * @since 3.0
sl@0
    80
        * @param aUtility A reference to an audio input stream utility
sl@0
    81
        * @param aEnable Indicate whether the effect will be automatically enabled after creation.
sl@0
    82
        * @return pointer to CBassBoost object
sl@0
    83
        */
sl@0
    84
		IMPORT_C static CBassBoost* NewL( CMdaAudioInputStream& aUtility, TBool aEnable = EFalse );
sl@0
    85
sl@0
    86
	    /**
sl@0
    87
        * Factory function for creating the bass boost object.
sl@0
    88
        * @since 3.0
sl@0
    89
        * @param aUtility A reference to an audio output stream utility
sl@0
    90
        * @param aEnable Indicate whether the effect will be automatically enabled after creation.
sl@0
    91
        * @return pointer to CBassBoost object
sl@0
    92
        */
sl@0
    93
		IMPORT_C static CBassBoost* NewL( CMdaAudioOutputStream& aUtility, TBool aEnable = EFalse );
sl@0
    94
sl@0
    95
	    /**
sl@0
    96
        * Factory function for creating the bass boost object.
sl@0
    97
        * @since 3.0
sl@0
    98
        * @param aUtility A reference to an audio player utility
sl@0
    99
        * @param aEnable Indicate whether the effect will be automatically enabled after creation.
sl@0
   100
        * @return pointer to CBassBoost object
sl@0
   101
        */
sl@0
   102
		IMPORT_C static CBassBoost* NewL( CMdaAudioPlayerUtility& aUtility, TBool aEnable = EFalse );
sl@0
   103
sl@0
   104
	    /**
sl@0
   105
        * Factory function for creating the bass boost object.
sl@0
   106
        * @since 3.0
sl@0
   107
        * @param aUtility A reference to an audio record utility
sl@0
   108
        * @param aRecordStream ETrue if the effect is to be applied to the recording,
sl@0
   109
        *                      EFalse if the effect is to be applied only to the playback
sl@0
   110
        * @param aEnable Indicate whether the effect will be automatically enabled after creation.
sl@0
   111
        * @return pointer to CBassBoost object
sl@0
   112
        */
sl@0
   113
		IMPORT_C static CBassBoost* NewL( CMdaAudioRecorderUtility& aUtility, TBool aRecordStream, TBool aEnable = EFalse );
sl@0
   114
sl@0
   115
	    /**
sl@0
   116
        * Factory function for creating the bass boost object.
sl@0
   117
        * @since 3.0
sl@0
   118
        * @param aUtility A reference to an audio tone utility
sl@0
   119
        * @param aEnable Indicate whether the effect will be automatically enabled after creation.
sl@0
   120
        * @return pointer to CBassBoost object
sl@0
   121
        */
sl@0
   122
		IMPORT_C static CBassBoost* NewL( CMdaAudioToneUtility& aUtility, TBool aEnable = EFalse );
sl@0
   123
sl@0
   124
	    /**
sl@0
   125
        * Factory function for creating the bass boost object.
sl@0
   126
        * @since 3.0
sl@0
   127
        * @param aUtility A reference to a custom command utility
sl@0
   128
        * @param aEnable Indicate whether the effect will be automatically enabled after creation.
sl@0
   129
        * @return pointer to CBassBoost object
sl@0
   130
        */
sl@0
   131
		IMPORT_C static CBassBoost* NewL( CCustomCommandUtility* aUtility, TBool aEnable = EFalse );
sl@0
   132
sl@0
   133
		/**
sl@0
   134
        * Factory function for creating the bass boost object.
sl@0
   135
        * @since 3.0
sl@0
   136
        * @param aCustomInterface A reference to a custom interface
sl@0
   137
        * @param aEnable Indicate whether the effect will be automatically enabled after creation.
sl@0
   138
         * @return pointer to CBassBoost object
sl@0
   139
        */
sl@0
   140
		IMPORT_C static CBassBoost* NewL( MCustomInterface& aCustomInterface, TBool aEnable = EFalse );
sl@0
   141
sl@0
   142
		/**
sl@0
   143
        * Factory function for creating the bass boost object.
sl@0
   144
        * @since 3.0
sl@0
   145
        * @param aUtility A reference to a CMidiClientUtility
sl@0
   146
        * @param aEnable Indicate whether the effect will be automatically enabled after creation.
sl@0
   147
         * @return pointer to CBassBoost object
sl@0
   148
        */
sl@0
   149
		IMPORT_C static CBassBoost* NewL( CMidiClientUtility& aUtility, TBool aEnable = EFalse );
sl@0
   150
sl@0
   151
		/**
sl@0
   152
        * Factory function for creating the bass boost object.
sl@0
   153
        * @since 3.0
sl@0
   154
        * @param CDrmPlayerUtility A reference to a CDrmPlayerUtility object
sl@0
   155
        * @return pointer to CBassBoost object
sl@0
   156
        */		
sl@0
   157
		IMPORT_C static CBassBoost* NewL( CDrmPlayerUtility& aUtility, TBool aEnable = EFalse );
sl@0
   158
sl@0
   159
		/**
sl@0
   160
        * Factory function for creating the bass boost object.
sl@0
   161
        * @since 3.2
sl@0
   162
        * @param CVideoPlayerUtility A reference to a CVideoPlayerUtility object
sl@0
   163
        * @return pointer to CBassBoost object
sl@0
   164
        */		
sl@0
   165
		IMPORT_C static CBassBoost* NewL( CVideoPlayerUtility& aUtility, TBool aEnable = EFalse );
sl@0
   166
sl@0
   167
		/**
sl@0
   168
        *
sl@0
   169
        * Destructor
sl@0
   170
        */
sl@0
   171
		IMPORT_C virtual ~CBassBoost();
sl@0
   172
sl@0
   173
	public: // functions from base class
sl@0
   174
sl@0
   175
		/*
sl@0
   176
		* From CAudioEffect
sl@0
   177
        * Get the unique identifier of the audio effect
sl@0
   178
        * @since 3.0
sl@0
   179
        * @return Unique identifier
sl@0
   180
        */
sl@0
   181
		IMPORT_C TUid Uid() const;
sl@0
   182
sl@0
   183
    protected:  // Functions from base classes
sl@0
   184
sl@0
   185
		/**
sl@0
   186
		* From CAudioEffect
sl@0
   187
		* Create a package of the effect data
sl@0
   188
        * @since 3.0
sl@0
   189
        * @return A descriptor containing the effect data.
sl@0
   190
        */
sl@0
   191
		IMPORT_C const TDesC8& DoEffectData();
sl@0
   192
sl@0
   193
		/**
sl@0
   194
		* From CAudioEffect
sl@0
   195
		* Internal function to unpack effect data
sl@0
   196
        * @since 3.0
sl@0
   197
        * @param aEffectDataBuffer Descriptor containing packed effect data
sl@0
   198
        * @return -
sl@0
   199
        */
sl@0
   200
        IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer );
sl@0
   201
sl@0
   202
	protected:
sl@0
   203
sl@0
   204
		/**
sl@0
   205
		* Private C++ constructor for this class.
sl@0
   206
        * @since	3.0
sl@0
   207
        * @param	aEffectObserver	reference to event observer object
sl@0
   208
        * @return	-
sl@0
   209
        */
sl@0
   210
		IMPORT_C CBassBoost();
sl@0
   211
sl@0
   212
	protected:
sl@0
   213
sl@0
   214
		// BassBoost data structure
sl@0
   215
		TEfBassBoostData iBassBoostData;
sl@0
   216
		// Data package sent to server
sl@0
   217
		TEfBassBoostDataPckg iDataPckgTo;
sl@0
   218
		// Data package received from server
sl@0
   219
		TEfBassBoostDataPckg iDataPckgFrom;
sl@0
   220
sl@0
   221
    protected:    // Friend classes
sl@0
   222
sl@0
   223
		friend class CBassBoostMessageHandler;
sl@0
   224
	};
sl@0
   225
sl@0
   226
#endif	// of BASSBOOSTBASE_H
sl@0
   227
sl@0
   228
// End of File