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