stefan pushed a commit to branch master.
commit 9d47faa761f4dfad1848e49523515d06df094267
Author: Stefan Schmidt <[email protected]>
Date: Tue Apr 2 15:59:51 2013 +0100
eeze/sensor: Add more sensor types used in Tizen.
Just setting up the sensor types in the lib and fake module.
---
src/lib/eeze/Eeze_Sensor.h | 16 ++++++++++++++++
src/lib/eeze/eeze_sensor.c | 24 ++++++++++++++++++++++++
src/modules/eeze/sensor/fake/fake.c | 12 ++++++++++++
3 files changed, 52 insertions(+)
diff --git a/src/lib/eeze/Eeze_Sensor.h b/src/lib/eeze/Eeze_Sensor.h
index 02a51fe..8402604 100644
--- a/src/lib/eeze/Eeze_Sensor.h
+++ b/src/lib/eeze/Eeze_Sensor.h
@@ -65,6 +65,9 @@
typedef enum
{
EEZE_SENSOR_TYPE_ACCELEROMETER, /**< Accelerometer sensor */
+ EEZE_SENSOR_TYPE_GRAVITY, /**< Gravity sensor */
+ EEZE_SENSOR_TYPE_LINEAR_ACCELERATION, /**< */
+ EEZE_SENSOR_TYPE_DEVICE_ORIENTATION, /**< */
EEZE_SENSOR_TYPE_MAGNETIC, /**< Magnetic sensor */
EEZE_SENSOR_TYPE_ORIENTATION, /**< Orientation sensor */
EEZE_SENSOR_TYPE_GYROSCOPE, /**< Gyroscope sensor */
@@ -74,7 +77,12 @@ typedef enum
EEZE_SENSOR_TYPE_MOTION_SHAKE, /**< Shake motion sensor */
EEZE_SENSOR_TYPE_MOTION_DOUBLETAP, /**< Doubletap motion sensor */
EEZE_SENSOR_TYPE_MOTION_PANNING, /**< Panning motion sensor */
+ EEZE_SENSOR_TYPE_MOTION_PANNING_BROWSE, /**< */
+ EEZE_SENSOR_TYPE_MOTION_TILT, /**< */
EEZE_SENSOR_TYPE_MOTION_FACEDOWN, /**< Facedown motion sensor */
+ EEZE_SENSOR_TYPE_MOTION_DIRECT_CALL, /**< */
+ EEZE_SENSOR_TYPE_MOTION_SMART_ALERT, /**< */
+ EEZE_SENSOR_TYPE_MOTION_NO_MOVE, /**< */
/* Non-Tizen from here */
EEZE_SENSOR_TYPE_BAROMETER, /**< Barometer sensor */
EEZE_SENSOR_TYPE_TEMPERATURE, /**< Temperature sensor */
@@ -96,6 +104,9 @@ typedef enum
* @{
*/
EAPI int EEZE_SENSOR_EVENT_ACCELEROMETER;
+EAPI int EEZE_SENSOR_EVENT_GRAVITY;
+EAPI int EEZE_SENSOR_EVENT_LINEAR_ACCELERATION;
+EAPI int EEZE_SENSOR_EVENT_DEVICE_ORIENTATION;
EAPI int EEZE_SENSOR_EVENT_MAGNETIC;
EAPI int EEZE_SENSOR_EVENT_ORIENTATION;
EAPI int EEZE_SENSOR_EVENT_GYROSCOPE;
@@ -105,7 +116,12 @@ EAPI int EEZE_SENSOR_EVENT_SNAP;
EAPI int EEZE_SENSOR_EVENT_SHAKE;
EAPI int EEZE_SENSOR_EVENT_DOUBLETAP;
EAPI int EEZE_SENSOR_EVENT_PANNING;
+EAPI int EEZE_SENSOR_EVENT_PANNING_BROWSE;
+EAPI int EEZE_SENSOR_EVENT_TILT;
EAPI int EEZE_SENSOR_EVENT_FACEDOWN;
+EAPI int EEZE_SENSOR_EVENT_DIRECT_CALL;
+EAPI int EEZE_SENSOR_EVENT_SMART_ALERT;
+EAPI int EEZE_SENSOR_EVENT_NO_MOVE;
EAPI int EEZE_SENSOR_EVENT_BAROMETER;
EAPI int EEZE_SENSOR_EVENT_TEMPERATURE;
/**@}*/
diff --git a/src/lib/eeze/eeze_sensor.c b/src/lib/eeze/eeze_sensor.c
index 8df3187..107221d 100644
--- a/src/lib/eeze/eeze_sensor.c
+++ b/src/lib/eeze/eeze_sensor.c
@@ -336,6 +336,15 @@ eeze_sensor_init(void)
if (EEZE_SENSOR_EVENT_ACCELEROMETER == 0)
EEZE_SENSOR_EVENT_ACCELEROMETER = ecore_event_type_new();
+ if (EEZE_SENSOR_EVENT_GRAVITY == 0)
+ EEZE_SENSOR_EVENT_GRAVITY = ecore_event_type_new();
+
+ if (EEZE_SENSOR_EVENT_LINEAR_ACCELERATION == 0)
+ EEZE_SENSOR_EVENT_LINEAR_ACCELERATION = ecore_event_type_new();
+
+ if (EEZE_SENSOR_EVENT_DEVICE_ORIENTATION == 0)
+ EEZE_SENSOR_EVENT_DEVICE_ORIENTATION = ecore_event_type_new();
+
if (EEZE_SENSOR_EVENT_MAGNETIC == 0)
EEZE_SENSOR_EVENT_MAGNETIC = ecore_event_type_new();
@@ -363,9 +372,24 @@ eeze_sensor_init(void)
if (EEZE_SENSOR_EVENT_PANNING == 0)
EEZE_SENSOR_EVENT_PANNING = ecore_event_type_new();
+ if (EEZE_SENSOR_EVENT_PANNING_BROWSE == 0)
+ EEZE_SENSOR_EVENT_PANNING_BROWSE = ecore_event_type_new();
+
+ if (EEZE_SENSOR_EVENT_TILT == 0)
+ EEZE_SENSOR_EVENT_TILT = ecore_event_type_new();
+
if (EEZE_SENSOR_EVENT_FACEDOWN == 0)
EEZE_SENSOR_EVENT_FACEDOWN = ecore_event_type_new();
+ if (EEZE_SENSOR_EVENT_DIRECT_CALL == 0)
+ EEZE_SENSOR_EVENT_DIRECT_CALL = ecore_event_type_new();
+
+ if (EEZE_SENSOR_EVENT_SMART_ALERT == 0)
+ EEZE_SENSOR_EVENT_SMART_ALERT = ecore_event_type_new();
+
+ if (EEZE_SENSOR_EVENT_NO_MOVE == 0)
+ EEZE_SENSOR_EVENT_NO_MOVE = ecore_event_type_new();
+
if (EEZE_SENSOR_EVENT_BAROMETER == 0)
EEZE_SENSOR_EVENT_BAROMETER = ecore_event_type_new();
diff --git a/src/modules/eeze/sensor/fake/fake.c
b/src/modules/eeze/sensor/fake/fake.c
index b8ccc2f..231f367 100644
--- a/src/modules/eeze/sensor/fake/fake.c
+++ b/src/modules/eeze/sensor/fake/fake.c
@@ -67,6 +67,9 @@ fake_read(Eeze_Sensor_Type sensor_type, Eeze_Sensor_Obj *lobj)
switch (sensor_type)
{
case EEZE_SENSOR_TYPE_ACCELEROMETER:
+ case EEZE_SENSOR_TYPE_GRAVITY:
+ case EEZE_SENSOR_TYPE_LINEAR_ACCELERATION:
+ case EEZE_SENSOR_TYPE_DEVICE_ORIENTATION:
case EEZE_SENSOR_TYPE_MAGNETIC:
case EEZE_SENSOR_TYPE_ORIENTATION:
case EEZE_SENSOR_TYPE_GYROSCOPE:
@@ -127,6 +130,15 @@ fake_async_read(Eeze_Sensor_Type sensor_type, void
*user_data EINA_UNUSED)
case EEZE_SENSOR_TYPE_ACCELEROMETER:
ecore_event_add(EEZE_SENSOR_EVENT_ACCELEROMETER, obj, NULL, NULL);
break;
+ case EEZE_SENSOR_TYPE_GRAVITY:
+ ecore_event_add(EEZE_SENSOR_EVENT_GRAVITY, obj, NULL, NULL);
+ break;
+ case EEZE_SENSOR_TYPE_LINEAR_ACCELERATION:
+ ecore_event_add(EEZE_SENSOR_EVENT_LINEAR_ACCELERATION, obj, NULL,
NULL);
+ break;
+ case EEZE_SENSOR_TYPE_DEVICE_ORIENTATION:
+ ecore_event_add(EEZE_SENSOR_EVENT_DEVICE_ORIENTATION, obj, NULL, NULL);
+ break;
case EEZE_SENSOR_TYPE_MAGNETIC:
ecore_event_add(EEZE_SENSOR_EVENT_MAGNETIC, obj, NULL, NULL);
break;
--
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html