epoc32/include/roomlevelbase.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 RoomLevel effect class.
    15 *
    16 */
    17 
    18 
    19 #ifndef CROOMLEVEL_H
    20 #define CROOMLEVEL_H
    21 
    22 // INCLUDES
    23 
    24 #include <e32base.h>
    25 #include <AudioEffectBase.h>
    26 #include <RoomLevelData.h>
    27 #include <MCustomInterface.h>
    28 
    29 const TUid KUidRoomLevelEffect = {0x10207B3C};
    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 CEnvironmentalReverb;
    43 class CDrmPlayerUtility;
    44 class CVideoPlayerUtility;
    45 
    46 // CLASS DECLARATION
    47 
    48 /**
    49 *  This is the Environmental RoomLevel effect class for managing RoomLevel settings.
    50 *
    51 *  @lib RoomLevelEffect.lib
    52 *  @since 3.0
    53 */
    54 
    55 class CRoomLevel : public CAudioEffect
    56     {
    57 
    58     public:     //New Functions
    59         /**
    60         * Factory function for creating the audio RoomLevel object.
    61         * @since 3.0
    62         * @param aUtility A reference to a convert utility
    63         * @param aReverb A reference to a environmental reverb utility
    64         * @return pointer to CRoomLevel object
    65         */
    66         IMPORT_C static CRoomLevel* NewL( CMdaAudioConvertUtility& aUtility, CEnvironmentalReverb& aReverb);
    67 
    68         /**
    69         * Factory function for creating the audio RoomLevel object.
    70         * @since 3.0
    71         * @param aUtility A reference to an audio input stream utility
    72         * @param aReverb A reference to a environmental reverb utility
    73         * @return pointer to CRoomLevel object
    74         */
    75         IMPORT_C static CRoomLevel* NewL( CMdaAudioInputStream& aUtility, CEnvironmentalReverb& aReverb );
    76 
    77         /**
    78         * Factory function for creating the audio RoomLevel object.
    79         * @since 3.0
    80         * @param aUtility A reference to an audio output stream utility
    81         * @param aReverb A reference to a environmental reverb utility
    82         * @return pointer to CRoomLevel object
    83         */
    84         IMPORT_C static CRoomLevel* NewL( CMdaAudioOutputStream& aUtility, CEnvironmentalReverb& aReverb);
    85 
    86         /**
    87         * Factory function for creating the audio RoomLevel object.
    88         * @since 3.0
    89         * @param aUtility A reference to an audio player utility
    90         * @param aReverb A reference to a environmental reverb utility
    91         * @return pointer to CRoomLevel object
    92         */
    93         IMPORT_C static CRoomLevel* NewL( CMdaAudioPlayerUtility& aUtility, CEnvironmentalReverb& aReverb );
    94 
    95         /**
    96         * Factory function for creating the audio RoomLevel object.
    97         * @since 3.0
    98         * @param aUtility A reference to an audio record utility
    99         * @param aRecordStream ETrue if the effect is to be applied to the recording,
   100         *                      EFalse if the effect is to be applied only to the playback
   101         * @param aReverb A reference to a environmental reverb utility
   102         * @return pointer to CRoomLevel object
   103         */
   104         IMPORT_C static CRoomLevel* NewL( CMdaAudioRecorderUtility& aUtility, TBool aRecordStream, CEnvironmentalReverb& aReverb);
   105 
   106         /**
   107         * Factory function for creating the audio RoomLevel object.
   108         * @since 3.0
   109         * @param aUtility A reference to an audio tone utility
   110         * @param aReverb A reference to a environmental reverb utility
   111         * @return pointer to CRoomLevel object
   112         */
   113         IMPORT_C static CRoomLevel* NewL( CMdaAudioToneUtility& aUtility, CEnvironmentalReverb& aReverb );
   114 
   115         /**
   116         * Factory function for creating the audio RoomLevel object.
   117         * @since 3.0
   118         * @param aDevSound A reference to a DevSound instance
   119         * @param aReverb A reference to a environmental reverb utility
   120         * @return pointer to CRoomLevel object
   121         */
   122         IMPORT_C static CRoomLevel* NewL( CMMFDevSound& aDevSound, CEnvironmentalReverb& aReverb);
   123 
   124         /**
   125         * Factory function for creating the audio RoomLevel object.
   126         * @since 3.0
   127         * @param aUtility A reference to a custom command utility
   128         * @param aReverb A reference to a environmental reverb utility
   129         * @return pointer to CRoomLevel object
   130         */
   131         IMPORT_C static CRoomLevel* NewL( CCustomCommandUtility* aUtility, CEnvironmentalReverb& aReverb );
   132 
   133         /**
   134         * Factory function for creating the audio RoomLevel object.
   135         * @since 3.0
   136         * @param aCustomInterface A reference to a custom interface
   137         * @param aReverb A reference to a environmental reverb utility
   138         * @return pointer to CRoomLevel object
   139         */
   140         IMPORT_C static CRoomLevel* NewL( MCustomInterface& aCustomInterface, CEnvironmentalReverb& aReverb );
   141 
   142         /**
   143         * Factory function for creating the audio RoomLevel object.
   144         * @since 3.0
   145         * @param aUtility A reference to a CMidiClientUtility object
   146         * @param aReverb A reference to a environmental reverb utility
   147         * @return pointer to CRoomLevel object
   148         */
   149         IMPORT_C static CRoomLevel* NewL( CMidiClientUtility& aUtility, CEnvironmentalReverb& aReverb);
   150 
   151         /**
   152         * Factory function for creating the RoomLevel object.
   153         * @since 3.0
   154         * @param CDrmPlayerUtility A reference to a CDrmPlayerUtility object
   155         * @return pointer to CRoomLevel object
   156         */
   157         IMPORT_C static CRoomLevel* NewL( CDrmPlayerUtility& aUtility, CEnvironmentalReverb& aReverb );
   158 
   159         /**
   160         * Factory function for creating the RoomLevel object.
   161         * @since 3.2
   162         * @param CVideoPlayerUtility A reference to a CVideoPlayerUtility object
   163         * @return pointer to CRoomLevel object
   164         */
   165         IMPORT_C static CRoomLevel* NewL( CVideoPlayerUtility& aUtility, CEnvironmentalReverb& aReverb );
   166 
   167         /**
   168         *
   169         * Destructor
   170         */
   171         IMPORT_C virtual ~CRoomLevel();
   172 
   173         /**
   174         * Gets the RoomLevel current level in mB
   175         * @since 3.0
   176         * @return RoomLevel current level
   177         */
   178         IMPORT_C TInt32 Level() const;
   179 
   180         /**
   181         * Gets the RoomLevel current level maximum and minimum in mB
   182         * @since 3.0
   183         * @param aMin Minimum current level
   184         * @param aMax Maximum current level
   185         * @return -
   186         */
   187         IMPORT_C void LevelRange( TInt32& aMin, TInt32& aMax );
   188 
   189         /**
   190         * Sets the RoomLevel level, it will leave if aRoomLevel is not within range of Min and Max
   191         * @since 3.0
   192         * @param aRoomLevelLevel The RoomLevel level in mB
   193         */
   194         IMPORT_C void SetRoomLevelL( TInt32 aRoomLevel );
   195 
   196 
   197     public: // functions from base class
   198 
   199         /*
   200         * From CAudioEffect
   201         * Get the unique identifier of the audio effect
   202         * @since 3.0
   203         * @return Unique identifier
   204         */
   205         IMPORT_C TUid Uid() const;
   206 
   207     protected:  // Functions from base classes
   208 
   209         /**
   210         * From CAudioEffect
   211         * Create a package of the effect data
   212         * @since 3.0
   213         * @return A descriptor containing the effect data.
   214         */
   215         IMPORT_C const TDesC8& DoEffectData();
   216 
   217         /**
   218         * From CAudioEffect
   219         * Internal function to unpack effect data
   220         * @since 3.0
   221         * @param aEffectDataBuffer Descriptor containing packed effect data
   222         * @return -
   223         */
   224         IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer );
   225 
   226 
   227 
   228 
   229 
   230 
   231     protected:
   232 
   233         /**
   234         * Private C++ constructor for this class.
   235         * @since 3.0
   236         * @return   -
   237         */
   238         IMPORT_C CRoomLevel();
   239 
   240     protected:
   241         CEnvironmentalReverb* iClientReverb;
   242         // RoomLevel data structure
   243         TEfRoomLevel iRoomLevelData;
   244         // Data package sent to server
   245         TEfRoomLevelDataPckg iDataPckgTo;
   246         // Data package received from server
   247         TEfRoomLevelDataPckg iDataPckgFrom;
   248 
   249     friend class CRoomLevelMessageHandler;
   250 //    friend class CEnvironmentalReverbImpl;
   251 
   252     };
   253 
   254 #endif  // of CROOMLEVEL_H
   255 
   256 // End of File