mmfenh/enhancedmediaclient/Client/src/Components/AudioEffects/LoudnessEffectImpl.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 LOUDNESSEFFECTIMPL_H
       
    20 #define LOUDNESSEFFECTIMPL_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <LoudnessControl.h>
       
    24 #include "EffectControlBase.h"
       
    25 #include <LoudnessProxy.h>
       
    26 #include <MAudioEffectObserver.h>
       
    27 
       
    28 namespace multimedia
       
    29     {
       
    30 	class MControlObserver;
       
    31     class CLoudnessEffect : public CBase,
       
    32                           public MLoudnessControl,
       
    33                           public MAudioEffectObserver,
       
    34                           public CEffectControlBase
       
    35         {
       
    36     public:
       
    37         CLoudnessEffect();
       
    38         ~CLoudnessEffect();
       
    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 MLoudnessEffect begins
       
    53        // From MLoudnessEffect ends
       
    54 
       
    55 		// From MAudioEffectControl
       
    56 		/**
       
    57         * Disable the effect
       
    58         * @since 5.0
       
    59         */
       
    60 		TInt Disable();
       
    61 
       
    62 		/**
       
    63         * Enable the effect
       
    64         * @since 5.0
       
    65         */
       
    66 		TInt Enable();
       
    67 
       
    68 		/**
       
    69         * Enforce the effect.
       
    70         * @since 5.0
       
    71         * @param aEnforced Indicate the effect is to be enforced or not. ETrue = Enforced.
       
    72         */
       
    73 		TInt Enforce( TBool &aEnforced );
       
    74 
       
    75 		/**
       
    76         * Check if this effect object currently has update rights.
       
    77         * A client can lose update rights in some hardware platforms where there are a limited
       
    78         * number of instances of an effect that can exist at the same time. When an effect instance
       
    79         * has lost update rights the user can still change settings, but any calls to Apply the
       
    80         * settings will be deferred until update rights are regained.
       
    81         * @since 5.0
       
    82         * @return ETrue if this object currently has rights to update the settings of this effect,
       
    83         *         EFalse otherwise.
       
    84         */
       
    85 		TInt HaveUpdateRights(TBool &aHaveUpdateRights);
       
    86 
       
    87 		/**
       
    88         * Check if the effect is enabled
       
    89         * @since 5.0
       
    90         * @return ETrue if the effect is enabled, EFalse if the effect is disabled.
       
    91         */
       
    92 		TInt IsEnabled(TBool &aEnabled);
       
    93 
       
    94 		/**
       
    95         * Check if the effect is enforced.
       
    96         * @since 5.0
       
    97         * @return ETrue if the effect is enforced, EFalse if the effect isn ot enforced.
       
    98         */
       
    99 		TInt IsEnforced(TBool &aEnforced);
       
   100 
       
   101 		/*
       
   102         * Get the unique identifier of the audio effect
       
   103         * @since 5.0
       
   104         * @return Unique identifier of the audio effect object.
       
   105         */
       
   106 		TInt Uid(TUid &aUid);
       
   107 		// From MAudioEffectControl Ends
       
   108 
       
   109         // MAudioEffectObserver begins
       
   110         void EffectChanged( const CAudioEffect* aObservedEffect, TUint8 aEvent );
       
   111         // MAudioEffectObserver ends
       
   112         
       
   113         // From CEffectControlBase begins
       
   114         void Event( TEffectControlEvent aEvent );
       
   115         // From CEffectControlBase ends
       
   116     
       
   117     private:
       
   118         TInt DoApply();        
       
   119         TInt CreateEffectProxy();
       
   120         TInt DeleteEffectProxy();    
       
   121         TInt SavePreviousSettings();   
       
   122     
       
   123     private:
       
   124         CLoudnessProxy* iLoudnessProxy;
       
   125         CLoudnessProxy* iPrevLoudnessProxy;
       
   126         TMMFMessageDestinationPckg iMsgHndlrHandlePckg;
       
   127         MCustomCommand* iCustomCommand;        
       
   128         RPointerArray<MControlObserver> iObservers;    
       
   129         };
       
   130     } // namespace multimedia
       
   131 
       
   132 #endif // LOUDNESSEFFECTIMPL_H
       
   133 
       
   134 // End of file