os/mm/mm_plat/audio_effects_proxy_api/inc/AudioEqualizerProxy.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mm_plat/audio_effects_proxy_api/inc/AudioEqualizerProxy.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,146 @@
     1.4 +/*
     1.5 +* Copyright (c) 2004 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 Audio Equalizer proxy class.
    1.18 +*
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#ifndef CAUDIOEQUALIZERPROXY_H
    1.24 +#define CAUDIOEQUALIZERPROXY_H
    1.25 +
    1.26 +// INCLUDES
    1.27 +
    1.28 +#include <e32base.h>
    1.29 +#include <AudioEqualizerBase.h>
    1.30 +#include <mmf/common/mmfcontrollerframework.h>
    1.31 +#include <CustomCommandUtility.h>
    1.32 +#include "AudioEqualizerMessageTypes.h"
    1.33 +#include <MAudioEqualizerObserver.h>
    1.34 +#include <MAudioEffectObserver.h>
    1.35 +
    1.36 +// FORWARD DECLARATION
    1.37 +class CAudioEqualizerEventObserver;
    1.38 +
    1.39 +// CLASS DECLARATION
    1.40 +
    1.41 +/**
    1.42 +*  Interface class to be implemented by objects that receives callbacks from Audio Equalizer Event Observer.
    1.43 +*
    1.44 +*  @since 3.0
    1.45 +*/
    1.46 +class MAudioEqualizerCallback
    1.47 +    {
    1.48 +    public:
    1.49 +
    1.50 +        /**
    1.51 +        * Invoked by the AudioEqualizer Event Observer when the AudioEqualizer object changes state
    1.52 +        * @since 3.0
    1.53 +        * @param aBuffer Buffer containing the AudioEqualizer data
    1.54 +        */
    1.55 +        virtual void AudioEqualizerEventL( const TDesC8& aDataPckg ) = 0;
    1.56 +
    1.57 +    };
    1.58 +
    1.59 +/**
    1.60 +*  This is the AudioEqualizer effect proxy class responsible for handling framework messages.
    1.61 +*
    1.62 +*  @lib AudioEqualizerProxy.lib
    1.63 +*  @since 3.0
    1.64 +*/
    1.65 +
    1.66 +class CAudioEqualizerProxy : public CAudioEqualizer,
    1.67 +					         public MAudioEqualizerCallback
    1.68 +	{
    1.69 +	public:		// Constructors and destructor
    1.70 +
    1.71 +	    /**
    1.72 +        *
    1.73 +        * Factory function for creating the AudioEqualizer proxy object.
    1.74 +        * @since 3.0
    1.75 +        * @param aMessageHandler reference to message handler
    1.76 +        * @param aCustomCommand reference to custom command utility
    1.77 +        * @return	pointer to a AudioEqualizer proxy object
    1.78 +        */
    1.79 +		IMPORT_C static CAudioEqualizerProxy* NewL( TMMFMessageDestinationPckg aMessageHandler,
    1.80 +                     						        MCustomCommand& aCustomCommand,
    1.81 +                      						        CCustomInterfaceUtility* aCustomInterfaceUtility );
    1.82 +		/**
    1.83 +        *
    1.84 +        * Destructor
    1.85 +        */
    1.86 +		virtual ~CAudioEqualizerProxy();
    1.87 +
    1.88 +	public: // functions from base class
    1.89 +
    1.90 +		/**
    1.91 +		* From CAudioEffect
    1.92 +        * Apply effect settings
    1.93 +        * @since 3.0
    1.94 +        */
    1.95 +		IMPORT_C virtual void ApplyL();
    1.96 +
    1.97 +	public: // functions from MAudioEqualizerCallback
    1.98 +
    1.99 +		/**
   1.100 +		* From MAudioEqualizerCallback
   1.101 +        * Changes to AudioEqualizer data has occured
   1.102 +        * @since 3.0
   1.103 +        * @param aBuffer Buffer containing serialized AudioEqualizer data
   1.104 +        */
   1.105 +		void AudioEqualizerEventL( const TDesC8& aDataPckg );
   1.106 +
   1.107 +	private:
   1.108 +
   1.109 +		/**
   1.110 +		* Private C++ constructor for this class.
   1.111 +        * @since	3.0
   1.112 +        * @param aMessageHandler reference to message handler
   1.113 +        * @param aCustomCommand reference to custom command utility
   1.114 +        * @return	-
   1.115 +        */
   1.116 +		CAudioEqualizerProxy(TMMFMessageDestinationPckg aMessageHandler, MCustomCommand& aCustomCommand,
   1.117 +					         CCustomInterfaceUtility* aCustomInterfaceUtility);
   1.118 +
   1.119 +		/**
   1.120 +		* Second phase constructor for this class.
   1.121 +        * @since	3.0
   1.122 +        * @return -
   1.123 +        */
   1.124 +		void ConstructL();
   1.125 +
   1.126 +		/**
   1.127 +		* Start the active observer.
   1.128 +        * @since	3.0
   1.129 +		* @param -
   1.130 +        * @return -
   1.131 +        */
   1.132 +        void StartObserver();
   1.133 +
   1.134 +	private:
   1.135 +
   1.136 +		// Pointer to custom command utility
   1.137 +		MCustomCommand* iCustomCommand;
   1.138 +		// Message handler handle
   1.139 +		TMMFMessageDestinationPckg iMessageHandler;
   1.140 +	 	// AudioEqualizer Event Observer
   1.141 +		CAudioEqualizerEventObserver* iAudioEqualizerEventObserver;
   1.142 +		// Pointer to the custom interface utility
   1.143 +    	CCustomInterfaceUtility* iCustomInterfaceUtility;
   1.144 +
   1.145 +	};
   1.146 +
   1.147 +#endif	// of CAudioEqualizerPROXY_H
   1.148 +
   1.149 +// End of File