1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mm_pub/audio_effects_api/inc/OrientationBase.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,137 @@
1.4 +/*
1.5 +* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: This is the definition of the orientation effect baseclass.
1.18 +*
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +#ifndef CORIENTATION_H
1.24 +#define CORIENTATION_H
1.25 +
1.26 +// INCLUDES
1.27 +
1.28 +#include <e32base.h>
1.29 +#include <AudioEffectBase.h>
1.30 +#include <OrientationData.h>
1.31 +#include <MCustomInterface.h>
1.32 +
1.33 +// CLASS DECLARATION
1.34 +
1.35 +/**
1.36 +* This is the orientation effect base class.
1.37 +*
1.38 +* @lib OrientationEffect.lib
1.39 +* @since 3.0
1.40 +*/
1.41 +
1.42 +class COrientation : public CAudioEffect
1.43 + {
1.44 +
1.45 + protected: // Constructors and destructor
1.46 +
1.47 + /**
1.48 + *
1.49 + * Destructor
1.50 + */
1.51 + IMPORT_C virtual ~COrientation();
1.52 +
1.53 + /**
1.54 + * Private C++ constructor for this class.
1.55 + */
1.56 + IMPORT_C COrientation();
1.57 +
1.58 +
1.59 + public: //New Functions
1.60 +
1.61 + /**
1.62 + * Get the orientation vectors for the position
1.63 + * @since 3.0
1.64 + * @param aHeading The heading (thousandths of radians)
1.65 + * @param aPitch The Pitch (thousandths of radians)
1.66 + * @param aRoll The Roll (thousandths of radians)
1.67 + * @return -
1.68 + */
1.69 + IMPORT_C void Orientation( TInt32& aHeading, TInt32& aPitch, TInt32& aRoll );
1.70 +
1.71 + /**
1.72 + * Gets the orientation of the position.
1.73 + * @since 3.0
1.74 + * @param aFrontX X value of Front vector
1.75 + * @param aFrontY Y value of Front vector
1.76 + * @param aFrontZ Z value of Front vector
1.77 + * @param aAboveX X value of Above vector
1.78 + * @param aAboveY Y value of Above vector
1.79 + * @param aAboveZ Z value of Above vector
1.80 + * @return -
1.81 + */
1.82 + IMPORT_C void OrientationVectors( TInt32& aFrontX, TInt32& aFrontY, TInt32& aFrontZ,
1.83 + TInt32& aAboveX, TInt32& aAboveY, TInt32& aAboveZ );
1.84 +
1.85 + /**
1.86 + * Sets the Heading, Pitch, Roll values for the orientation of the source
1.87 + * @since 3.0
1.88 + * @param aHeading The heading (thousandths of radians)
1.89 + * @param aPitch The Pitch (thousandths of radians)
1.90 + * @param aRoll The Roll (thousandths of radians)
1.91 + * @return -
1.92 + */
1.93 + IMPORT_C void SetOrientationL( TInt32 aHeading, TInt32 aPitch, TInt32 aRoll );
1.94 +
1.95 + /**
1.96 + * Sets the Front and Above vectors for the orientation of the position.
1.97 + * @since 3.0
1.98 + * @param aFrontX X value of Front vector
1.99 + * @param aFrontY Y value of Front vector
1.100 + * @param aFrontZ Z value of Front vector
1.101 + * @param aAboveX X value of Above vector
1.102 + * @param aAboveY Y value of Above vector
1.103 + * @param aAboveZ Z value of Above vector
1.104 + * @return -
1.105 + */
1.106 + IMPORT_C void SetOrientationVectorsL( TInt32 aFrontX, TInt32 aFrontY, TInt32 aFrontZ,
1.107 + TInt32 aAboveX, TInt32 aAboveY, TInt32 aAboveZ );
1.108 +
1.109 + protected: // Functions from base classes
1.110 +
1.111 + /**
1.112 + * From CAudioEffect
1.113 + * Create a package of the effect data
1.114 + * @since 3.0
1.115 + * @return A descriptor containing the effect data.
1.116 + */
1.117 + IMPORT_C const TDesC8& DoEffectData();
1.118 +
1.119 + /**
1.120 + * From CAudioEffect
1.121 + * Internal function to unpack effect data
1.122 + * @since 3.0
1.123 + * @param aEffectDataBuffer Descriptor containing packed effect data
1.124 + * @return -
1.125 + */
1.126 + IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer );
1.127 +
1.128 + protected:
1.129 +
1.130 + // Orientation data structure
1.131 + TEfOrientation iOrientationData;
1.132 + // Data package sent to server
1.133 + TEfOrientationDataPckg iDataPckgTo;
1.134 + // Data package received from server
1.135 + TEfOrientationDataPckg iDataPckgFrom;
1.136 + };
1.137 +
1.138 +#endif // of CORIENTATION_H
1.139 +
1.140 +// End of File