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