williamr@2: /*
williamr@2: * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
williamr@2: * All rights reserved.
williamr@2: * This component and the accompanying materials are made available
williamr@2: * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
williamr@2: * which accompanies this distribution, and is available
williamr@2: * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2: *
williamr@2: * Initial Contributors:
williamr@2: * Nokia Corporation - initial contribution.
williamr@2: *
williamr@2: * Contributors:
williamr@2: *
williamr@2: * Description:  This is the definition of the base class for location effect.
williamr@2: *
williamr@2: *
williamr@2: */
williamr@2: 
williamr@2: 
williamr@2: #ifndef CLOCATION_H
williamr@2: #define CLOCATION_H
williamr@2: 
williamr@2: // INCLUDES
williamr@2: 
williamr@2: #include <e32base.h>
williamr@2: #include <AudioEffectBase.h>
williamr@2: #include <LocationData.h>
williamr@2: 
williamr@2: // CLASS DECLARATION
williamr@2: 
williamr@2: /**
williamr@2: *  This is the base class for location effect settings.
williamr@2: *
williamr@2: *  @lib LocationEffect.lib
williamr@2: *  @since 3.0
williamr@2: */
williamr@2: 
williamr@2: class CLocation : public CAudioEffect
williamr@2: 	{
williamr@2: 
williamr@2: 	protected:	// Constructors and destructor
williamr@2: 
williamr@2: 		/**
williamr@2:         *
williamr@2:         * Destructor
williamr@2:         */
williamr@2: 		IMPORT_C virtual ~CLocation();
williamr@2: 
williamr@2: 		/**
williamr@2: 		* Private C++ constructor for this class.
williamr@2:         */
williamr@2: 		IMPORT_C CLocation();
williamr@2: 
williamr@2: 	public: // New Functions
williamr@2: 
williamr@2: 		/**
williamr@2:         * Gets the cartesian coordinates for the location of the position.
williamr@2:         * @since 3.0
williamr@2:         * @param aX The x-coordinate of the position (in millimeters)
williamr@2:         * @param aY The y-coordinate of the position (in millimeters)
williamr@2:         * @param aZ The z-coordinate of the position (in millimeters)
williamr@2:         * @return -
williamr@2:         */
williamr@2: 		IMPORT_C void LocationCartesian( TInt32& aX, TInt32& aY, TInt32& aZ );
williamr@2: 
williamr@2: 		/**
williamr@2:         * Gets the spherical coordinates for the location of the position.
williamr@2:         * @since 3.0
williamr@2:         * @param aAzimuth The Azimuth of the position (thousandths of radians)
williamr@2:         * @param aElevation The elevation of the position (thousandths of radians)
williamr@2:         * @param aRadius The radius of the position (thousandths of radians)
williamr@2:         * @return -
williamr@2:         */
williamr@2: 		IMPORT_C void LocationSpherical( TInt32& aAzimuth, TInt32& aElevation, TInt32& aRadius );
williamr@2: 
williamr@2: 		/**
williamr@2:         * Sets the cartesian coordinates for the location of the position.
williamr@2:         * @since 3.0
williamr@2:         * @param aX The x-coordinate of the position
williamr@2:         * @param aY The y-coordinate of the position
williamr@2:         * @param aZ The z-coordinate of the position
williamr@2:         * @return -
williamr@2:         */
williamr@2: 		IMPORT_C void SetLocationCartesianL( TInt32& aX, TInt32& aY, TInt32& aZ );
williamr@2: 
williamr@2: 		/**
williamr@2:         * Sets the spherical coordinates for the location of the position.
williamr@2:         * @since 3.0
williamr@2:         * @param aAzimuth The Azimuth of the position (thousandths of radians)
williamr@2:         * @param aElevation The elevation of the position (thousandths of radians)
williamr@2:         * @param aRadius The radius of the position (thousandths of radians)
williamr@2:         * @return -
williamr@2:         */
williamr@2: 		IMPORT_C void SetLocationSphericalL( TInt32& aAzimuth, TInt32& aElevation, TInt32& aRadius );
williamr@2: 
williamr@2:     protected:  // Functions from base classes
williamr@2: 
williamr@2: 		/**
williamr@2: 		* From CAudioEffect
williamr@2: 		* Create a package of the effect data
williamr@2:         * @since 3.0
williamr@2:         * @return A descriptor containing the effect data.
williamr@2:         */
williamr@2: 		IMPORT_C const TDesC8& DoEffectData();
williamr@2: 
williamr@2: 		/**
williamr@2: 		* From CAudioEffect
williamr@2: 		* Internal function to unpack effect data
williamr@2:         * @since 3.0
williamr@2:         * @param aEffectDataBuffer Descriptor containing packed effect data
williamr@2:         * @return -
williamr@2:         */
williamr@2:         IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer );
williamr@2: 
williamr@2: 	protected:
williamr@2: 
williamr@2: 		// Location data structure
williamr@2: 		TEfLocation iLocationData;
williamr@2: 		// Data package sent to server
williamr@2: 		TEfLocationDataPckg iDataPckgTo;
williamr@2: 		// Data package received from server
williamr@2: 		TEfLocationDataPckg iDataPckgFrom;
williamr@2: 	};
williamr@2: 
williamr@2: #endif	// of CLOCATION_H
williamr@2: 
williamr@2: // End of File