javauis/amms_akn/mmacontrol/inc/cammsdopplercontrol.h
changeset 21 2a9601315dfc
equal deleted inserted replaced
18:e8e63152f320 21:2a9601315dfc
       
     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 effect called Doppler.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CAMMSDOPPLERCONTROL_H
       
    20 #define CAMMSDOPPLERCONTROL_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <DopplerBase.h>
       
    25 #include "cammscontrol.h"
       
    26 
       
    27 // CLASS DECLARATION
       
    28 
       
    29 /**
       
    30 *
       
    31 *  Controls for the Doppler effect.
       
    32 *  This class delegates Doppler effect method calls to CDoppler.
       
    33 *
       
    34 *
       
    35 *  @since 3.0
       
    36 */
       
    37 NONSHARABLE_CLASS(CAMMSDopplerControl): public CAMMSControl
       
    38 {
       
    39 public:  // Destructor
       
    40     /**
       
    41     * Destructor.
       
    42     */
       
    43     ~CAMMSDopplerControl();
       
    44 
       
    45 public: // New functions
       
    46     /**
       
    47     * Specifies if this Doppler effect is active or ignored. In case the
       
    48     * DopplerControl is fetched from the Spectator, this method does not
       
    49     * affect anything.
       
    50     *
       
    51     * @param aEnabled The boolean specifying if this Doppler effect is to
       
    52     * be applied.
       
    53     *
       
    54     * @par Leaving:
       
    55     * From Java API there are no leave codes, but the uset EffectControl's
       
    56     * method leaves with the sama way as in effect control, if:
       
    57     * - the effect cannot be enabled in this state of the player.
       
    58     * - enabling is not supported (with the scope set).
       
    59     */
       
    60     virtual void SetEnabledL(TBool aDopplerEnabled);
       
    61 
       
    62     /**
       
    63     * Returns whether this Doppler effect is currently active.
       
    64     *
       
    65     * @return The boolean, true if Doppler is being applied.
       
    66     */
       
    67     virtual TBool Enabled();
       
    68 
       
    69     /**
       
    70     * Sets the velocity, used in calculations for the Doppler effect.
       
    71     *
       
    72     * The velocity is specified using right-handed cartesian components in
       
    73     * units defined by GlobalManager.getUnitsPerMeter(). For example, if
       
    74     * the x parameter is specified to be 5000 and
       
    75     * GlobalManager.getUnitsPerMeter() returns 1000 the actual x component
       
    76     * will be 5 m/s. The same applies to y and z parameters.
       
    77     *
       
    78     * @param aX The x-coordinate of the new velocity.
       
    79     * @param aY The y-coordinate of the new velocity.
       
    80     * @param aZ The z-coordinate of the new velocity.
       
    81     *
       
    82     * @par Leaving:
       
    83     * @li \c KErrArgument - coordinates are not correct.
       
    84     */
       
    85     virtual void SetVelocityCartesianL(TInt aX, TInt aY, TInt aZ);
       
    86 
       
    87     /**
       
    88     * Returns the current velocity, used in calculations for the Doppler
       
    89     * effect. The velocity is specified using right-handed cartesian
       
    90     * components in units defined by GlobalManager.getUnitsPerMeter().
       
    91     * The referenced memory of arguments will contain the coordinate values.
       
    92     *
       
    93     * @param aX The x-coordinate of the velocity.
       
    94     * @param aY The y-coordinate of the velocity.
       
    95     * @param aZ The z-coordinate of the velocity.
       
    96     */
       
    97     virtual void VelocityCartesian(TInt& aX, TInt& aY, TInt& aZ);
       
    98 
       
    99     /**
       
   100     * Sets the velocity, used in calculations for the Doppler effect.
       
   101     *
       
   102     * The velocity is specified using spherical components. The radius
       
   103     * component is specified in units defined by
       
   104     * GlobalManager.getUnitsPerMeter(). For example, if the radius
       
   105     * parameter is specified to be 5000 and
       
   106     * GlobalManager.getUnitsPerMeter() returns 1000 the actual radius
       
   107     * component will be 5 m/s.
       
   108     *
       
   109     * @param aAzimuth The azimuth angle of the new velocity in degrees.
       
   110     * @param aElevation The elevation angle of the new velocity in degrees.
       
   111     * @param aRadius The magnitude of the new velocity (namely the speed).
       
   112     *
       
   113     * @par Leaving:
       
   114     * @li \c KErrArgument - coordinates are not correct.
       
   115     */
       
   116     virtual void SetVelocitySphericalL(TInt aAzimuth, TInt aElevation,
       
   117                                        TInt aRadius);
       
   118 
       
   119 protected:
       
   120     /**
       
   121     * C++ default constructor, protected to allow access from derived class
       
   122     * @param aPlayer Player that has this control.
       
   123     */
       
   124     CAMMSDopplerControl(CMMAPlayer* aPlayer);
       
   125 
       
   126 
       
   127 protected:  // Data
       
   128 
       
   129     /* Native Doppler effect, set from derived classes */
       
   130     CDoppler* iDopplerEffect;
       
   131 };
       
   132 
       
   133 #endif // CAMMSDOPPLERCONTROL_H
       
   134 
       
   135