summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLincoln Ramsay <lincoln.ramsay@nokia.com>2011-02-22 14:13:22 +1000
committerLincoln Ramsay <lincoln.ramsay@nokia.com>2011-02-23 15:28:08 +1000
commit31dbd2a68e4e011819a49b1ffb37a1d3c52fd965 (patch)
tree7499b423df1db1cfdc707ba5438e6b34cc5a5167
parent4eda2bb02aed13b162c997b4d48d92287def54c0 (diff)
Fixing whitespace.
Hard tabs have destroyed the indents and trailing whitespace makes the git hooks complain.
-rw-r--r--plugins/sensors/symbian/accelerometersym.cpp20
-rw-r--r--plugins/sensors/symbian/accelerometersym.h18
-rw-r--r--plugins/sensors/symbian/ambientlightsensorsym.cpp8
-rw-r--r--plugins/sensors/symbian/ambientlightsensorsym.h14
-rw-r--r--plugins/sensors/symbian/compasssym.cpp10
-rw-r--r--plugins/sensors/symbian/compasssym.h22
-rw-r--r--plugins/sensors/symbian/magnetometersensorsym.cpp38
-rw-r--r--plugins/sensors/symbian/magnetometersensorsym.h24
-rw-r--r--plugins/sensors/symbian/orientationsym.cpp16
-rw-r--r--plugins/sensors/symbian/orientationsym.h16
-rw-r--r--plugins/sensors/symbian/proximitysensorsym.cpp8
-rw-r--r--plugins/sensors/symbian/proximitysensorsym.h14
-rw-r--r--plugins/sensors/symbian/rotationsensorsym.cpp14
-rw-r--r--plugins/sensors/symbian/rotationsensorsym.h18
-rw-r--r--plugins/sensors/symbian/sensorbackenddatasym.h2
-rw-r--r--plugins/sensors/symbian/sensorbackendsym.cpp80
-rw-r--r--plugins/sensors/symbian/sensorbackendsym.h78
-rw-r--r--plugins/sensors/symbian/symbian.pro40
-rw-r--r--plugins/sensors/symbian/tapsensorsym.cpp45
-rw-r--r--plugins/sensors/symbian/tapsensorsym.h12
20 files changed, 249 insertions, 248 deletions
diff --git a/plugins/sensors/symbian/accelerometersym.cpp b/plugins/sensors/symbian/accelerometersym.cpp
index 433c294837..5b3845ee5b 100644
--- a/plugins/sensors/symbian/accelerometersym.cpp
+++ b/plugins/sensors/symbian/accelerometersym.cpp
@@ -60,7 +60,7 @@ CAccelerometerSensorSym* CAccelerometerSensorSym::NewL(QSensor *sensor)
CleanupStack::PushL(self);
self->ConstructL();
CleanupStack::Pop();
- return self;
+ return self;
}
/**
@@ -81,7 +81,7 @@ CAccelerometerSensorSym::CAccelerometerSensorSym(QSensor *sensor):CSensorBackend
iUnit(0)
{
setReading<QAccelerometerReading>(&iReading);
- iBackendData.iSensorType = KSensrvChannelTypeIdAccelerometerXYZAxisData;
+ iBackendData.iSensorType = KSensrvChannelTypeIdAccelerometerXYZAxisData;
//Disable property listening
SetListening(ETrue, EFalse);
}
@@ -95,7 +95,7 @@ void CAccelerometerSensorSym::start()
if(err == KErrNone)
{
TSensrvProperty scaleRangeProperty;
- TRAP(err, iBackendData.iSensorChannel->GetPropertyL(KSensrvPropIdScaledRange, KSensrvItemIndexNone, scaleRangeProperty));
+ TRAP(err, iBackendData.iSensorChannel->GetPropertyL(KSensrvPropIdScaledRange, KSensrvItemIndexNone, scaleRangeProperty));
if(err == KErrNone)
{
if(scaleRangeProperty.GetArrayIndex() == ESensrvSingleProperty)
@@ -115,12 +115,12 @@ void CAccelerometerSensorSym::start()
{
TInt index;
if(scaleRangeProperty.PropertyType() == ESensrvIntProperty)
- {
+ {
scaleRangeProperty.GetValue(index);
}
else if(scaleRangeProperty.PropertyType() == ESensrvRealProperty)
{
- TReal realIndex;
+ TReal realIndex;
scaleRangeProperty.GetValue(realIndex);
index = realIndex;
}
@@ -163,14 +163,14 @@ void CAccelerometerSensorSym::RecvData(CSensrvChannel &aChannel)
//Converting unit to m/s^2
if(iScaleRange && iUnit == ESensevChannelUnitAcceleration)
{
- qoutputrangelist rangeList = sensor()->outputRanges();
+ qoutputrangelist rangeList = sensor()->outputRanges();
int outputRange = sensor()->outputRange();
if (outputRange == -1)
outputRange = 0;
- TReal maxValue = rangeList[outputRange].maximum;
+ TReal maxValue = rangeList[outputRange].maximum;
x = (x/iScaleRange) * maxValue;
y = (y/iScaleRange) * maxValue;
- z = (z/iScaleRange) * maxValue;
+ z = (z/iScaleRange) * maxValue;
}
else if(iUnit == ESensrvChannelUnitGravityConstant)
{
@@ -195,8 +195,8 @@ void CAccelerometerSensorSym::RecvData(CSensrvChannel &aChannel)
void CAccelerometerSensorSym::ConstructL()
{
//Initialize the backend resources
- InitializeL();
-
+ InitializeL();
+
TInt err;
TSensrvProperty unitProperty;
TRAP(err, iBackendData.iSensorChannel->GetPropertyL(KSensrvPropIdChannelUnit, ESensrvSingleProperty, unitProperty));
diff --git a/plugins/sensors/symbian/accelerometersym.h b/plugins/sensors/symbian/accelerometersym.h
index 821e05de9f..00f2f3ff1a 100644
--- a/plugins/sensors/symbian/accelerometersym.h
+++ b/plugins/sensors/symbian/accelerometersym.h
@@ -63,40 +63,40 @@ public:
* @return CAccelerometerSensorSym if successful, leaves on failure
*/
static CAccelerometerSensorSym* NewL(QSensor *sensor);
-
+
/**
* Destructor
* Closes the backend resources
*/
~CAccelerometerSensorSym();
-
+
void start();
-
+
private:
/**
* Default constructor
*/
CAccelerometerSensorSym(QSensor *sensor);
-
+
/*
* RecvData is used to retrieve the sensor reading from sensor server
* It is implemented here to handle accelerometer sensor specific
* reading data and provides conversion and utility code
- */
+ */
void RecvData(CSensrvChannel &aChannel);
-
+
/**
* Second phase constructor
* Initialize the backend resources
*/
- void ConstructL();
-
+ void ConstructL();
+
public:
/**
* Holds the id of the accelerometer
*/
static char const * const id;
-
+
private:
QAccelerometerReading iReading;
TSensrvAccelerometerAxisData iData;
diff --git a/plugins/sensors/symbian/ambientlightsensorsym.cpp b/plugins/sensors/symbian/ambientlightsensorsym.cpp
index 812f6c9fc4..658a35d42c 100644
--- a/plugins/sensors/symbian/ambientlightsensorsym.cpp
+++ b/plugins/sensors/symbian/ambientlightsensorsym.cpp
@@ -56,7 +56,7 @@ CAmbientLightSensorSym* CAmbientLightSensorSym::NewL(QSensor *sensor)
CleanupStack::PushL(self);
self->ConstructL();
CleanupStack::Pop();
- return self;
+ return self;
}
/**
@@ -74,7 +74,7 @@ CAmbientLightSensorSym::~CAmbientLightSensorSym()
*/
CAmbientLightSensorSym::CAmbientLightSensorSym(QSensor *sensor):CSensorBackendSym(sensor)
{
- setReading<QAmbientLightReading>(&iReading);
+ setReading<QAmbientLightReading>(&iReading);
iBackendData.iSensorType = KSensrvChannelTypeIdAmbientLightData;
}
@@ -82,7 +82,7 @@ CAmbientLightSensorSym::CAmbientLightSensorSym(QSensor *sensor):CSensorBackendSy
* RecvData is used to retrieve the sensor reading from sensor server
* It is implemented here to handle ambient light sensor specific
* reading data and provides conversion and utility code
- */
+ */
void CAmbientLightSensorSym::RecvData(CSensrvChannel &aChannel)
{
TPckg<TSensrvAmbientLightData> lightpkg( iData );
@@ -99,7 +99,7 @@ void CAmbientLightSensorSym::RecvData(CSensrvChannel &aChannel)
case TSensrvAmbientLightData::KAmbientLightVeryDark:
case TSensrvAmbientLightData::KAmbientLightDark:
{
- iReading.setLightLevel(QAmbientLightReading::Dark);
+ iReading.setLightLevel(QAmbientLightReading::Dark);
}
break;
diff --git a/plugins/sensors/symbian/ambientlightsensorsym.h b/plugins/sensors/symbian/ambientlightsensorsym.h
index c36a2ecfae..bab09dc7bb 100644
--- a/plugins/sensors/symbian/ambientlightsensorsym.h
+++ b/plugins/sensors/symbian/ambientlightsensorsym.h
@@ -63,38 +63,38 @@ public:
* @return CAmbientLightSensorSym if successful, leaves on failure
*/
static CAmbientLightSensorSym* NewL(QSensor *sensor);
-
+
/**
* Destructor
* Closes the backend resources
*/
~CAmbientLightSensorSym();
-
+
private:
/**
* Default constructor
*/
CAmbientLightSensorSym(QSensor *sensor);
-
+
/*
* RecvData is used to retrieve the sensor reading from sensor server
* It is implemented here to handle ambient light sensor specific
* reading data and provides conversion and utility code
- */
+ */
void RecvData(CSensrvChannel &aChannel);
-
+
/**
* Second phase constructor
* Initialize the backend resources
*/
void ConstructL();
-
+
public:
/**
* Holds the id of the accelerometer
*/
static char const * const id;
-
+
private:
QAmbientLightReading iReading;
TSensrvAmbientLightData iData;
diff --git a/plugins/sensors/symbian/compasssym.cpp b/plugins/sensors/symbian/compasssym.cpp
index 0c4a8909ca..2adf5317ba 100644
--- a/plugins/sensors/symbian/compasssym.cpp
+++ b/plugins/sensors/symbian/compasssym.cpp
@@ -56,7 +56,7 @@ CCompassSym* CCompassSym::NewL(QSensor *sensor)
CleanupStack::PushL(self);
self->ConstructL();
CleanupStack::Pop();
- return self;
+ return self;
}
/**
@@ -80,7 +80,7 @@ CCompassSym::CCompassSym(QSensor *sensor):CSensorBackendSym(sensor)
/**
* start() overrides CSensorBackendSym::start()
- * This is to allow starting magnetometer before stopping the compass
+ * This is to allow starting magnetometer before stopping the compass
*/
void CCompassSym::start()
{
@@ -92,7 +92,7 @@ void CCompassSym::start()
/**
* stop() overrides CSensorBackendSym::stop()
- * This is to allow stopping magnetometer before stopping the compass
+ * This is to allow stopping magnetometer before stopping the compass
*/
void CCompassSym::stop()
{
@@ -106,7 +106,7 @@ void CCompassSym::stop()
* RecvData is used to retrieve the sensor reading from sensor server
* It is implemented here to handle compass sensor specific
* reading data and provides conversion and utility code
- */
+ */
void CCompassSym::RecvData(CSensrvChannel &aChannel)
{
TPckg<TSensrvMagneticNorthData> proxpkg( iData );
@@ -117,7 +117,7 @@ void CCompassSym::RecvData(CSensrvChannel &aChannel)
return;
}
// Get a lock on the reading data
- iBackendData.iReadingLock.Wait();
+ iBackendData.iReadingLock.Wait();
iReading.setAzimuth(iData.iAngleFromMagneticNorth);
// Retrieve and set the calibration level
iReading.setCalibrationLevel(iMagnetometer->GetCalibrationLevel());
diff --git a/plugins/sensors/symbian/compasssym.h b/plugins/sensors/symbian/compasssym.h
index a17b2c9c6b..167f6ce867 100644
--- a/plugins/sensors/symbian/compasssym.h
+++ b/plugins/sensors/symbian/compasssym.h
@@ -66,7 +66,7 @@ public:
* @return CCompassSym if successful, leaves on failure
*/
static CCompassSym* NewL(QSensor *sensor);
-
+
/**
* Destructor
* Closes the backend resources
@@ -75,42 +75,42 @@ public:
/**
* start() overrides CSensorBackendSym::start()
- * This is to allow starting magnetometer before stopping the compass
+ * This is to allow starting magnetometer before stopping the compass
*/
void start();
-
+
/**
* stop() overrides CSensorBackendSym::stop()
- * This is to allow stopping magnetometer before stopping the compass
+ * This is to allow stopping magnetometer before stopping the compass
*/
void stop();
-
+
private:
/**
* Default constructor
*/
CCompassSym(QSensor *sensor);
-
+
/*
* RecvData is used to retrieve the sensor reading from sensor server
* It is implemented here to handle compass sensor specific
* reading data and provides conversion and utility code
- */
+ */
void RecvData(CSensrvChannel &aChannel);
-
+
/**
* Second phase constructor
* Initialize the backend resources
*/
void ConstructL();
-
+
public:
/**
* Holds the id of the compass
*/
static char const * const id;
-
-private:
+
+private:
QCompassReading iReading;
TSensrvMagneticNorthData iData;
CMagnetometerSensorSym *iMagnetometer;
diff --git a/plugins/sensors/symbian/magnetometersensorsym.cpp b/plugins/sensors/symbian/magnetometersensorsym.cpp
index 83869bc964..fbc7223110 100644
--- a/plugins/sensors/symbian/magnetometersensorsym.cpp
+++ b/plugins/sensors/symbian/magnetometersensorsym.cpp
@@ -59,7 +59,7 @@ CMagnetometerSensorSym* CMagnetometerSensorSym::NewL(QSensor *sensor)
CleanupStack::PushL(self);
self->ConstructL();
CleanupStack::Pop();
- return self;
+ return self;
}
/**
@@ -83,7 +83,7 @@ CMagnetometerSensorSym::CMagnetometerSensorSym(QSensor *sensor):CSensorBackendSy
{
setReading<QMagnetometerReading>(&iReading);
}
- iBackendData.iSensorType = KSensrvChannelTypeIdMagnetometerXYZAxisData;
+ iBackendData.iSensorType = KSensrvChannelTypeIdMagnetometerXYZAxisData;
//Enable Property listening, required to get Calibration level
SetListening(ETrue, ETrue);
}
@@ -118,8 +118,8 @@ void CMagnetometerSensorSym::start()
}
// Call backend start
CSensorBackendSym::start();
-
-
+
+
TSensrvProperty dataFormatProperty;
TRAP(err, iBackendData.iSensorChannel->GetPropertyL(KSensrvPropIdChannelDataFormat, ESensrvSingleProperty, dataFormatProperty));
if(err == KErrNone)
@@ -129,7 +129,7 @@ void CMagnetometerSensorSym::start()
if(dataFormat == ESensrvChannelDataFormatScaled)
{
TSensrvProperty scaleRangeProperty;
- TRAP(err, iBackendData.iSensorChannel->GetPropertyL(KSensrvPropIdScaledRange, KSensrvItemIndexNone, scaleRangeProperty));
+ TRAP(err, iBackendData.iSensorChannel->GetPropertyL(KSensrvPropIdScaledRange, KSensrvItemIndexNone, scaleRangeProperty));
if(err == KErrNone)
{
if(scaleRangeProperty.GetArrayIndex() == ESensrvSingleProperty)
@@ -149,12 +149,12 @@ void CMagnetometerSensorSym::start()
{
TInt index;
if(scaleRangeProperty.PropertyType() == ESensrvIntProperty)
- {
+ {
scaleRangeProperty.GetValue(index);
}
else if(scaleRangeProperty.PropertyType() == ESensrvRealProperty)
{
- TReal realIndex;
+ TReal realIndex;
scaleRangeProperty.GetValue(realIndex);
index = realIndex;
}
@@ -182,7 +182,7 @@ void CMagnetometerSensorSym::start()
* RecvData is used to retrieve the sensor reading from sensor server
* It is implemented here to handle magnetometer sensor specific
* reading data and provides conversion and utility code
- */
+ */
void CMagnetometerSensorSym::RecvData(CSensrvChannel &aChannel)
{
TPckg<TSensrvMagnetometerAxisData> magnetometerpkg( iData );
@@ -192,7 +192,7 @@ void CMagnetometerSensorSym::RecvData(CSensrvChannel &aChannel)
// If there is no reading available, return without setting
return;
}
-
+
TReal x, y, z;
// If Geo values are requested set it
if(iReturnGeoValues)
@@ -207,20 +207,20 @@ void CMagnetometerSensorSym::RecvData(CSensrvChannel &aChannel)
x = iData.iAxisXRaw;
y = iData.iAxisYRaw;
z = iData.iAxisZRaw;
- }
+ }
// Scale adjustments
if(iScaleRange)
- {
- qoutputrangelist rangeList = sensor()->outputRanges();
+ {
+ qoutputrangelist rangeList = sensor()->outputRanges();
int outputRange = sensor()->outputRange();
if (outputRange == -1)
outputRange = 0;
- TReal maxValue = rangeList[outputRange].maximum;
- x = (x/iScaleRange) * maxValue;
- y = (y/iScaleRange) * maxValue;
- z = (z/iScaleRange) * maxValue;
- }
- // Get a lock on the reading data
+ TReal maxValue = rangeList[outputRange].maximum;
+ x = (x/iScaleRange) * maxValue;
+ y = (y/iScaleRange) * maxValue;
+ z = (z/iScaleRange) * maxValue;
+ }
+ // Get a lock on the reading data
iBackendData.iReadingLock.Wait();
iReading.setX(x);
iReading.setY(y);
@@ -268,6 +268,6 @@ qreal CMagnetometerSensorSym::GetCalibrationLevel()
void CMagnetometerSensorSym::ConstructL()
{
InitializeL();
-
+
}
diff --git a/plugins/sensors/symbian/magnetometersensorsym.h b/plugins/sensors/symbian/magnetometersensorsym.h
index 9d728af7f6..454fcbded0 100644
--- a/plugins/sensors/symbian/magnetometersensorsym.h
+++ b/plugins/sensors/symbian/magnetometersensorsym.h
@@ -63,57 +63,57 @@ public:
* @return CMagnetometerSensorSym if successful, leaves on failure
*/
static CMagnetometerSensorSym* NewL(QSensor *sensor);
-
+
/**
* Destructor
* Closes the backend resources
*/
~CMagnetometerSensorSym();
-
+
/*
* Used to retrieve the current calibration level
* iCalibrationLevel is automatically updated whenever there is a change
* in calibration level
*/
qreal GetCalibrationLevel();
-
+
/**
* start is overridden to allow retrieving initial calibration property before
* and to set the required value type flags
*/
void start();
-
+
private:
/**
* Default constructor
*/
CMagnetometerSensorSym(QSensor *sensor);
-
+
/*
* RecvData is used to retrieve the sensor reading from sensor server
* It is implemented here to handle magnetometer sensor specific
* reading data and provides conversion and utility code
- */
+ */
void RecvData(CSensrvChannel &aChannel);
-
+
/**
* HandlePropertyChange is called from backend, to indicate a change in property
*/
void HandlePropertyChange(CSensrvChannel &aChannel, const TSensrvProperty &aChangedProperty);
-
+
/**
* Second phase constructor
* Initialize the backend resources
*/
- void ConstructL();
-
+ void ConstructL();
+
public:
/**
* Holds the id of the magnetometer
*/
static char const * const id;
-
-private:
+
+private:
QMagnetometerReading iReading;
TSensrvMagnetometerAxisData iData;
qreal iCalibrationLevel;
diff --git a/plugins/sensors/symbian/orientationsym.cpp b/plugins/sensors/symbian/orientationsym.cpp
index 4e74fed185..4d1d1c3cab 100644
--- a/plugins/sensors/symbian/orientationsym.cpp
+++ b/plugins/sensors/symbian/orientationsym.cpp
@@ -57,7 +57,7 @@ COrientationSensorSym* COrientationSensorSym::NewL(QSensor *sensor)
CleanupStack::PushL(self);
self->ConstructL();
CleanupStack::Pop();
- return self;
+ return self;
}
/**
@@ -75,7 +75,7 @@ COrientationSensorSym::~COrientationSensorSym()
*/
COrientationSensorSym::COrientationSensorSym(QSensor *sensor):CSensorBackendSym(sensor)
{
- setReading<QOrientationReading>(&iReading);
+ setReading<QOrientationReading>(&iReading);
iBackendData.iSensorType = KSensrvChannelTypeIdOrientationData;
}
@@ -83,7 +83,7 @@ COrientationSensorSym::COrientationSensorSym(QSensor *sensor):CSensorBackendSym(
* RecvData is used to retrieve the sensor reading from sensor server
* It is implemented here to handle orientation sensor specific
* reading data and provides conversion and utility code
- */
+ */
void COrientationSensorSym::RecvData(CSensrvChannel &aChannel)
{
TPckg<TSensrvOrientationData> orientationpkg( iData );
@@ -94,14 +94,14 @@ void COrientationSensorSym::RecvData(CSensrvChannel &aChannel)
return;
}
// Get a lock on the reading data
- iBackendData.iReadingLock.Wait();
+ iBackendData.iReadingLock.Wait();
//Mapping device orientation enum values to Qt Orientation enum values
switch (iData.iDeviceOrientation)
{
- // Indicates Display facing down
+ // Indicates Display facing down
case TSensrvOrientationData::EOrientationDisplayDown:
- {
- iReading.setOrientation(QOrientationReading::TopDown);
+ {
+ iReading.setOrientation(QOrientationReading::TopDown);
}
break;
@@ -146,7 +146,7 @@ void COrientationSensorSym::RecvData(CSensrvChannel &aChannel)
iReading.setOrientation(QOrientationReading::Undefined);
}
}
-
+
iReading.setTimestamp(iData.iTimeStamp.Int64());
// Release the lock
iBackendData.iReadingLock.Signal();
diff --git a/plugins/sensors/symbian/orientationsym.h b/plugins/sensors/symbian/orientationsym.h
index 50cbb958db..67b54b6d7b 100644
--- a/plugins/sensors/symbian/orientationsym.h
+++ b/plugins/sensors/symbian/orientationsym.h
@@ -63,39 +63,39 @@ public:
* @return COrientationSensorSym if successful, leaves on failure
*/
static COrientationSensorSym* NewL(QSensor *sensor);
-
+
/**
* Destructor
* Closes the backend resources
*/
~COrientationSensorSym();
-
+
private:
/**
* Default constructor
*/
COrientationSensorSym(QSensor *sensor);
-
+
/*
* RecvData is used to retrieve the sensor reading from sensor server
* It is implemented here to handle orientation sensor specific
* reading data and provides conversion and utility code
- */
+ */
void RecvData(CSensrvChannel &aChannel);
-
+
/**
* Second phase constructor
* Initialize the backend resources
*/
void ConstructL();
-
+
public:
/**
* Holds the id of the orientation sensor
*/
static char const * const id;
-
-private:
+
+private:
QOrientationReading iReading;
TSensrvOrientationData iData;
};
diff --git a/plugins/sensors/symbian/proximitysensorsym.cpp b/plugins/sensors/symbian/proximitysensorsym.cpp
index e4d3eb210b..01299235e8 100644
--- a/plugins/sensors/symbian/proximitysensorsym.cpp
+++ b/plugins/sensors/symbian/proximitysensorsym.cpp
@@ -57,7 +57,7 @@ CProximitySensorSym* CProximitySensorSym::NewL(QSensor *sensor)
CleanupStack::PushL(self);
self->ConstructL();
CleanupStack::Pop();
- return self;
+ return self;
}
/**
@@ -75,7 +75,7 @@ CProximitySensorSym::~CProximitySensorSym()
*/
CProximitySensorSym::CProximitySensorSym(QSensor *sensor):CSensorBackendSym(sensor)
{
- setReading<QProximityReading>(&iReading);
+ setReading<QProximityReading>(&iReading);
iBackendData.iSensorType = KSensrvChannelTypeIdProximityMonitor;
}
@@ -83,7 +83,7 @@ CProximitySensorSym::CProximitySensorSym(QSensor *sensor):CSensorBackendSym(sens
* RecvData is used to retrieve the sensor reading from sensor server
* It is implemented here to handle proximity sensor specific
* reading data and provides conversion and utility code
- */
+ */
void CProximitySensorSym::RecvData(CSensrvChannel &aChannel)
{
TPckg<TSensrvProximityData> proxpkg( iData );
@@ -94,7 +94,7 @@ void CProximitySensorSym::RecvData(CSensrvChannel &aChannel)
return;
}
// Get a lock on the reading data
- iBackendData.iReadingLock.Wait();
+ iBackendData.iReadingLock.Wait();
iReading.setClose(iData.iProximityState == TSensrvProximityData::EProximityDiscernible);
// Set the timestamp
iReading.setTimestamp(iData.iTimeStamp.Int64());
diff --git a/plugins/sensors/symbian/proximitysensorsym.h b/plugins/sensors/symbian/proximitysensorsym.h
index f7580cc414..9deef2cf22 100644
--- a/plugins/sensors/symbian/proximitysensorsym.h
+++ b/plugins/sensors/symbian/proximitysensorsym.h
@@ -69,33 +69,33 @@ public:
* Closes the backend resources
*/
~CProximitySensorSym();
-
+
private:
/**
* Default constructor
*/
CProximitySensorSym(QSensor *sensor);
-
+
/*
* RecvData is used to retrieve the sensor reading from sensor server
* It is implemented here to handle proximity sensor specific
* reading data and provides conversion and utility code
- */
+ */
void RecvData(CSensrvChannel &aChannel);
-
+
/**
* Second phase constructor
* Initialize the backend resources
*/
void ConstructL();
-
+
public:
/**
* Holds the id of the proximity sensor
*/
static char const * const id;
-
-private:
+
+private:
QProximityReading iReading;
TSensrvProximityData iData;
};
diff --git a/plugins/sensors/symbian/rotationsensorsym.cpp b/plugins/sensors/symbian/rotationsensorsym.cpp
index 305e153e8d..027d2a9b0e 100644
--- a/plugins/sensors/symbian/rotationsensorsym.cpp
+++ b/plugins/sensors/symbian/rotationsensorsym.cpp
@@ -80,7 +80,7 @@ CRotationSensorSym::~CRotationSensorSym()
*/
CRotationSensorSym::CRotationSensorSym(QSensor *sensor):CSensorBackendSym(sensor)
{
- setReading<QRotationReading>(&iReading);
+ setReading<QRotationReading>(&iReading);
iBackendData.iSensorType = KSensrvChannelTypeIdRotationData;
}
@@ -88,7 +88,7 @@ CRotationSensorSym::CRotationSensorSym(QSensor *sensor):CSensorBackendSym(sensor
* RecvData is used to retrieve the sensor reading from sensor server
* It is implemented here to handle rotation sensor specific
* reading data and provides conversion and utility code
- */
+ */
void CRotationSensorSym::RecvData(CSensrvChannel &aChannel)
{
TPckg<TSensrvRotationData> rotationpkg( iData );
@@ -101,7 +101,7 @@ void CRotationSensorSym::RecvData(CSensrvChannel &aChannel)
// Get a lock on the reading data
iBackendData.iReadingLock.Wait();
// To Do verify with ds and ramsay
-
+
// For x axis symbian provides reading from 0 to 359 range
// This logic maps value to Qt range -90 to 90
if(iData.iDeviceRotationAboutXAxis >= 0 && iData.iDeviceRotationAboutXAxis <= 180)
@@ -116,7 +116,7 @@ void CRotationSensorSym::RecvData(CSensrvChannel &aChannel)
{
iReading.setX(iData.iDeviceRotationAboutXAxis - 270);
}
-
+
// For y axis symbian provides reading from 0 to 359 range
// This logic maps value to Qt range -180 to 180
if(iData.iDeviceRotationAboutYAxis >= 0 && iData.iDeviceRotationAboutYAxis <= 180)
@@ -127,7 +127,7 @@ void CRotationSensorSym::RecvData(CSensrvChannel &aChannel)
{
iReading.setY(iData.iDeviceRotationAboutYAxis - 360);
}
-
+
if(iData.iDeviceRotationAboutZAxis == TSensrvRotationData::KSensrvRotationUndefined)
{
sensor()->setProperty("hasZ", QVariant(FALSE));
@@ -153,7 +153,7 @@ void CRotationSensorSym::RecvData(CSensrvChannel &aChannel)
}
/**
- * Overriding this method in rotation sensor to hard code value of
+ * Overriding this method in rotation sensor to hard code value of
* mesurement range from -180 to 180 as Qt wants
* Symbian provides measurement range from 0 to 359
*/
@@ -179,6 +179,6 @@ void CRotationSensorSym::GetMeasurementrangeAndAccuracy()
void CRotationSensorSym::ConstructL()
{
//Initialize the backend resources
- InitializeL();
+ InitializeL();
}
diff --git a/plugins/sensors/symbian/rotationsensorsym.h b/plugins/sensors/symbian/rotationsensorsym.h
index 519e754ba1..cacb3f8771 100644
--- a/plugins/sensors/symbian/rotationsensorsym.h
+++ b/plugins/sensors/symbian/rotationsensorsym.h
@@ -63,24 +63,24 @@ public:
* @return CRotationSensorSym if successful, leaves on failure
*/
static CRotationSensorSym* NewL(QSensor *sensor);
-
+
/**
* Destructor
* Closes the backend resources
*/
~CRotationSensorSym();
-
+
private:
/**
* Default constructor
*/
CRotationSensorSym(QSensor *sensor);
-
+
/*
* RecvData is used to retrieve the sensor reading from sensor server
* It is implemented here to handle rotation sensor specific
* reading data and provides conversion and utility code
- */
+ */
void RecvData(CSensrvChannel &aChannel);
/**
@@ -88,21 +88,21 @@ private:
* Initialize the backend resources
*/
void ConstructL();
-
+
/**
- * Overriding this method in rotation sensor to hard code value of
+ * Overriding this method in rotation sensor to hard code value of
* mesurement range from -180 to 180 as Qt want
* Symbian provides measurement range from 0 to 359
*/
void GetMeasurementrangeAndAccuracy();
-
+
public:
/**
* Holds the id of the proximity sensor
*/
static char const * const id;
-
-private:
+
+private:
QRotationReading iReading;
TSensrvRotationData iData;
};
diff --git a/plugins/sensors/symbian/sensorbackenddatasym.h b/plugins/sensors/symbian/sensorbackenddatasym.h
index 58d1dffe91..0a321bc3d5 100644
--- a/plugins/sensors/symbian/sensorbackenddatasym.h
+++ b/plugins/sensors/symbian/sensorbackenddatasym.h
@@ -49,7 +49,7 @@ QTM_USE_NAMESPACE
class TSensorBackendDataSym
{
public:
- TBool iSensorAvailable;
+ TBool iSensorAvailable;
CSensrvChannel* iSensorChannel;
TSensrvChannelTypeId iSensorType;
TSensrvChannelInfo iChannelInfo;
diff --git a/plugins/sensors/symbian/sensorbackendsym.cpp b/plugins/sensors/symbian/sensorbackendsym.cpp
index 1e1a9ec91e..97959dbb67 100644
--- a/plugins/sensors/symbian/sensorbackendsym.cpp
+++ b/plugins/sensors/symbian/sensorbackendsym.cpp
@@ -64,7 +64,7 @@ void CSensorBackendSym::FindSensorL()
RSensrvChannelInfoList channelList;
TSensrvChannelInfo channelInfo;
channelInfo.iChannelType = iBackendData.iSensorType;
- // Retrieve the list of channels available
+ // Retrieve the list of channels available
finder->FindChannelsL( channelList, channelInfo );
CleanupStack::PopAndDestroy(finder);
// Iterate the channel list and look for required sensor
@@ -97,9 +97,9 @@ void CSensorBackendSym::OpenSensorChannelL()
if( !(iBackendData.iSensorChannel) )
{
// Create and Open the Sensor channel
- iBackendData.iSensorChannel = CSensrvChannel::NewL( iBackendData.iChannelInfo );
+ iBackendData.iSensorChannel = CSensrvChannel::NewL( iBackendData.iChannelInfo );
// Open the channel for sensor
- iBackendData.iSensorChannel->OpenChannelL();
+ iBackendData.iSensorChannel->OpenChannelL();
iBackendData.iReadingLock.CreateLocal();
iBackendData.iSensorAvailable = ETrue;
}
@@ -134,7 +134,7 @@ void CSensorBackendSym::CloseSensorChannelL()
TInt CSensorBackendSym::SetProperty(TSensrvPropertyId aPropertyId, TSensrvPropertyType aPropertyType, TSensrvArrayIndex aArrayIndex, TReal aValue)
{
//Creating property object
- TSensrvProperty prop;
+ TSensrvProperty prop;
//Set property Id
prop.SetPropertyId(aPropertyId);
//Set Index of property
@@ -175,7 +175,7 @@ TInt CSensorBackendSym::SetMeasurementRange()
{
return KErrNone;
}
-
+
TInt err = KErrNone;
TSensrvPropertyType type = propertyType(KSensrvPropIdMeasureRange, err);
if(err != KErrNone)
@@ -184,14 +184,14 @@ TInt CSensorBackendSym::SetMeasurementRange()
}
//If type is integer
if(type == ESensrvRealProperty)
- {
+ {
return SetProperty(KSensrvPropIdMeasureRange, ESensrvRealProperty, ESensrvArrayPropertyInfo, sensor()->outputRange());
}
//If type is real
if(type == ESensrvIntProperty)
{
return SetProperty(KSensrvPropIdMeasureRange, ESensrvIntProperty, ESensrvArrayPropertyInfo, sensor()->outputRange());
- }
+ }
return KErrNone;
}
@@ -281,7 +281,7 @@ void CSensorBackendSym::StartListeningL()
if(iBackendData.iDataListening)
{
SetProperties();
- // Start listening to the sensor
+ // Start listening to the sensor
// Before calling this api the channel should be found and opened
iBackendData.iSensorChannel->StartDataListeningL( this,
KDesiredReadingCount,
@@ -317,7 +317,7 @@ void CSensorBackendSym::StopListeningL()
*/
CSensorBackendSym::CSensorBackendSym(QSensor *sensor):QSensorBackend(sensor)
{
- // By default enabling Data listening
+ // By default enabling Data listening
iBackendData.iDataListening = ETrue;
// By default disabling Property listening
iBackendData.iPropertyListening = EFalse;
@@ -340,9 +340,9 @@ void CSensorBackendSym::GetDescription()
QString str;
TBuf8<KSensrvPropertyTextBufferSize> desc;
for(int i=0; i<list.Count(); i++)
- {
+ {
if(list[i].GetArrayIndex() == ESensrvArrayPropertyInfo)
- {
+ {
continue;
}
list[i].GetValue(desc);
@@ -358,7 +358,7 @@ void CSensorBackendSym::GetDataRate()
TInt err;
TRAP(err, iBackendData.iSensorChannel->GetPropertyL(KSensrvPropIdDataRate, KSensrvItemIndexNone, datarate_prop));
if(err == KErrNone)
- {
+ {
if(datarate_prop.GetArrayIndex() == ESensrvSingleProperty)
{
TReal min, max, value;
@@ -366,23 +366,23 @@ void CSensorBackendSym::GetDataRate()
{
TInt intMin, intMax, intValue;
datarate_prop.GetMinValue(intMin);
- datarate_prop.GetMaxValue(intMax);
+ datarate_prop.GetMaxValue(intMax);
datarate_prop.GetValue(intValue);
min = intMin;
max = intMax;
- value = intValue;
+ value = intValue;
}
else if(datarate_prop.PropertyType() == ESensrvRealProperty)
{
datarate_prop.GetMinValue(min);
- datarate_prop.GetMaxValue(max);
+ datarate_prop.GetMaxValue(max);
datarate_prop.GetValue(value);
}
//Set datarate as range
addDataRate(min, max);
}
//if list has more than one item, data rate will be having descrete values, agreed with DS team
- else if(datarate_prop.GetArrayIndex() == ESensrvArrayPropertyInfo)
+ else if(datarate_prop.GetArrayIndex() == ESensrvArrayPropertyInfo)
{
TReal datarate;
TInt min, max, index;
@@ -390,7 +390,7 @@ void CSensorBackendSym::GetDataRate()
datarate_prop.GetMaxValue(max);
datarate_prop.GetValue(index);
for(int i=min; i<=max; i++)
- {
+ {
TRAP(err, iBackendData.iSensorChannel->GetPropertyL(KSensrvPropIdDataRate, KSensrvItemIndexNone, i, datarate_prop));
if(err == KErrNone)
{
@@ -419,7 +419,7 @@ void CSensorBackendSym::GetMeasurementrangeAndAccuracy()
To solve the QT requirement, the mapping used is as follows
1. If symbian provides only one accuracy, use this with all the measurement ranges
2. If there are n accuracies and n measurement ranges, map linearly (n:n)
- 3. If there are n accuracies and n+x measurement ranges, then the mapping will be
+ 3. If there are n accuracies and n+x measurement ranges, then the mapping will be
n:n for each n measurement ranges and accuracies
KAccuracyInvalid : for each n+x measurement ranges
*/
@@ -428,7 +428,7 @@ void CSensorBackendSym::GetMeasurementrangeAndAccuracy()
TInt err;
TRAP(err, iBackendData.iSensorChannel->GetAllPropertiesL(KSensrvPropIdChannelAccuracy, accuracyList));
if(err == KErrNone)
- {
+ {
// If only one accuracy value present set value to accuracy
if(accuracyList.Count() == 1)
{
@@ -446,16 +446,16 @@ void CSensorBackendSym::GetMeasurementrangeAndAccuracy()
// If more than one accuracy values present set accuracy to invalid
else
{
- accuracy = KAccuracyInvalid;
+ accuracy = KAccuracyInvalid;
}
}
-
+
//Scale
TSensrvProperty scale_prop;
TReal scale=1;
TRAP(err, iBackendData.iSensorChannel->GetPropertyL(KSensrvPropIdChannelScale, KSensrvItemIndexNone, scale_prop));
if(err == KErrNone)
- {
+ {
if(scale_prop.PropertyType() == ESensrvIntProperty)
{
TInt intScale;
@@ -469,10 +469,10 @@ void CSensorBackendSym::GetMeasurementrangeAndAccuracy()
TReal scaleMultiplier;
Math::Pow(scaleMultiplier, 10, scale);
scale = scaleMultiplier;
- }
-
+ }
+
//measurement minimum & maximum
- TSensrvProperty measurerange_prop;
+ TSensrvProperty measurerange_prop;
TRAP(err, iBackendData.iSensorChannel->GetPropertyL(KSensrvPropIdMeasureRange, KSensrvItemIndexNone, measurerange_prop));
if(err == KErrNone)
{
@@ -496,7 +496,7 @@ void CSensorBackendSym::GetMeasurementrangeAndAccuracy()
addOutputRange(measureMin*scale, measureMax*scale, accuracy);
}
//if list has more than one item, data rate will be having descrete values, agreed with DS team
- else if(measurerange_prop.GetArrayIndex() == ESensrvArrayPropertyInfo)
+ else if(measurerange_prop.GetArrayIndex() == ESensrvArrayPropertyInfo)
{
TReal measureMin, measureMax;
TInt min, max, index;
@@ -511,13 +511,13 @@ void CSensorBackendSym::GetMeasurementrangeAndAccuracy()
TReal realMin, realMax, realValue;
measurerange_prop.GetMinValue(realMin);
measurerange_prop.GetMaxValue(realMax);
- measurerange_prop.GetValue(realValue);
+ measurerange_prop.GetValue(realValue);
min = realMin;
max = realMax;
index = realValue;
}
for(int i=min; i<=max; i++)
- {
+ {
TRAP(err, iBackendData.iSensorChannel->GetPropertyL(KSensrvPropIdMeasureRange, KSensrvItemIndexNone, i, measurerange_prop));
if(err == KErrNone)
{
@@ -534,7 +534,7 @@ void CSensorBackendSym::GetMeasurementrangeAndAccuracy()
measurerange_prop.GetMinValue(measureMin);
measurerange_prop.GetMaxValue(measureMax);
}
- // If only one accuracy value is present set same accuracy for all
+ // If only one accuracy value is present set same accuracy for all
if(accuracy != KAccuracyInvalid)
{
addOutputRange(measureMin*scale, measureMax*scale, accuracy);
@@ -549,7 +549,7 @@ void CSensorBackendSym::GetMeasurementrangeAndAccuracy()
}
else
{
- // If less accuracy values are present than measurement ranges then
+ // If less accuracy values are present than measurement ranges then
// set invalid accuracy for rest of measument ranges
addOutputRange(measureMin*scale, measureMax*scale, KAccuracyInvalid);
}
@@ -564,10 +564,10 @@ void CSensorBackendSym::GetPropertiesL()
{
//description
GetDescription();
-
+
//data rate
GetDataRate();
-
+
//accuracy and measurement ranges
GetMeasurementrangeAndAccuracy();
}
@@ -576,14 +576,14 @@ void CSensorBackendSym::GetPropertiesL()
/*
* InitializeL is used to create and init the sensor server objects
- */
+ */
void CSensorBackendSym::InitializeL()
{
// Initialize Symbian Sensor Framework Objects
OpenSensorChannelL();
if(sensor())
{
- GetPropertiesL();
+ GetPropertiesL();
}
}
@@ -612,7 +612,7 @@ void CSensorBackendSym::start()
if( err != KErrNone )
{
sensorStopped();
- sensorError(err);
+ sensorError(err);
}
}
@@ -665,7 +665,7 @@ void CSensorBackendSym::CSensorBackendSym::GetDataListenerInterfaceL (TUid /*aIn
// No implementation required
}
-// From MSensrvProeprtyListener
+// From MSensrvProeprtyListener
/**
* Notification about the changed value of a property.
@@ -674,7 +674,7 @@ void CSensorBackendSym::PropertyChanged(CSensrvChannel &aChannel, const TSensrv
{
TRAP_IGNORE(HandlePropertyChange(aChannel,aChangedProperty))
}
-
+
/**
* Property listening failed.
*/
@@ -686,15 +686,15 @@ void CSensorBackendSym::PropertyError(CSensrvChannel &/*aChannel*/, TSensrvErro
}
sensorError(KErrGeneral);
}
-
+
/**
* Set a listener for the indication, if the setting of the property succeeded.
- */
+ */
void CSensorBackendSym::SetPropertySuccessIndicationChanged(TSetPropertySuccessIndicator /*aIndication*/)
{
// No implementation required
}
-
+
/*
* Returns a pointer to a specified interface extension - to allow future extension of this class without breaking binary compatibility.
*/
diff --git a/plugins/sensors/symbian/sensorbackendsym.h b/plugins/sensors/symbian/sensorbackendsym.h
index 1f4caed326..f74892b754 100644
--- a/plugins/sensors/symbian/sensorbackendsym.h
+++ b/plugins/sensors/symbian/sensorbackendsym.h
@@ -56,7 +56,7 @@
#include <sensrvtypes.h>
#include <sensrvchannelfinder.h>
#include <sensrvdatalistener.h>
-#include <sensrvpropertylistener.h>
+#include <sensrvpropertylistener.h>
// Internal Headers
#include "sensorbackenddatasym.h"
@@ -67,169 +67,169 @@ class CSensorBackendSym : public CBase, public QSensorBackend, public MSensrvDat
{
public:
// From QSensorBackend
-
+
/**
* start is used to start listening to the sensor
*/
virtual void start();
-
+
/*
* stop is used to stop listening to the sensor
*/
virtual void stop();
-
+
/*
* Backend Destructor
*/
~CSensorBackendSym();
// From MSensrvDataListener
-
+
/*
* DataReceived is called by the Sensor Server when ever data is available in the
* sensor buffer
*/
void DataReceived(CSensrvChannel &aChannel, TInt aCount, TInt aDataLost);
-
+
/**
* DataError is called to indicate an error, fatal errors are unrecoverable
*/
void DataError(CSensrvChannel &aChannel, TSensrvErrorSeverity aError);
-
+
/*
* GetDataListenerInterfaceL is used to get a pointer to the sensor server backend
* It is not required for QT Mobility Sensors API
*/
void GetDataListenerInterfaceL(TUid aInterfaceUid, TAny *&aInterface);
-
- // From MSensrvProeprtyListener
-
+
+ // From MSensrvProeprtyListener
+
/**
* Notification about the changed value of a property.
*/
void PropertyChanged (CSensrvChannel &aChannel, const TSensrvProperty &aChangedProperty);
-
+
/**
* Property listening failed.
*/
void PropertyError (CSensrvChannel &aChannel, TSensrvErrorSeverity aError);
-
+
/**
* Set a listener for the indication, if the setting of the property succeeded.
- */
+ */
void SetPropertySuccessIndicationChanged (TSetPropertySuccessIndicator aIndication);
-
+
/*
* Returns a pointer to a specified interface extension - to allow future extension of this class without breaking binary compatibility.
*/
void GetPropertyListenerInterfaceL (TUid aInterfaceUid, TAny *&aInterface);
-
+
/*
* To enable/disable data/property listening
- */
+ */
void SetListening(TBool aDataListening, TBool aPropertyListening);
-
+
protected:
-
+
/*
* Default C++ constructor
*/
CSensorBackendSym(QSensor *sensor);
-
+
/**
* Deriving class implements this if it requires property change notification
*/
virtual void HandlePropertyChange(CSensrvChannel &aChannel, const TSensrvProperty &aChangedProperty);
-
+
/*
* RecvData is used to retrieve the sensor reading from sensor server
* It is implemented the the sensor concrete class and handles sensor specific
* reading data and provides conversion and utility code
*/
virtual void RecvData(CSensrvChannel &aChannel) = 0;
-
+
/*
* InitializeL is used to create and init the sensor server objects
- */
+ */
void InitializeL();
-
+
/*
* SetProperty is used to set property to the channel
- */
+ */
TInt SetProperty(TSensrvPropertyId aPropertyId, TSensrvPropertyType aPropertyType, TSensrvArrayIndex aArrayIndex, TReal aValue);
-
+
/*
* SetMeasurementRange is used to check measurement range type and set the measurement range
*/
TInt SetMeasurementRange();
-
+
/*
* SetDataRate is used to calculate appropriate data rate for given interval and set that interval to the channel
*/
TInt SetDataRate();
-
+
/*
- * SetProperties is used to set properties on the channel before start data listening
+ * SetProperties is used to set properties on the channel before start data listening
*/
void SetProperties();
-
+
/*
* GetPropertiesL used to get the properties from sensor server and sets as metadata for Qt.
*/
void GetPropertiesL();
-
+
/*
* GetDescription used to get description of sensor from symbian and set
* as description in Qt
*/
void GetDescription();
-
+
/*
* GetDataRate used to get available datarates from symbian and set
* as availableDataRates in Qt
*/
void GetDataRate();
-
+
/*
* GetMeasurementrangeAndAccuracy used to get measurement ranges and accuracy from
* symbian and set as outputRanges in Qt
*/
virtual void GetMeasurementrangeAndAccuracy();
-
+
/*
* Close is used to release all the sensor server objects
* May change when error handling is supported by mobility apis
*/
TInt Close();
-
+
/*
* FindSensorL is used to find if a specific sensor is available on the
* device, if FindSensorL leaves then the sensor is not supported
*/
void FindSensorL();
-
+
/*
* OpenSensorChannelL is used to open the channel for sensor as indicated by
* iPrivateData.iChannelInfo
*/
void OpenSensorChannelL();
-
+
/*
* CloseSensorChannel is used to close the sensor channel and release the
* resources
*/
void CloseSensorChannelL();
-
+
/*
* Used to start listening to the sensor
*/
void StartListeningL();
-
+
/*
* Used to stop listening to the sensor
*/
void StopListeningL();
-
+
private:
TSensrvPropertyType propertyType(TSensrvPropertyId, TInt&);
diff --git a/plugins/sensors/symbian/symbian.pro b/plugins/sensors/symbian/symbian.pro
index a446a65f5d..211833d50e 100644
--- a/plugins/sensors/symbian/symbian.pro
+++ b/plugins/sensors/symbian/symbian.pro
@@ -10,28 +10,28 @@ include(version.pri)
include(../../../common.pri)
SOURCES += \
- sensorbackendsym.cpp \
- proximitysensorsym.cpp \
- ambientlightsensorsym.cpp \
- magnetometersensorsym.cpp \
- compasssym.cpp \
- accelerometersym.cpp \
- orientationsym.cpp \
- rotationsensorsym.cpp \
- tapsensorsym.cpp \
- main.cpp
+ sensorbackendsym.cpp \
+ proximitysensorsym.cpp \
+ ambientlightsensorsym.cpp \
+ magnetometersensorsym.cpp \
+ compasssym.cpp \
+ accelerometersym.cpp \
+ orientationsym.cpp \
+ rotationsensorsym.cpp \
+ tapsensorsym.cpp \
+ main.cpp
HEADERS += \
- sensorbackendsym.h \
- sensorbackenddatasym.h \
- proximitysensorsym.h \
- ambientlightsensorsym.h \
- magnetometersensorsym.h \
- compasssym.h \
- accelerometersym.h \
- orientationsym.h \
- rotationsensorsym.h \
- tapsensorsym.h
+ sensorbackendsym.h \
+ sensorbackenddatasym.h \
+ proximitysensorsym.h \
+ ambientlightsensorsym.h \
+ magnetometersensorsym.h \
+ compasssym.h \
+ accelerometersym.h \
+ orientationsym.h \
+ rotationsensorsym.h \
+ tapsensorsym.h
equals(sensors_symbian_light_enabled,yes) {
HEADERS += lightsensorsym.h
diff --git a/plugins/sensors/symbian/tapsensorsym.cpp b/plugins/sensors/symbian/tapsensorsym.cpp
index 51799317c8..e7634aea36 100644
--- a/plugins/sensors/symbian/tapsensorsym.cpp
+++ b/plugins/sensors/symbian/tapsensorsym.cpp
@@ -55,7 +55,7 @@ CTapSensorSym* CTapSensorSym::NewL(QSensor *sensor)
CleanupStack::PushL(self);
self->ConstructL();
CleanupStack::Pop();
- return self;
+ return self;
}
/**
@@ -72,94 +72,95 @@ CTapSensorSym::~CTapSensorSym()
*/
CTapSensorSym::CTapSensorSym(QSensor *sensor):CSensorBackendSym(sensor)
{
- setReading<QTapReading>(&iReading);
+ setReading<QTapReading>(&iReading);
iBackendData.iSensorType = KSensrvChannelTypeIdAccelerometerDoubleTappingData;
}
/*
* RecvData is used to retrieve the sensor reading from sensor server
* It is implemented here to handle tap sensor specific
* reading data and provides conversion and utility code
- */
+ */
void CTapSensorSym::RecvData(CSensrvChannel &aChannel)
{
TPckg<TSensrvTappingData> tappkg( iData );
TInt ret = aChannel.GetData( tappkg );
if(KErrNone != ret)
{
- // If there is no reading available, return without setting
+ // If there is no reading available, return without setting
return;
}
- // Get a lock on the reading data
+ // Get a lock on the reading data
iBackendData.iReadingLock.Wait();
- //Mapping device tap sensor enum values to Qt tap sensor enum values
+ //Mapping device tap sensor enum values to Qt tap sensor enum values
switch (iData.iDirection)
{
- // Indicates a tap on positive X axis
+ // Indicates a tap on positive X axis
case KSensrvAccelerometerDirectionXplus:
{
iReading.setTapDirection(QTapReading::X_Pos);
}
break;
- // Indicates a tap on negative X axis
+ // Indicates a tap on negative X axis
case KSensrvAccelerometerDirectionXminus:
{
iReading.setTapDirection(QTapReading::X_Neg);
}
break;
- // Indicates a tap on positive Y axis
+ // Indicates a tap on positive Y axis
case KSensrvAccelerometerDirectionYplus:
{
iReading.setTapDirection(QTapReading::Y_Pos);
}
break;
- // Indicates a tap on negative Y axis
+ // Indicates a tap on negative Y axis
case KSensrvAccelerometerDirectionYminus:
{
iReading.setTapDirection(QTapReading::Y_Neg);
}
- break;
- // Indicates a tap on positive Z axis
+ break;
+ // Indicates a tap on positive Z axis
case KSensrvAccelerometerDirectionZplus:
{
iReading.setTapDirection(QTapReading::Z_Pos);
}
break;
- // Indicates a tap on negative Z axis
+ // Indicates a tap on negative Z axis
case KSensrvAccelerometerDirectionZminus:
{
iReading.setTapDirection(QTapReading::Z_Neg);
}
- break;
+ break;
default:
{
- // Indicates a tap on X axis
+ // Indicates a tap on X axis
if(iData.iDirection==(KSensrvAccelerometerDirectionXplus|KSensrvAccelerometerDirectionXminus))
{
iReading.setTapDirection(QTapReading::X_Both);
}
- // Indicates a tap on Y axis
+ // Indicates a tap on Y axis
else if(iData.iDirection==(KSensrvAccelerometerDirectionYplus|KSensrvAccelerometerDirectionYminus))
{
iReading.setTapDirection(QTapReading::Y_Both);
}
- // Indicates a tap on Z axis
+ // Indicates a tap on Z axis
else if(iData.iDirection==(KSensrvAccelerometerDirectionZplus|KSensrvAccelerometerDirectionZminus))
{
iReading.setTapDirection(QTapReading::Z_Both);
}
- // Undefined value
+ // Undefined value
else
{
iReading.setTapDirection(QTapReading::Undefined);
}
- }
+ }
}
- //Set the type of tap to be double tap
+ //Set the type of tap to be double tap
iReading.setDoubleTap(true);
- iReading.setTimestamp(iData.iTimeStamp.Int64());
- // Release the lock
+ iReading.setTimestamp(iData.iTimeStamp.Int64());
+ // Release the lock
iBackendData.iReadingLock.Signal();
}
+
/**
* Second phase constructor
* Initialize the backend resources
diff --git a/plugins/sensors/symbian/tapsensorsym.h b/plugins/sensors/symbian/tapsensorsym.h
index b0642ac79b..50f39c720c 100644
--- a/plugins/sensors/symbian/tapsensorsym.h
+++ b/plugins/sensors/symbian/tapsensorsym.h
@@ -68,9 +68,9 @@ public:
* Closes the backend resources
*/
~CTapSensorSym();
-
+
private:
- /**
+ /**
* Default constructor
*/
CTapSensorSym(QSensor *sensor);
@@ -78,20 +78,20 @@ private:
* RecvData is used to retrieve the sensor reading from sensor server
* It is implemented here to handle tap sensor specific
* reading data and provides conversion and utility code
- */
+ */
void RecvData(CSensrvChannel &aChannel);
/**
* Second phase constructor
* Initialize the backend resources
*/
void ConstructL();
-
+
public:
/**
* Holds the id of the magnetometer
- */
+ */
static char const * const id;
-
+
private:
QTapReading iReading;
TSensrvTappingData iData;