2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: This is the definition of the orientation effect baseclass.
20 #ifndef CORIENTATION_H
21 #define CORIENTATION_H
26 #include <AudioEffectBase.h>
27 #include <OrientationData.h>
28 #include <MCustomInterface.h>
33 * This is the orientation effect base class.
35 * @lib OrientationEffect.lib
39 class COrientation : public CAudioEffect
42 protected: // Constructors and destructor
48 IMPORT_C virtual ~COrientation();
51 * Private C++ constructor for this class.
53 IMPORT_C COrientation();
56 public: //New Functions
59 * Get the orientation vectors for the position
61 * @param aHeading The heading (thousandths of radians)
62 * @param aPitch The Pitch (thousandths of radians)
63 * @param aRoll The Roll (thousandths of radians)
66 IMPORT_C void Orientation( TInt32& aHeading, TInt32& aPitch, TInt32& aRoll );
69 * Gets the orientation of the position.
71 * @param aFrontX X value of Front vector
72 * @param aFrontY Y value of Front vector
73 * @param aFrontZ Z value of Front vector
74 * @param aAboveX X value of Above vector
75 * @param aAboveY Y value of Above vector
76 * @param aAboveZ Z value of Above vector
79 IMPORT_C void OrientationVectors( TInt32& aFrontX, TInt32& aFrontY, TInt32& aFrontZ,
80 TInt32& aAboveX, TInt32& aAboveY, TInt32& aAboveZ );
83 * Sets the Heading, Pitch, Roll values for the orientation of the source
85 * @param aHeading The heading (thousandths of radians)
86 * @param aPitch The Pitch (thousandths of radians)
87 * @param aRoll The Roll (thousandths of radians)
90 IMPORT_C void SetOrientationL( TInt32 aHeading, TInt32 aPitch, TInt32 aRoll );
93 * Sets the Front and Above vectors for the orientation of the position.
95 * @param aFrontX X value of Front vector
96 * @param aFrontY Y value of Front vector
97 * @param aFrontZ Z value of Front vector
98 * @param aAboveX X value of Above vector
99 * @param aAboveY Y value of Above vector
100 * @param aAboveZ Z value of Above vector
103 IMPORT_C void SetOrientationVectorsL( TInt32 aFrontX, TInt32 aFrontY, TInt32 aFrontZ,
104 TInt32 aAboveX, TInt32 aAboveY, TInt32 aAboveZ );
106 protected: // Functions from base classes
110 * Create a package of the effect data
112 * @return A descriptor containing the effect data.
114 IMPORT_C const TDesC8& DoEffectData();
118 * Internal function to unpack effect data
120 * @param aEffectDataBuffer Descriptor containing packed effect data
123 IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer );
127 // Orientation data structure
128 TEfOrientation iOrientationData;
129 // Data package sent to server
130 TEfOrientationDataPckg iDataPckgTo;
131 // Data package received from server
132 TEfOrientationDataPckg iDataPckgFrom;
135 #endif // of CORIENTATION_H