mmfenh/enhancedmediaclient/Client/src/Components/AudioEffects/SourceLocationEffectImpl.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 SOURCELOCATIONEFFECTIMPL_H
       
    20 #define SOURCELOCATIONEFFECTIMPL_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <SourceLocationControl.h>
       
    24 #include "EffectControlBase.h"
       
    25 #include <SourceLocationProxy.h>
       
    26 #include <MAudioEffectObserver.h>
       
    27 
       
    28 namespace multimedia
       
    29     {
       
    30 	class MControlObserver;
       
    31     class CSourceLocationEffect : public CBase,
       
    32                           public MSourceLocationControl,
       
    33                           public MAudioEffectObserver,
       
    34                           public CEffectControlBase
       
    35         {
       
    36     public:
       
    37         CSourceLocationEffect();
       
    38         ~CSourceLocationEffect();
       
    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 MSourceLocationEffect begins
       
    53 		/**
       
    54         * Gets the cartesian coordinates for the location of the position.
       
    55         * @since 3.0
       
    56         * @param aX The x-coordinate of the position (in millimeters)
       
    57         * @param aY The y-coordinate of the position (in millimeters)
       
    58         * @param aZ The z-coordinate of the position (in millimeters)
       
    59         * @return -
       
    60         */
       
    61 		TInt LocationCartesian( TInt& aX, TInt& aY, TInt& aZ );
       
    62 
       
    63 		/**
       
    64         * Gets the spherical coordinates for the location of the position.
       
    65         * @since 3.0
       
    66         * @param aAzimuth The Azimuth of the position (thousandths of radians)
       
    67         * @param aElevation The elevation of the position (thousandths of radians)
       
    68         * @param aRadius The radius of the position (thousandths of radians)
       
    69         * @return -
       
    70         */
       
    71 		TInt LocationSpherical( TInt& aAzimuth, TInt& aElevation, TInt& aRadius );
       
    72 
       
    73 		/**
       
    74         * Sets the cartesian coordinates for the location of the position.
       
    75         * @since 3.0
       
    76         * @param aX The x-coordinate of the position
       
    77         * @param aY The y-coordinate of the position
       
    78         * @param aZ The z-coordinate of the position
       
    79         * @return -
       
    80         */
       
    81 		TInt SetLocationCartesian( TInt aX, TInt aY, TInt aZ );
       
    82 
       
    83 		/**
       
    84         * Sets the spherical coordinates for the location of the position.
       
    85         * @since 3.0
       
    86         * @param aAzimuth The Azimuth of the position (thousandths of radians)
       
    87         * @param aElevation The elevation of the position (thousandths of radians)
       
    88         * @param aRadius The radius of the position (thousandths of radians)
       
    89         * @return -
       
    90         */
       
    91 		TInt SetLocationSpherical( TInt aAzimuth, TInt aElevation, TInt aRadius );
       
    92 
       
    93        // From MSourceLocationEffect ends
       
    94 
       
    95 		// From MAudioEffectControl
       
    96 		/**
       
    97         * Disable the effect
       
    98         * @since 5.0
       
    99         */
       
   100 		TInt Disable();
       
   101 
       
   102 		/**
       
   103         * Enable the effect
       
   104         * @since 5.0
       
   105         */
       
   106 		TInt Enable();
       
   107 
       
   108 		/**
       
   109         * Enforce the effect.
       
   110         * @since 5.0
       
   111         * @param aEnforced Indicate the effect is to be enforced or not. ETrue = Enforced.
       
   112         */
       
   113 		TInt Enforce( TBool &aEnforced );
       
   114 
       
   115 		/**
       
   116         * Check if this effect object currently has update rights.
       
   117         * A client can lose update rights in some hardware platforms where there are a limited
       
   118         * number of instances of an effect that can exist at the same time. When an effect instance
       
   119         * has lost update rights the user can still change settings, but any calls to Apply the
       
   120         * settings will be deferred until update rights are regained.
       
   121         * @since 5.0
       
   122         * @return ETrue if this object currently has rights to update the settings of this effect,
       
   123         *         EFalse otherwise.
       
   124         */
       
   125 		TInt HaveUpdateRights(TBool &aHaveUpdateRights);
       
   126 
       
   127 		/**
       
   128         * Check if the effect is enabled
       
   129         * @since 5.0
       
   130         * @return ETrue if the effect is enabled, EFalse if the effect is disabled.
       
   131         */
       
   132 		TInt IsEnabled(TBool &aEnabled);
       
   133 
       
   134 		/**
       
   135         * Check if the effect is enforced.
       
   136         * @since 5.0
       
   137         * @return ETrue if the effect is enforced, EFalse if the effect isn ot enforced.
       
   138         */
       
   139 		TInt IsEnforced(TBool &aEnforced);
       
   140 
       
   141 		/*
       
   142         * Get the unique identifier of the audio effect
       
   143         * @since 5.0
       
   144         * @return Unique identifier of the audio effect object.
       
   145         */
       
   146 		TInt Uid(TUid &aUid);
       
   147 		// From MAudioEffectControl Ends
       
   148 
       
   149         // MAudioEffectObserver begins
       
   150         void EffectChanged( const CAudioEffect* aObservedEffect, TUint8 aEvent );
       
   151         // MAudioEffectObserver ends
       
   152         
       
   153         // From CEffectControlBase begins
       
   154         void Event( TEffectControlEvent aEvent );
       
   155         // From CEffectControlBase ends
       
   156     
       
   157     private:
       
   158         TInt DoApply();        
       
   159         TInt CreateEffectProxy();
       
   160         TInt DeleteEffectProxy();    
       
   161         TInt SavePreviousSettings();   
       
   162     
       
   163     private:
       
   164         CSourceLocationProxy* iSourceLocationProxy;
       
   165         CSourceLocationProxy* iPrevSourceLocationProxy;
       
   166         TMMFMessageDestinationPckg iMsgHndlrHandlePckg;
       
   167         MCustomCommand* iCustomCommand;        
       
   168         RPointerArray<MControlObserver> iObservers;    
       
   169         };
       
   170     } // namespace multimedia
       
   171 
       
   172 #endif // SOURCELOCATIONEFFECTIMPL_H
       
   173 
       
   174 // End of file