os/mm/mm_pub/audio_effects_presets_api/inc/EnvironmentalReverbUtility.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 audio EnvironmentalReverb utility class.
sl@0
    15
*
sl@0
    16
*/
sl@0
    17
sl@0
    18
sl@0
    19
sl@0
    20
#ifndef CENVIRONMENTALREVERBUTILITY_H
sl@0
    21
#define CENVIRONMENTALREVERBUTILITY_H
sl@0
    22
sl@0
    23
//  INCLUDES
sl@0
    24
#include <e32base.h>
sl@0
    25
#include <e32svr.h>
sl@0
    26
#include <EnvironmentalReverbBase.h>
sl@0
    27
#include <centralrepository.h>
sl@0
    28
#include "EnvironmentalReverbUtilityData.h"
sl@0
    29
sl@0
    30
// FORWARD DECLARATIONS
sl@0
    31
class TEfEnvironmentalReverbUtilityPreset;
sl@0
    32
class CEnvironmentalReverb;
sl@0
    33
class CMdaAudioConvertUtility;
sl@0
    34
class CMdaAudioPlayerUtility;
sl@0
    35
class CMdaAudioRecorderUtility;
sl@0
    36
class CMdaAudioInputStream;
sl@0
    37
class CMdaAudioOutputStream;
sl@0
    38
class CMdaAudioToneUtility;
sl@0
    39
class CCustomCommandUtility;
sl@0
    40
class CCustomInterfaceUtility;
sl@0
    41
class CMMFDevSound;
sl@0
    42
class CRepository;
sl@0
    43
class CMidiClientUtility;
sl@0
    44
class CDrmPlayerUtility;
sl@0
    45
class CVideoPlayerUtility;
sl@0
    46
sl@0
    47
// CLASS DECLARATION
sl@0
    48
sl@0
    49
/**
sl@0
    50
*  This is the EnvironmentalReverb Utility class for managing audio EnvironmentalReverb presets.
sl@0
    51
*
sl@0
    52
*  @lib EnvironmentalReverbUtility.lib
sl@0
    53
*  @since 3.0
sl@0
    54
*/
sl@0
    55
sl@0
    56
class CEnvironmentalReverbUtility : public CBase
sl@0
    57
    {
sl@0
    58
    public:  // Constructors and destructor
sl@0
    59
sl@0
    60
sl@0
    61
        /**
sl@0
    62
        * Factory function for creating the audio EnvironmentalReverb utility object.
sl@0
    63
        * @since 3.0
sl@0
    64
        * @param aUtility A reference to a Devsound Instance
sl@0
    65
        * @return pointer to CEnvironmentalReverbUtility object
sl@0
    66
        */
sl@0
    67
        IMPORT_C static CEnvironmentalReverbUtility* NewL(CMMFDevSound& aDevSound);
sl@0
    68
sl@0
    69
        /**
sl@0
    70
        * Factory function for creating the audio EnvironmentalReverb utility object.
sl@0
    71
        * @since 3.0
sl@0
    72
        * @param aUtility A reference to a convert utility
sl@0
    73
        * @return pointer to CEnvironmentalReverbUtility object
sl@0
    74
        */
sl@0
    75
        IMPORT_C static CEnvironmentalReverbUtility* NewL(CMdaAudioConvertUtility& aUtility);
sl@0
    76
sl@0
    77
        /**
sl@0
    78
        * Factory function for creating the audio EnvironmentalReverb utility object.
sl@0
    79
        * @since 3.0
sl@0
    80
        * @param aUtility A reference to a audio input stream utility
sl@0
    81
        * @return pointer to CEnvironmentalReverbUtility object
sl@0
    82
        */
sl@0
    83
        IMPORT_C static CEnvironmentalReverbUtility* NewL(CMdaAudioInputStream& aUtility);
sl@0
    84
sl@0
    85
        /**
sl@0
    86
        * Factory function for creating the audio EnvironmentalReverb utility object.
sl@0
    87
        * @since 3.0
sl@0
    88
        * @param aUtility A reference to a audio output stream utility
sl@0
    89
        * @return pointer to CEnvironmentalReverbUtility object
sl@0
    90
        */
sl@0
    91
        IMPORT_C static CEnvironmentalReverbUtility* NewL(CMdaAudioOutputStream& aUtility);
sl@0
    92
sl@0
    93
        /**
sl@0
    94
        * Factory function for creating the audio EnvironmentalReverb utility object.
sl@0
    95
        * @since 3.0
sl@0
    96
        * @param aUtility A reference to a audio player utility
sl@0
    97
        * @return pointer to CEnvironmentalReverbUtility object
sl@0
    98
        */
sl@0
    99
        IMPORT_C static CEnvironmentalReverbUtility* NewL(CMdaAudioPlayerUtility& aUtility);
sl@0
   100
sl@0
   101
        /**
sl@0
   102
        * Factory function for creating the audio EnvironmentalReverb utility object.
sl@0
   103
        * @since 3.0
sl@0
   104
        * @param aUtility A reference to a audio recorder utility
sl@0
   105
        * @return pointer to CEnvironmentalReverbUtility object
sl@0
   106
        */
sl@0
   107
        IMPORT_C static CEnvironmentalReverbUtility* NewL(CMdaAudioRecorderUtility& aUtility);
sl@0
   108
sl@0
   109
        /**
sl@0
   110
        * Factory function for creating the audio EnvironmentalReverb utility object.
sl@0
   111
        * @since 3.0
sl@0
   112
        * @param aUtility A reference to a audio tone utility
sl@0
   113
        * @return pointer to CEnvironmentalReverbUtility object
sl@0
   114
        */
sl@0
   115
        IMPORT_C static CEnvironmentalReverbUtility* NewL(CMdaAudioToneUtility& aUtility);
sl@0
   116
sl@0
   117
        /**
sl@0
   118
        * Factory function for creating the audio EnvironmentalReverb utility object.
sl@0
   119
        * @since 3.0
sl@0
   120
        * @param aUtility A reference to custom command utility
sl@0
   121
        * @return pointer to CEnvironmentalReverbUtility object
sl@0
   122
        */
sl@0
   123
        IMPORT_C static CEnvironmentalReverbUtility* NewL(CCustomCommandUtility* aUtility);
sl@0
   124
sl@0
   125
        /**
sl@0
   126
        * Factory function for creating the audio EnvironmentalReverb utility object.
sl@0
   127
        * @since 3.0
sl@0
   128
        * @param aUtility A reference to custom interface utility
sl@0
   129
        * @return pointer to CEnvironmentalReverbUtility object
sl@0
   130
        */
sl@0
   131
        IMPORT_C static CEnvironmentalReverbUtility* NewL(MCustomInterface& aCustomInterface);
sl@0
   132
sl@0
   133
sl@0
   134
        /**
sl@0
   135
        * Factory function for creating the audio EnvironmentalReverb utility object.
sl@0
   136
        * @since 3.0
sl@0
   137
        * @param aUtility A reference to CMidiClientUtility
sl@0
   138
        * @return pointer to CEnvironmentalReverbUtility object
sl@0
   139
        */
sl@0
   140
        IMPORT_C static CEnvironmentalReverbUtility* NewL(CMidiClientUtility& aUtility);
sl@0
   141
sl@0
   142
sl@0
   143
        /**
sl@0
   144
        * Factory function for creating the audio equalizer object.
sl@0
   145
        * @since 3.0
sl@0
   146
        * @param CDrmPlayerUtility A reference to a CDrmPlayerUtility object
sl@0
   147
        * @return pointer to CAudioEqualizer object
sl@0
   148
        */
sl@0
   149
        IMPORT_C static CEnvironmentalReverbUtility* NewL(CDrmPlayerUtility& aUtility);
sl@0
   150
sl@0
   151
        /**
sl@0
   152
        * Factory function for creating the audio equalizer object.
sl@0
   153
        * @since 3.2
sl@0
   154
        * @param CVideoPlayerUtility A reference to a CVideoPlayerUtility object
sl@0
   155
        * @return pointer to CAudioEqualizer object
sl@0
   156
        */
sl@0
   157
        IMPORT_C static CEnvironmentalReverbUtility* NewL(CVideoPlayerUtility& aUtility);
sl@0
   158
sl@0
   159
         /**
sl@0
   160
        * Destructor.
sl@0
   161
        */
sl@0
   162
        virtual ~CEnvironmentalReverbUtility();
sl@0
   163
sl@0
   164
        /**
sl@0
   165
        * Apply the Preset Index value
sl@0
   166
        * @since 3.0
sl@0
   167
        * @param aPreset Preset Value
sl@0
   168
        */
sl@0
   169
        IMPORT_C void ApplyPresetL(TInt aPreset);
sl@0
   170
sl@0
   171
        /**
sl@0
   172
        * Disable the EnvironmentalReverb
sl@0
   173
        * @since 3.0
sl@0
   174
        */
sl@0
   175
        IMPORT_C void DisableEnvironmentalReverbL();
sl@0
   176
sl@0
   177
        /**
sl@0
   178
        * Create a Preset with the given Name and EnvironmentalReverb Settings
sl@0
   179
        * @since 3.0
sl@0
   180
        * @param aName Name of the Preset
sl@0
   181
        * @param aEnvironmentalReverb EnvironmentalReverb Settings for the Preset
sl@0
   182
        */
sl@0
   183
        IMPORT_C void CreatePresetL(TDesC& aName, CEnvironmentalReverb& aEnvironmentalReverbUI);
sl@0
   184
sl@0
   185
        /**
sl@0
   186
        * Delete a Preset with the given index in the Central Repository
sl@0
   187
        * @since 3.0
sl@0
   188
        * @param aPresetIndex Index of the Preset in the Array
sl@0
   189
        */
sl@0
   190
        IMPORT_C void DeletePresetL(TInt aPresetIndex);
sl@0
   191
sl@0
   192
        /**
sl@0
   193
        * Retrieves a Preset with the given index from the Central Repository
sl@0
   194
        * @since 3.0
sl@0
   195
        * @param aPresetIndex Index of the Preset in the Array
sl@0
   196
        */
sl@0
   197
        IMPORT_C  const TDesC& GetPresetL(TInt aPresetIndex);
sl@0
   198
sl@0
   199
        /**
sl@0
   200
        * Get the reference to the EnvironmentalReverb Object
sl@0
   201
        * @since 3.0
sl@0
   202
        * @return Reference to the EnvironmentalReverb Object.
sl@0
   203
        */
sl@0
   204
        IMPORT_C CEnvironmentalReverb& EnvironmentalReverb();
sl@0
   205
sl@0
   206
        /**
sl@0
   207
        * Modify a Preset with the given Name and EnvironmentalReverb Settings
sl@0
   208
        * @since 3.0
sl@0
   209
        * @param aPresetIndex Array Index of the Preset
sl@0
   210
        * @param aName Name of the Preset
sl@0
   211
        * @param aEnvironmentalReverb EnvironmentalReverb Settings for the Preset
sl@0
   212
        */
sl@0
   213
        IMPORT_C void ModifyPresetL(TInt aPresetIndex, TDesC& aName, CEnvironmentalReverb& aEnvironmentalReverbUI);
sl@0
   214
sl@0
   215
        /**
sl@0
   216
        * Get the number of Pre Defined Presets
sl@0
   217
        * @since 3.0
sl@0
   218
        * @return Number of Pre Defined Presets
sl@0
   219
        */
sl@0
   220
        IMPORT_C TUint32 NumberOfPreDefinedPresets() const;
sl@0
   221
sl@0
   222
        /**
sl@0
   223
        * Get all the Presets defined in the Central Repository
sl@0
   224
        * @since 3.0
sl@0
   225
        * @return Array of all Presets.
sl@0
   226
        */
sl@0
   227
        IMPORT_C TArray<TEfEnvironmentalReverbUtilityPreset> Presets();
sl@0
   228
sl@0
   229
        /**
sl@0
   230
         * Reset a System Defined Preset with the given index in the Array returned from Presets()
sl@0
   231
         * @since 3.0
sl@0
   232
         * @param aPresetIndex Index of the Preset in the Array
sl@0
   233
         */
sl@0
   234
        IMPORT_C void ResetPresetL(TInt aPresetIndex);
sl@0
   235
sl@0
   236
    private:
sl@0
   237
sl@0
   238
        /**
sl@0
   239
        * C++ default constructor.
sl@0
   240
        */
sl@0
   241
        CEnvironmentalReverbUtility();
sl@0
   242
sl@0
   243
        /**
sl@0
   244
        * By default Symbian 2nd phase constructor is private.
sl@0
   245
        */
sl@0
   246
sl@0
   247
        /**
sl@0
   248
        * Second Phase Costructor for DevSound Instance
sl@0
   249
        * @since 3.0
sl@0
   250
        * @param aDevSound DevSound Referece
sl@0
   251
        */
sl@0
   252
        void ConstructL(CMMFDevSound& aDevSound);
sl@0
   253
sl@0
   254
        /**
sl@0
   255
        * Second Phase Costructor for Audio Convert Utility
sl@0
   256
        * @since 3.0
sl@0
   257
        * @param aUtility CMdaAudioConvertUtility Referece
sl@0
   258
        */
sl@0
   259
        void ConstructL(CMdaAudioConvertUtility& aUtility);
sl@0
   260
sl@0
   261
        /**
sl@0
   262
        * Second Phase Costructor for CMdaAudioInputStream
sl@0
   263
        * @since 3.0
sl@0
   264
        * @param aUtility CMdaAudioInputStream Referece
sl@0
   265
        */
sl@0
   266
        void ConstructL(CMdaAudioInputStream& aUtility);
sl@0
   267
sl@0
   268
        /**
sl@0
   269
        * Second Phase Costructor for CMdaAudioOutputStream
sl@0
   270
        * @since 3.0
sl@0
   271
        * @param aUtilityCMdaAudioOutputStream Referece
sl@0
   272
        */
sl@0
   273
        void ConstructL(CMdaAudioOutputStream& aUtility);
sl@0
   274
sl@0
   275
        /**
sl@0
   276
        * Second Phase Costructor for CMdaAudioPlayerUtility
sl@0
   277
        * @since 3.0
sl@0
   278
        * @param aUtility CMdaAudioPlayerUtility Referece
sl@0
   279
        */
sl@0
   280
        void ConstructL(CMdaAudioPlayerUtility& aUtility);
sl@0
   281
sl@0
   282
        /**
sl@0
   283
        * Second Phase Costructor for CMdaAudioRecordUtility
sl@0
   284
        * @since 3.0
sl@0
   285
        * @param aUtility CMdaAudioRecordUtility Referece
sl@0
   286
        */
sl@0
   287
        void ConstructL(CMdaAudioRecorderUtility& aUtility);
sl@0
   288
sl@0
   289
        /**
sl@0
   290
        * Second Phase Costructor for CMdaAudioToneUtility
sl@0
   291
        * @since 3.0
sl@0
   292
        * @param aUtility CMdaAudioToneUtility Referece
sl@0
   293
        */
sl@0
   294
        void ConstructL(CMdaAudioToneUtility& aUtility);
sl@0
   295
sl@0
   296
        /**
sl@0
   297
        * Second Phase Costructor for MCustomCommand
sl@0
   298
        * @since 3.0
sl@0
   299
        * @param aUtility MCustomCommand Referece
sl@0
   300
        */
sl@0
   301
        void ConstructL(CCustomCommandUtility* aUtility);
sl@0
   302
sl@0
   303
        /**
sl@0
   304
        * Second Phase Costructor for MCustomInterface
sl@0
   305
        * @since 3.0
sl@0
   306
        * @param aUtility MCustomInterface Referece
sl@0
   307
        */
sl@0
   308
        void ConstructL(MCustomInterface& aCustomInterface);
sl@0
   309
sl@0
   310
        /**
sl@0
   311
        * Second Phase Costructor for CMidiClientUtility
sl@0
   312
        * @since 3.0
sl@0
   313
        * @param aUtility CMidiClientUtility Referece
sl@0
   314
        */
sl@0
   315
        void ConstructL(CMidiClientUtility& aUtility);
sl@0
   316
        
sl@0
   317
        /**
sl@0
   318
        * Second Phase Costructor for CDrmPlayerUtility
sl@0
   319
        * @since 3.0
sl@0
   320
        * @param aUtility CDrmPlayerUtility Referece
sl@0
   321
        */
sl@0
   322
        void ConstructL(CDrmPlayerUtility& aUtility);                
sl@0
   323
sl@0
   324
		/**
sl@0
   325
		* Second Phase Costructor for CVideoPlayerUtility
sl@0
   326
		* @since 3.2
sl@0
   327
		* @param aUtility CVideoPlayerUtility Referece
sl@0
   328
		*/
sl@0
   329
		void ConstructL(CVideoPlayerUtility& aUtility);		
sl@0
   330
sl@0
   331
        /**
sl@0
   332
        * Function for Updating the Array from the Central Repository
sl@0
   333
        * @since 3.0
sl@0
   334
        * @param aUtility MCustomInterface Referece
sl@0
   335
        */
sl@0
   336
        void UpdateFullPresetArrayFromCenRep(RArray<TEfEnvironmentalReverbUtilityPreset> &aFullPresetArray);
sl@0
   337
sl@0
   338
        /**
sl@0
   339
        * Function of Updating the Preset Array for the User
sl@0
   340
        * @since 3.0
sl@0
   341
        * @param aUtility MCustomInterface Referece
sl@0
   342
        */
sl@0
   343
        void UpdatePresetArray(RArray<TEfEnvironmentalReverbUtilityPreset>& aPresetArray,const RArray<TEfEnvironmentalReverbUtilityPreset> &aFullPresetArray);
sl@0
   344
sl@0
   345
sl@0
   346
    private: // Data
sl@0
   347
sl@0
   348
        // Array for Storing the Current State of the Repository
sl@0
   349
        // which has been compacted after the transaction
sl@0
   350
        // with the Central Repository
sl@0
   351
        RArray<TEfEnvironmentalReverbUtilityPreset> iPresetArray;
sl@0
   352
sl@0
   353
        // Array Which contains the full information from the
sl@0
   354
        // Central Repository except the Description Values
sl@0
   355
        RArray<TEfEnvironmentalReverbUtilityPreset> iFullPresetArray;
sl@0
   356
sl@0
   357
        // Pointer to the EnvironmentalReverb Object
sl@0
   358
        CEnvironmentalReverb* iEnvironmentalReverb;
sl@0
   359
sl@0
   360
        // Pointer to the EnvironmentalReverb Object
sl@0
   361
        // which is returned to the UI for Manipulation
sl@0
   362
        CEnvironmentalReverb* iTransEnvironmentalReverb;
sl@0
   363
sl@0
   364
        // Pointer to the Preset Repository
sl@0
   365
        CRepository* iPresetRepository;
sl@0
   366
   };
sl@0
   367
sl@0
   368
#endif      // CENVIRONMENTALREVERBUTILITY_H
sl@0
   369
sl@0
   370
// End of File