os/mm/mm_pub/audio_effects_api/inc/OrientationBase.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description:  This is the definition of the orientation effect baseclass.
sl@0
    15
*
sl@0
    16
*
sl@0
    17
*/
sl@0
    18
sl@0
    19
sl@0
    20
#ifndef CORIENTATION_H
sl@0
    21
#define CORIENTATION_H
sl@0
    22
sl@0
    23
// INCLUDES
sl@0
    24
sl@0
    25
#include <e32base.h>
sl@0
    26
#include <AudioEffectBase.h>
sl@0
    27
#include <OrientationData.h>
sl@0
    28
#include <MCustomInterface.h>
sl@0
    29
sl@0
    30
// CLASS DECLARATION
sl@0
    31
sl@0
    32
/**
sl@0
    33
*  This is the orientation effect base class.
sl@0
    34
*
sl@0
    35
*  @lib OrientationEffect.lib
sl@0
    36
*  @since 3.0
sl@0
    37
*/
sl@0
    38
sl@0
    39
class COrientation : public CAudioEffect
sl@0
    40
	{
sl@0
    41
sl@0
    42
	protected:	// Constructors and destructor
sl@0
    43
sl@0
    44
		/**
sl@0
    45
        *
sl@0
    46
        * Destructor
sl@0
    47
        */
sl@0
    48
		IMPORT_C virtual ~COrientation();
sl@0
    49
sl@0
    50
		/**
sl@0
    51
		* Private C++ constructor for this class.
sl@0
    52
        */
sl@0
    53
		IMPORT_C COrientation();
sl@0
    54
sl@0
    55
sl@0
    56
	public:		//New Functions
sl@0
    57
sl@0
    58
		/**
sl@0
    59
        * Get the orientation vectors for the position
sl@0
    60
        * @since 3.0
sl@0
    61
        * @param aHeading The heading (thousandths of radians)
sl@0
    62
        * @param aPitch The Pitch (thousandths of radians)
sl@0
    63
        * @param aRoll The Roll (thousandths of radians)
sl@0
    64
        * @return -
sl@0
    65
        */
sl@0
    66
		IMPORT_C void Orientation( TInt32& aHeading, TInt32& aPitch, TInt32& aRoll );
sl@0
    67
sl@0
    68
		/**
sl@0
    69
        * Gets the orientation of the position.
sl@0
    70
        * @since 3.0
sl@0
    71
        * @param aFrontX X value of Front vector
sl@0
    72
        * @param aFrontY Y value of Front vector
sl@0
    73
        * @param aFrontZ Z value of Front vector
sl@0
    74
        * @param aAboveX X value of Above vector
sl@0
    75
        * @param aAboveY Y value of Above vector
sl@0
    76
        * @param aAboveZ Z value of Above vector
sl@0
    77
        * @return -
sl@0
    78
        */
sl@0
    79
		IMPORT_C void OrientationVectors( TInt32& aFrontX, TInt32& aFrontY, TInt32& aFrontZ,
sl@0
    80
								   	      TInt32& aAboveX, TInt32& aAboveY, TInt32& aAboveZ );
sl@0
    81
sl@0
    82
		/**
sl@0
    83
        * Sets the Heading, Pitch, Roll values for the orientation of the source
sl@0
    84
        * @since 3.0
sl@0
    85
        * @param aHeading The heading (thousandths of radians)
sl@0
    86
        * @param aPitch The Pitch (thousandths of radians)
sl@0
    87
        * @param aRoll The Roll (thousandths of radians)
sl@0
    88
        * @return -
sl@0
    89
        */
sl@0
    90
		IMPORT_C void SetOrientationL( TInt32 aHeading, TInt32 aPitch, TInt32 aRoll );
sl@0
    91
sl@0
    92
		/**
sl@0
    93
        * Sets the Front and Above vectors for the orientation of the position.
sl@0
    94
        * @since 3.0
sl@0
    95
        * @param aFrontX X value of Front vector
sl@0
    96
        * @param aFrontY Y value of Front vector
sl@0
    97
        * @param aFrontZ Z value of Front vector
sl@0
    98
        * @param aAboveX X value of Above vector
sl@0
    99
        * @param aAboveY Y value of Above vector
sl@0
   100
        * @param aAboveZ Z value of Above vector
sl@0
   101
        * @return -
sl@0
   102
        */
sl@0
   103
		IMPORT_C void SetOrientationVectorsL( TInt32 aFrontX, TInt32 aFrontY, TInt32 aFrontZ,
sl@0
   104
								   	      TInt32 aAboveX, TInt32 aAboveY, TInt32 aAboveZ );
sl@0
   105
sl@0
   106
    protected:  // Functions from base classes
sl@0
   107
sl@0
   108
		/**
sl@0
   109
		* From CAudioEffect
sl@0
   110
		* Create a package of the effect data
sl@0
   111
        * @since 3.0
sl@0
   112
        * @return A descriptor containing the effect data.
sl@0
   113
        */
sl@0
   114
		IMPORT_C const TDesC8& DoEffectData();
sl@0
   115
sl@0
   116
		/**
sl@0
   117
		* From CAudioEffect
sl@0
   118
		* Internal function to unpack effect data
sl@0
   119
        * @since 3.0
sl@0
   120
        * @param aEffectDataBuffer Descriptor containing packed effect data
sl@0
   121
        * @return -
sl@0
   122
        */
sl@0
   123
        IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer );
sl@0
   124
sl@0
   125
	protected:
sl@0
   126
sl@0
   127
		// Orientation data structure
sl@0
   128
		TEfOrientation iOrientationData;
sl@0
   129
		// Data package sent to server
sl@0
   130
		TEfOrientationDataPckg iDataPckgTo;
sl@0
   131
		// Data package received from server
sl@0
   132
		TEfOrientationDataPckg iDataPckgFrom;
sl@0
   133
	};
sl@0
   134
sl@0
   135
#endif	// of CORIENTATION_H
sl@0
   136
sl@0
   137
// End of File