author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:33:34 +0100 | |
branch | Symbian3 |
changeset 4 | 837f303aceeb |
parent 2 | 2fe1408b6811 |
permissions | -rw-r--r-- |
williamr@2 | 1 |
/* |
williamr@2 | 2 |
* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 3 |
* All rights reserved. |
williamr@2 | 4 |
* This component and the accompanying materials are made available |
williamr@4 | 5 |
* under the terms of "Eclipse Public License v1.0" |
williamr@2 | 6 |
* which accompanies this distribution, and is available |
williamr@4 | 7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
williamr@2 | 8 |
* |
williamr@2 | 9 |
* Initial Contributors: |
williamr@2 | 10 |
* Nokia Corporation - initial contribution. |
williamr@2 | 11 |
* |
williamr@2 | 12 |
* Contributors: |
williamr@2 | 13 |
* |
williamr@2 | 14 |
* Description: This is the definition of the base class for location effect. |
williamr@2 | 15 |
* |
williamr@2 | 16 |
* |
williamr@2 | 17 |
*/ |
williamr@2 | 18 |
|
williamr@2 | 19 |
|
williamr@2 | 20 |
#ifndef CLOCATION_H |
williamr@2 | 21 |
#define CLOCATION_H |
williamr@2 | 22 |
|
williamr@2 | 23 |
// INCLUDES |
williamr@2 | 24 |
|
williamr@2 | 25 |
#include <e32base.h> |
williamr@2 | 26 |
#include <AudioEffectBase.h> |
williamr@2 | 27 |
#include <LocationData.h> |
williamr@2 | 28 |
|
williamr@2 | 29 |
// CLASS DECLARATION |
williamr@2 | 30 |
|
williamr@2 | 31 |
/** |
williamr@2 | 32 |
* This is the base class for location effect settings. |
williamr@2 | 33 |
* |
williamr@2 | 34 |
* @lib LocationEffect.lib |
williamr@2 | 35 |
* @since 3.0 |
williamr@2 | 36 |
*/ |
williamr@2 | 37 |
|
williamr@2 | 38 |
class CLocation : public CAudioEffect |
williamr@2 | 39 |
{ |
williamr@2 | 40 |
|
williamr@2 | 41 |
protected: // Constructors and destructor |
williamr@2 | 42 |
|
williamr@2 | 43 |
/** |
williamr@2 | 44 |
* |
williamr@2 | 45 |
* Destructor |
williamr@2 | 46 |
*/ |
williamr@2 | 47 |
IMPORT_C virtual ~CLocation(); |
williamr@2 | 48 |
|
williamr@2 | 49 |
/** |
williamr@2 | 50 |
* Private C++ constructor for this class. |
williamr@2 | 51 |
*/ |
williamr@2 | 52 |
IMPORT_C CLocation(); |
williamr@2 | 53 |
|
williamr@2 | 54 |
public: // New Functions |
williamr@2 | 55 |
|
williamr@2 | 56 |
/** |
williamr@2 | 57 |
* Gets the cartesian coordinates for the location of the position. |
williamr@2 | 58 |
* @since 3.0 |
williamr@2 | 59 |
* @param aX The x-coordinate of the position (in millimeters) |
williamr@2 | 60 |
* @param aY The y-coordinate of the position (in millimeters) |
williamr@2 | 61 |
* @param aZ The z-coordinate of the position (in millimeters) |
williamr@2 | 62 |
* @return - |
williamr@2 | 63 |
*/ |
williamr@2 | 64 |
IMPORT_C void LocationCartesian( TInt32& aX, TInt32& aY, TInt32& aZ ); |
williamr@2 | 65 |
|
williamr@2 | 66 |
/** |
williamr@2 | 67 |
* Gets the spherical coordinates for the location of the position. |
williamr@2 | 68 |
* @since 3.0 |
williamr@2 | 69 |
* @param aAzimuth The Azimuth of the position (thousandths of radians) |
williamr@2 | 70 |
* @param aElevation The elevation of the position (thousandths of radians) |
williamr@2 | 71 |
* @param aRadius The radius of the position (thousandths of radians) |
williamr@2 | 72 |
* @return - |
williamr@2 | 73 |
*/ |
williamr@2 | 74 |
IMPORT_C void LocationSpherical( TInt32& aAzimuth, TInt32& aElevation, TInt32& aRadius ); |
williamr@2 | 75 |
|
williamr@2 | 76 |
/** |
williamr@2 | 77 |
* Sets the cartesian coordinates for the location of the position. |
williamr@2 | 78 |
* @since 3.0 |
williamr@2 | 79 |
* @param aX The x-coordinate of the position |
williamr@2 | 80 |
* @param aY The y-coordinate of the position |
williamr@2 | 81 |
* @param aZ The z-coordinate of the position |
williamr@2 | 82 |
* @return - |
williamr@2 | 83 |
*/ |
williamr@2 | 84 |
IMPORT_C void SetLocationCartesianL( TInt32& aX, TInt32& aY, TInt32& aZ ); |
williamr@2 | 85 |
|
williamr@2 | 86 |
/** |
williamr@2 | 87 |
* Sets the spherical coordinates for the location of the position. |
williamr@2 | 88 |
* @since 3.0 |
williamr@2 | 89 |
* @param aAzimuth The Azimuth of the position (thousandths of radians) |
williamr@2 | 90 |
* @param aElevation The elevation of the position (thousandths of radians) |
williamr@2 | 91 |
* @param aRadius The radius of the position (thousandths of radians) |
williamr@2 | 92 |
* @return - |
williamr@2 | 93 |
*/ |
williamr@2 | 94 |
IMPORT_C void SetLocationSphericalL( TInt32& aAzimuth, TInt32& aElevation, TInt32& aRadius ); |
williamr@2 | 95 |
|
williamr@2 | 96 |
protected: // Functions from base classes |
williamr@2 | 97 |
|
williamr@2 | 98 |
/** |
williamr@2 | 99 |
* From CAudioEffect |
williamr@2 | 100 |
* Create a package of the effect data |
williamr@2 | 101 |
* @since 3.0 |
williamr@2 | 102 |
* @return A descriptor containing the effect data. |
williamr@2 | 103 |
*/ |
williamr@2 | 104 |
IMPORT_C const TDesC8& DoEffectData(); |
williamr@2 | 105 |
|
williamr@2 | 106 |
/** |
williamr@2 | 107 |
* From CAudioEffect |
williamr@2 | 108 |
* Internal function to unpack effect data |
williamr@2 | 109 |
* @since 3.0 |
williamr@2 | 110 |
* @param aEffectDataBuffer Descriptor containing packed effect data |
williamr@2 | 111 |
* @return - |
williamr@2 | 112 |
*/ |
williamr@2 | 113 |
IMPORT_C void SetEffectData( const TDesC8& aEffectDataBuffer ); |
williamr@2 | 114 |
|
williamr@2 | 115 |
protected: |
williamr@2 | 116 |
|
williamr@2 | 117 |
// Location data structure |
williamr@2 | 118 |
TEfLocation iLocationData; |
williamr@2 | 119 |
// Data package sent to server |
williamr@2 | 120 |
TEfLocationDataPckg iDataPckgTo; |
williamr@2 | 121 |
// Data package received from server |
williamr@2 | 122 |
TEfLocationDataPckg iDataPckgFrom; |
williamr@2 | 123 |
}; |
williamr@2 | 124 |
|
williamr@2 | 125 |
#endif // of CLOCATION_H |
williamr@2 | 126 |
|
williamr@2 | 127 |
// End of File |