epoc32/include/loudnessbase.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 Loudness effect class.
    15 *
    16 */
    17 
    18 
    19 #ifndef CLOUDNESS_H
    20 #define CLOUDNESS_H
    21 
    22 // INCLUDES
    23 
    24 #include <e32base.h>
    25 #include <AudioEffectBase.h>
    26 #include <LoudnessData.h>
    27 #include <MCustomInterface.h>
    28 
    29 const TUid KUidLoudnessEffect = {0x10207AA8};
    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 Loudness effect class for managing audio Loudness settings.
    49 *
    50 *  @lib LoudnessUtility.lib
    51 *  @since 3.0
    52 */
    53 
    54 class CLoudness : public CAudioEffect
    55     {
    56 
    57     public:     //New Functions
    58 
    59         /**
    60         * Factory function for creating the audio Loudness object.
    61         * @since 3.0
    62         * @param aUtility A reference to a convert utility
    63         * @return pointer to CLoudness object
    64         */
    65         IMPORT_C static CLoudness* NewL( CMdaAudioConvertUtility& aUtility );
    66 
    67         /**
    68         * Factory function for creating the Loudness object.
    69         * @since 3.0
    70         * @param aUtility A reference to an audio input stream utility
    71         * @param aEnable Indicate whether the effect will be automatically enabled after creation.
    72         * @return pointer to CLoudness object
    73         */
    74         IMPORT_C static CLoudness* NewL( CMdaAudioInputStream& aUtility , TBool aEnable = EFalse );
    75 
    76         /**
    77         * Factory function for creating the Loudness object.
    78         * @since 3.0
    79         * @param aUtility A reference to an audio output stream utility
    80         * @param aEnable Indicate whether the effect will be automatically enabled after creation.
    81         * @return pointer to CLoudness object
    82         */
    83         IMPORT_C static CLoudness* NewL( CMdaAudioOutputStream& aUtility , TBool aEnable = EFalse );
    84 
    85         /**
    86         * Factory function for creating the Loudness object.
    87         * @since 3.0
    88         * @param aUtility A reference to an audio player utility
    89         * @param aEnable Indicate whether the effect will be automatically enabled after creation.
    90         * @return pointer to CLoudness object
    91         */
    92         IMPORT_C static CLoudness* NewL( CMdaAudioPlayerUtility& aUtility , TBool aEnable = EFalse );
    93 
    94         /**
    95         * Factory function for creating the Loudness object.
    96         * @since 3.0
    97         * @param aUtility A reference to an audio record utility
    98         * @param aRecordStream ETrue if the effect is to be applied to the recording,
    99         *                      EFalse if the effect is to be applied only to the playback
   100         * @param aEnable Indicate whether the effect will be automatically enabled after creation.
   101         * @return pointer to CLoudness object
   102         */
   103         IMPORT_C static CLoudness* NewL( CMdaAudioRecorderUtility& aUtility, TBool aRecordStream, TBool aEnable = EFalse );
   104 
   105         /**
   106         * Factory function for creating the Loudness object.
   107         * @since 3.0
   108         * @param aUtility A reference to an audio tone utility
   109         * @param aEnable Indicate whether the effect will be automatically enabled after creation.
   110         * @return pointer to CLoudness object
   111         */
   112         IMPORT_C static CLoudness* NewL( CMdaAudioToneUtility& aUtility , TBool aEnable = EFalse );
   113 
   114         /**
   115         * Factory function for creating the Loudness object.
   116         * @since 3.0
   117         * @param aDevSound A reference to a DevSound instance
   118         * @param aEnable Indicate whether the effect will be automatically enabled after creation.
   119         * @return pointer to CLoudness object
   120         */
   121         IMPORT_C static CLoudness* NewL( CMMFDevSound& aDevSound, TBool aEnable = EFalse );
   122 
   123         /**
   124         * Factory function for creating the Loudness object.
   125         * @since 3.0
   126         * @param aUtility A reference to a custom command utility
   127         * @param aEnable Indicate whether the effect will be automatically enabled after creation.
   128         * @return pointer to CLoudness object
   129         */
   130         IMPORT_C static CLoudness* NewL( CCustomCommandUtility* aUtility , TBool aEnable = EFalse );
   131 
   132         /**
   133         * Factory function for creating the Loudness object.
   134         * @since 3.0
   135         * @param aCustomInterface A reference to a custom interface
   136         * @param aEnable Indicate whether the effect will be automatically enabled after creation.
   137          * @return pointer to CLoudness object
   138         */
   139         IMPORT_C static CLoudness* NewL( MCustomInterface& aCustomInterface, TBool aEnable = EFalse );
   140 
   141         /**
   142         * Factory function for creating the Loudness object.
   143         * @since 3.0
   144         * @param aUtility A reference to a CMidiClientUtility
   145         * @param aEnable Indicate whether the effect will be automatically enabled after creation.
   146          * @return pointer to CLoudness object
   147         */
   148         IMPORT_C static CLoudness* NewL( CMidiClientUtility& aUtility , TBool aEnable = EFalse );
   149 
   150         /**
   151         * Factory function for creating the Loudness object.
   152         * @since 3.0
   153         * @param CDrmPlayerUtility A reference to a CDrmPlayerUtility object
   154         * @return pointer to CLoudness object
   155         */
   156         IMPORT_C static CLoudness* NewL( CDrmPlayerUtility& aUtility , TBool aEnable = EFalse);
   157 
   158         /**
   159         * Factory function for creating the Loudness object.
   160         * @since 3.2
   161         * @param CVideoPlayerUtility A reference to a CVideoPlayerUtility object
   162         * @return pointer to CLoudness object
   163         */
   164         IMPORT_C static CLoudness* NewL( CVideoPlayerUtility& aUtility , TBool aEnable = EFalse);
   165 
   166         /**
   167         *
   168         * Destructor
   169         */
   170         IMPORT_C virtual ~CLoudness();
   171 
   172     public: // functions from base class
   173 
   174         /*
   175         * From CAudioEffect
   176         * Get the unique identifier of the audio effect
   177         * @since 3.0
   178         * @return Unique identifier
   179         */
   180         IMPORT_C TUid Uid() const;
   181 
   182     protected: // functions from base class
   183 
   184         /**
   185         * From CAudioEffect
   186         * Create a package of the effect data
   187         * @since 3.0
   188         * @return A descriptor containing the effect data.
   189         */
   190         IMPORT_C const TDesC8& DoEffectData();
   191 
   192         /**
   193         * From CAudioEffect
   194         * Internal function to unpack effect data
   195         * @since 3.0
   196         * @param aEffectDataBuffer Descriptor containing packed effect data
   197         * @return -
   198         */
   199         IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer );
   200 
   201     protected:
   202 
   203         /**
   204         * Private C++ constructor for this class.
   205         * @since    3.0
   206         * @param    aEffectObserver reference to event observer object
   207         * @return   -
   208         */
   209         IMPORT_C CLoudness();
   210 
   211 
   212     protected:
   213 
   214         // Loudness data structure
   215         TEfLoudnessData iLoudnessData;
   216         // Data package sent to server
   217         TEfLoudnessDataPckg iDataPckgTo;
   218         // Data package received from server
   219         TEfLoudnessDataPckg iDataPckgFrom;
   220 
   221     protected:    // Friend classes
   222 
   223         friend class CLoudnessMessageHandler;
   224 
   225     };
   226 
   227 #endif  // of CLOUDNESS_H
   228 
   229 // End of File