javauis/amms_qt/mmacontrol/inc/cammsreverbsourcecontrol.h
branchRCL_3
changeset 24 0fd27995241b
equal deleted inserted replaced
20:f9bb0fca356a 24:0fd27995241b
       
     1 /*
       
     2 * Copyright (c) 2005 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:  Manipulates the settings of an audio effect reverb source.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CAMMSREVERBSOURCECONTROL_H
       
    20 #define CAMMSREVERBSOURCECONTROL_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <RoomLevelBase.h>
       
    25 #include <EnvironmentalReverbBase.h>
       
    26 #include <CustomCommandUtility.h>
       
    27 //#include "CAMMSControl.h"
       
    28 #include "cammsbasereverbsourcecontrol.h"
       
    29 
       
    30 // CONSTANTS
       
    31 _LIT(KAMMSReverbSourceControl, "ReverbSourceControl");
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class CAMMSBaseReverbControl;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39 *
       
    40 *  Controls for the Reverb Source effect.
       
    41 *  This class delegates Reverb Source effect method calls to CRoomLevel.
       
    42 *
       
    43 *
       
    44 *  @since 3.0
       
    45 */
       
    46 NONSHARABLE_CLASS(CAMMSReverbSourceControl): public CAMMSBaseReverbSourceControl  //CAMMSControl
       
    47 {
       
    48 public:  // Constructors and destructor
       
    49 
       
    50     /**
       
    51     * Two-phased constructor.
       
    52     * @param aPlayer Player that has this control.
       
    53     * @param aReverbControl Reverb control belonging to aPlayer.
       
    54     */
       
    55     static CAMMSReverbSourceControl* NewLC(CMMAPlayer* aPlayer,
       
    56     CAMMSBaseReverbControl* aReverbControl);
       
    57 
       
    58     /**
       
    59     * Destructor.
       
    60     */
       
    61     ~CAMMSReverbSourceControl();
       
    62 
       
    63 public:  // New functions
       
    64 
       
    65     /**
       
    66     * Sets the object specific level for the reverberant sound.
       
    67     * The default value is 0 meaning the natural room gain (set by
       
    68     * ReverbControl's presets).
       
    69     *
       
    70     * @param aLevel The new level of the reverberation in millibels.
       
    71     *
       
    72     * @par Leaving:
       
    73     * @li \c KErrArgument - \a aLevel is greater than 0
       
    74     */
       
    75     void SetRoomLevelL(TInt aLevel);
       
    76 
       
    77 public: // Functions from base classes
       
    78 
       
    79     const TDesC& ClassName() const;
       
    80 
       
    81     /**
       
    82     * Prepares the Control.
       
    83     */
       
    84     void PrepareControlL();
       
    85 
       
    86     /**
       
    87     * Deallocates the Control.
       
    88     */
       
    89     void DeallocateControl();
       
    90 
       
    91 private:
       
    92     /**
       
    93     * C++ constructor.
       
    94     * @param aPlayer Player that has this control.
       
    95     * @param aReverbControl Reverb control belonging to aPlayer.
       
    96     */
       
    97     CAMMSReverbSourceControl(CMMAPlayer* aPlayer,
       
    98                              CAMMSBaseReverbControl* aReverbControl);
       
    99 
       
   100 private:  // Data
       
   101 
       
   102     /** Native reverb source */
       
   103     CRoomLevel* iReverbSource;
       
   104 
       
   105     /** Reverb control belonging to the player */
       
   106     CAMMSBaseReverbControl* iReverbControl;
       
   107 
       
   108 };
       
   109 
       
   110 #endif // CAMMSREVERBSOURCECONTROL_H
       
   111 
       
   112