os/mm/mm_plat/audio_visualization_api/inc/MVisualizationObserver.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mm_plat/audio_visualization_api/inc/MVisualizationObserver.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,113 @@
     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:  Definition of the Audio Visualization Observer class.
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +
    1.23 +#ifndef MVISUALIZATIONOBSERVER_H
    1.24 +#define MVISUALIZATIONOBSERVER_H
    1.25 +
    1.26 +class CVisualization;
    1.27 +// CLASS DECLARATION
    1.28 +
    1.29 +
    1.30 +class TVisualizationData
    1.31 +    {
    1.32 +    public:
    1.33 +
    1.34 +        /**
    1.35 +        * Constructor.
    1.36 +        */
    1.37 +        TVisualizationData() { iFrequencyData = NULL, iWaveFormData = NULL; }
    1.38 +
    1.39 +		TUint64 iTimeStamp;
    1.40 +		const TArray<TUint32>* iFrequencyData;
    1.41 +		const TArray<TInt16>* iWaveFormData;
    1.42 +
    1.43 +    };
    1.44 +
    1.45 +
    1.46 +/**
    1.47 +*  Interface class to be implemented by objects that are interested in receiving notifications
    1.48 +*  from Audio Visualization object.
    1.49 +*
    1.50 +*  @since 3.0
    1.51 +*/
    1.52 +class MVisualizationObserver
    1.53 +    {
    1.54 +    public:
    1.55 +
    1.56 +        /**
    1.57 +        * Invoked when the state of the visualization object has changed.
    1.58 +        * @since 3.0
    1.59 +        * @param aVisualization The visualization object that changed
    1.60 +        * @param aData The visualization data.
    1.61 +        */
    1.62 +        virtual void DataChanged( const CVisualization* aVisualization, TVisualizationData aData ) = 0;
    1.63 +
    1.64 +     	/**
    1.65 +        * Invoked when the visualization data rate changed.
    1.66 +        * @since 3.0
    1.67 +        * @param aVisualization The visualization object that changed
    1.68 +        * @param aData The visualization data.
    1.69 +        */
    1.70 +        virtual void DataRateChanged( const CVisualization* aVisualization ) = 0;
    1.71 +
    1.72 +     	/**
    1.73 +        * Invoked when the visualization frequency band count changed.
    1.74 +        * @since 3.0
    1.75 +        * @param aVisualization The visualization object that changed
    1.76 +        * @param aData The visualization data.
    1.77 +        */
    1.78 +        virtual void FrequencyBandCountChanged( const CVisualization* aVisualization ) = 0;
    1.79 +
    1.80 +     	/**
    1.81 +        * Invoked when the visualization is preempted.
    1.82 +        * @since 3.0
    1.83 +        */
    1.84 +        virtual void VisualizationPreempted( ) = 0;
    1.85 +
    1.86 +     	/**
    1.87 +        * Invoked when the visualization is resumed.
    1.88 +        * @since 3.0
    1.89 +        */
    1.90 +        virtual void VisualizationResumed( ) = 0;
    1.91 +
    1.92 +     	/**
    1.93 +        * Invoked when the visualization is started.
    1.94 +        * @since 3.0
    1.95 +        */
    1.96 +        virtual void VisualizationStarted( ) = 0;
    1.97 +
    1.98 +     	/**
    1.99 +        * Invoked when the visualization is stopped.
   1.100 +        * @since 3.0
   1.101 +        */
   1.102 +        virtual void VisualizationStopped( ) = 0;
   1.103 +
   1.104 +     	/**
   1.105 +        * Invoked when the visualization the waveform data length changed.
   1.106 +        * @since 3.0
   1.107 +        * @param aVisualization The visualization object that changed
   1.108 +        * @param aData The visualization data.
   1.109 +        */
   1.110 +        virtual void WaveformDataLengthChanged( const CVisualization* aVisualization ) = 0;
   1.111 +
   1.112 +    };
   1.113 +
   1.114 +#endif      // MVISUALIZATIONOBSERVER_H
   1.115 +
   1.116 +// End of File