mmfenh/enhancedmediaclient/Client/src/Components/AudioEffects/StereoWideningEffectImpl.h
changeset 0 71ca22bcf22a
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     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:  Project file for EnhancedMediaClient Utility
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef STEREOWIDENINGEFFECTIMPL_H
       
    20 #define STEREOWIDENINGEFFECTIMPL_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <StereoWideningControl.h>
       
    24 #include "EffectControlBase.h"
       
    25 #include <StereoWideningProxy.h>
       
    26 #include <MAudioEffectObserver.h>
       
    27 
       
    28 namespace multimedia
       
    29     {
       
    30 	class MControlObserver;
       
    31     class CStereoWideningEffect : public CBase,
       
    32                           public MStereoWideningControl,
       
    33                           public MAudioEffectObserver,
       
    34                           public CEffectControlBase
       
    35         {
       
    36     public:
       
    37         CStereoWideningEffect();
       
    38         ~CStereoWideningEffect();
       
    39         TInt PostConstructor();
       
    40 
       
    41         // From MControl begins
       
    42         TInt AddObserver( MControlObserver& aObserver );
       
    43         TInt RemoveObserver( MControlObserver& aObserver );
       
    44         TUid Type();
       
    45         TControlType ControlType();  
       
    46         // From MControl ends
       
    47 
       
    48         // From MEffectControl begins
       
    49         TInt Apply();
       
    50         // From MEffectControl ends
       
    51         
       
    52         // From MStereoWideningEffect begins
       
    53         /**
       
    54         * Check if continuous level is supported for stereo widening.
       
    55         * @since 5.0
       
    56         * @param  ETrue if continuous level is supported for stereo widening.  If this returns
       
    57         *         EFalse, then the adaptation is actually setting the level to the nearest supported discrete
       
    58         *         value, when SetStereoWidenlingLevelL is called.
       
    59         * @return Error Code
       
    60         */
       
    61         TInt IsContinuousLevelSupported(TBool& aSupported);
       
    62 
       
    63         /**
       
    64         * Set stereo widening level.
       
    65         * @since 5.0
       
    66         * @param aLevel Stereo widening level ranges from 0-100, where 0 is None and 100 is Maximum widening.
       
    67         */
       
    68         TInt SetStereoWideningLevel( TInt aLevel );
       
    69 
       
    70         /**
       
    71         * Get the stereo widening settings.
       
    72         * @since 5.0
       
    73         * @param aLevel Gets the Current Stereo widening level
       
    74         * @return Error Code
       
    75         */
       
    76         TInt StereoWideningLevel(TInt& aLevel);
       
    77 
       
    78        // From MStereoWideningEffect ends
       
    79 
       
    80 		// From MAudioEffectControl
       
    81 		/**
       
    82         * Disable the effect
       
    83         * @since 5.0
       
    84         */
       
    85 		TInt Disable();
       
    86 
       
    87 		/**
       
    88         * Enable the effect
       
    89         * @since 5.0
       
    90         */
       
    91 		TInt Enable();
       
    92 
       
    93 		/**
       
    94         * Enforce the effect.
       
    95         * @since 5.0
       
    96         * @param aEnforced Indicate the effect is to be enforced or not. ETrue = Enforced.
       
    97         */
       
    98 		TInt Enforce( TBool &aEnforced );
       
    99 
       
   100 		/**
       
   101         * Check if this effect object currently has update rights.
       
   102         * A client can lose update rights in some hardware platforms where there are a limited
       
   103         * number of instances of an effect that can exist at the same time. When an effect instance
       
   104         * has lost update rights the user can still change settings, but any calls to Apply the
       
   105         * settings will be deferred until update rights are regained.
       
   106         * @since 5.0
       
   107         * @return ETrue if this object currently has rights to update the settings of this effect,
       
   108         *         EFalse otherwise.
       
   109         */
       
   110 		TInt HaveUpdateRights(TBool &aHaveUpdateRights);
       
   111 
       
   112 		/**
       
   113         * Check if the effect is enabled
       
   114         * @since 5.0
       
   115         * @return ETrue if the effect is enabled, EFalse if the effect is disabled.
       
   116         */
       
   117 		TInt IsEnabled(TBool &aEnabled);
       
   118 
       
   119 		/**
       
   120         * Check if the effect is enforced.
       
   121         * @since 5.0
       
   122         * @return ETrue if the effect is enforced, EFalse if the effect isn ot enforced.
       
   123         */
       
   124 		TInt IsEnforced(TBool &aEnforced);
       
   125 
       
   126 		/*
       
   127         * Get the unique identifier of the audio effect
       
   128         * @since 5.0
       
   129         * @return Unique identifier of the audio effect object.
       
   130         */
       
   131 		TInt Uid(TUid &aUid);
       
   132 		// From MAudioEffectControl Ends
       
   133 
       
   134         // MAudioEffectObserver begins
       
   135         void EffectChanged( const CAudioEffect* aObservedEffect, TUint8 aEvent );
       
   136         // MAudioEffectObserver ends
       
   137         
       
   138         // From CEffectControlBase begins
       
   139         void Event( TEffectControlEvent aEvent );
       
   140         // From CEffectControlBase ends
       
   141     
       
   142     private:
       
   143         TInt DoApply();        
       
   144         TInt CreateEffectProxy();
       
   145         TInt DeleteEffectProxy();    
       
   146         TInt SavePreviousSettings();   
       
   147     
       
   148     private:
       
   149         CStereoWideningProxy* iStereoWideningProxy;
       
   150         CStereoWideningProxy* iPrevStereoWideningProxy;
       
   151         TMMFMessageDestinationPckg iMsgHndlrHandlePckg;
       
   152         MCustomCommand* iCustomCommand;        
       
   153         RPointerArray<MControlObserver> iObservers;    
       
   154         };
       
   155     } // namespace multimedia
       
   156 
       
   157 #endif // STEREOWIDENINGEFFECTIMPL_H
       
   158 
       
   159 // End of file