sensord: add/change enums and types for avoiding build-break 42/33242/1
authorKibak Yoon <kibak.yoon@samsung.com>
Wed, 7 Jan 2015 06:24:37 +0000 (15:24 +0900)
committerKibak Yoon <kibak.yoon@samsung.com>
Wed, 7 Jan 2015 06:24:37 +0000 (15:24 +0900)
this patch would be reverted. However enumerations and types are added
for avoiding build-break until sensor capi is replaced by Tizen 2.3 API.
all packages which use tizen 2.2.1 api doesn't have a problem about
building, but some APIs don't work from now.

Change-Id: I8511158d977304b738fb33c9842a749e0f3519d1
Signed-off-by: Kibak Yoon <kibak.yoon@samsung.com>
46 files changed:
src/accel/accel_sensor.cpp
src/accel/accel_sensor.h
src/accel/accel_sensor_hal.cpp
src/accel/accel_sensor_hal.h
src/geo/geo_sensor.cpp
src/geo/geo_sensor.h
src/geo/geo_sensor_hal.cpp
src/geo/geo_sensor_hal.h
src/gravity/gravity_sensor.cpp
src/gravity/gravity_sensor.h
src/gyro/gyro_sensor.cpp
src/gyro/gyro_sensor.h
src/gyro/gyro_sensor_hal.cpp
src/gyro/gyro_sensor_hal.h
src/libsensord/CMakeLists.txt
src/libsensord/client.cpp
src/libsensord/sensor_deprecated.h [new file with mode: 0644]
src/libsensord/sensor_internal_deprecated.h
src/libsensord/sensor_motion.h
src/light/light_sensor.cpp
src/light/light_sensor.h
src/light/light_sensor_hal.cpp
src/light/light_sensor_hal.h
src/linear_accel/linear_accel_sensor.cpp
src/linear_accel/linear_accel_sensor.h
src/orientation/orientation_sensor.cpp
src/orientation/orientation_sensor.h
src/pressure/pressure_sensor.cpp
src/pressure/pressure_sensor.h
src/pressure/pressure_sensor_hal.cpp
src/pressure/pressure_sensor_hal.h
src/proxi/proxi_sensor.cpp
src/proxi/proxi_sensor.h
src/proxi/proxi_sensor_hal.cpp
src/proxi/proxi_sensor_hal.h
src/rotation_vector/rv/rv_sensor.cpp
src/rotation_vector/rv/rv_sensor.h
src/shared/sensor_base.cpp
src/shared/sensor_base.h
src/shared/sensor_common.h
src/shared/sensor_hal.h
src/shared/sf_common.h
src/temperature/temperature_sensor.cpp
src/temperature/temperature_sensor.h
src/temperature/temperature_sensor_hal.cpp
src/temperature/temperature_sensor_hal.h

index 7323b35..55ddf2b 100755 (executable)
@@ -65,7 +65,7 @@ bool accel_sensor::init()
                return false;
        }
 
-       sensor_properties_t properties;
+       sensor_properties_s properties;
 
        if (m_sensor_hal->get_properties(properties) == false) {
                ERR("sensor->get_properties() is failed!\n");
@@ -133,7 +133,7 @@ bool accel_sensor::on_stop(void)
        return stop_poll();
 }
 
-bool accel_sensor::get_properties(sensor_properties_t &properties)
+bool accel_sensor::get_properties(sensor_properties_s &properties)
 {
        return m_sensor_hal->get_properties(properties);
 }
index 5d946ba..fec8d69 100755 (executable)
@@ -35,7 +35,7 @@ public:
 
        static bool working(void *inst);
        virtual bool set_interval(unsigned long interval);
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
        virtual int get_sensor_data(unsigned int type, sensor_data_t &data);
 private:
        sensor_hal *m_sensor_hal;
index 53bb2d7..6a78105 100755 (executable)
@@ -436,7 +436,7 @@ int accel_sensor_hal::get_sensor_data(sensor_data_t &data)
        return 0;
 }
 
-bool accel_sensor_hal::get_properties(sensor_properties_t &properties)
+bool accel_sensor_hal::get_properties(sensor_properties_s &properties)
 {
        properties.name = m_chip_name;
        properties.vendor = m_vendor;
index b2e86e1..821bb1e 100755 (executable)
@@ -41,7 +41,7 @@ public:
        bool set_interval(unsigned long val);
        bool is_data_ready(bool wait);
        virtual int get_sensor_data(sensor_data_t &data);
-       bool get_properties(sensor_properties_t &properties);
+       bool get_properties(sensor_properties_s &properties);
 //     bool check_hw_node(void);
 
 private:
index 029df71..7f967c7 100755 (executable)
@@ -51,7 +51,7 @@ bool geo_sensor::init()
                return false;
        }
 
-       sensor_properties_t properties;
+       sensor_properties_s properties;
 
        if (m_sensor_hal->get_properties(properties) == false) {
                ERR("sensor->get_properties() is failed!\n");
@@ -118,7 +118,7 @@ bool geo_sensor::on_stop(void)
        return stop_poll();
 }
 
-bool geo_sensor::get_properties(sensor_properties_t &properties)
+bool geo_sensor::get_properties(sensor_properties_s &properties)
 {
        return m_sensor_hal->get_properties(properties);
 }
index c211e5c..d864ec1 100755 (executable)
@@ -36,7 +36,7 @@ public:
        static bool working(void *inst);
 
        virtual bool set_interval(unsigned long interval);
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
        int get_sensor_data(unsigned int type, sensor_data_t &data);
 private:
        sensor_hal *m_sensor_hal;
index 21a2276..fdd99f9 100755 (executable)
@@ -195,7 +195,7 @@ int geo_sensor_hal::get_sensor_data(sensor_data_t &data)
        return 0;
 }
 
-bool geo_sensor_hal::get_properties(sensor_properties_t &properties)
+bool geo_sensor_hal::get_properties(sensor_properties_s &properties)
 {
        properties.name = m_chip_name;
        properties.vendor = m_vendor;
index 25183d2..291c725 100755 (executable)
@@ -44,7 +44,7 @@ public:
        bool set_interval(unsigned long val);
        bool is_data_ready(bool wait);
        virtual int get_sensor_data(sensor_data_t &data);
-       bool get_properties(sensor_properties_t &properties);
+       bool get_properties(sensor_properties_s &properties);
 private:
        string m_model_id;
        string m_vendor;
index 5467318..21b8e96 100755 (executable)
@@ -255,7 +255,7 @@ int gravity_sensor::get_sensor_data(const unsigned int event_type, sensor_data_t
        return 0;
 }
 
-bool gravity_sensor::get_properties(sensor_properties_t &properties)
+bool gravity_sensor::get_properties(sensor_properties_s &properties)
 {
        properties.min_range = -GRAVITY;
        properties.max_range = GRAVITY;
index 03fd4f3..ec2c5e1 100755 (executable)
@@ -40,7 +40,7 @@ public:
        bool delete_interval(int client_id);
 
        int get_sensor_data(const unsigned int event_type, sensor_data_t &data);
-       bool get_properties(sensor_properties_t &properties);
+       bool get_properties(sensor_properties_s &properties);
 private:
        sensor_base *m_orientation_sensor;
        cmutex m_value_mutex;
index d057959..30f562b 100755 (executable)
@@ -54,7 +54,7 @@ bool gyro_sensor::init()
                return false;
        }
 
-       sensor_properties_t properties;
+       sensor_properties_s properties;
 
        if (m_sensor_hal->get_properties(properties) == false) {
                ERR("sensor->get_properties() is failed!\n");
@@ -120,7 +120,7 @@ bool gyro_sensor::on_stop(void)
        return stop_poll();
 }
 
-bool gyro_sensor::get_properties(sensor_properties_t &properties)
+bool gyro_sensor::get_properties(sensor_properties_s &properties)
 {
        return m_sensor_hal->get_properties(properties);
 }
index 81d7557..a56ca2f 100755 (executable)
@@ -36,7 +36,7 @@ public:
        static bool working(void *inst);
 
        virtual bool set_interval(unsigned long interval);
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
        int get_sensor_data(unsigned int type, sensor_data_t &data);
 private:
        sensor_hal *m_sensor_hal;
index c9bf135..f4f690e 100755 (executable)
@@ -281,7 +281,7 @@ int gyro_sensor_hal::get_sensor_data(sensor_data_t &data)
        return 0;
 }
 
-bool gyro_sensor_hal::get_properties(sensor_properties_t &properties)
+bool gyro_sensor_hal::get_properties(sensor_properties_s &properties)
 {
        properties.name = m_chip_name;
        properties.vendor = m_vendor;
index f2e63a6..dcb8bfe 100755 (executable)
@@ -41,7 +41,7 @@ public:
        bool set_interval(unsigned long ms_interval);
        bool is_data_ready(bool wait);
        virtual int get_sensor_data(sensor_data_t &data);
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
 
 private:
        int m_x;
index 5a59254..4b51611 100755 (executable)
@@ -57,4 +57,5 @@ install(FILES sensor_orientation.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/senso
 install(FILES sensor_rv.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/sensor/)
 install(FILES sensor_temperature.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/sensor/)
 install(FILES sensor_motion.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/sensor/)
+install(FILES sensor_deprecated.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/sensor/)
 install(FILES ${PROJECT_NAME}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
index 3132921..dcac646 100755 (executable)
@@ -388,6 +388,21 @@ API int sf_check_rotation(unsigned long *rotation)
        return 0;
 }
 
+int sf_is_sensor_event_available(sensor_type_t sensor_type, unsigned int event_type)
+{
+       return 0;
+}
+
+int sf_get_data_properties(unsigned int data_id, sensor_data_properties_t *return_data_properties)
+{
+       return 0;
+}
+
+int sf_get_properties(sensor_type_t sensor_type, sensor_properties_t *return_properties)
+{
+       return 0;
+}
+
 static bool get_sensor_list(void)
 {
        static cmutex l;
diff --git a/src/libsensord/sensor_deprecated.h b/src/libsensord/sensor_deprecated.h
new file mode 100644 (file)
index 0000000..094907a
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * libsensord
+ *
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef __SENSOR_DEPRECATED_H__
+#define __SENSOR_DEPRECATED_H__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define ACCELEROMETER_EVENT_ROTATION_CHECK ((ACCELEROMETER_SENSOR << 16) | 0x0100)
+
+#define ACCELEROMETER_ORIENTATION_DATA_SET (ACCELEROMETER_SENSOR << 16) | 0x0002
+#define ACCELEROMETER_LINEAR_ACCELERATION_DATA_SET (ACCELEROMETER_SENSOR << 16) | 0x0004
+#define ACCELEROMETER_GRAVITY_DATA_SET (ACCELEROMETER_SENSOR << 16) | 0x0008
+
+#define ACCELEROMETER_EVENT_GRAVITY_DATA_REPORT_ON_TIME (ACCELEROMETER_SENSOR << 16) | 0x0080
+#define ACCELEROMETER_EVENT_LINEAR_ACCELERATION_DATA_REPORT_ON_TIME (ACCELEROMETER_SENSOR << 16) | 0x0040
+#define ACCELEROMETER_EVENT_ORIENTATION_DATA_REPORT_ON_TIME (ACCELEROMETER_SENSOR << 16) | 0x0020
+#define GEOMAGNETIC_EVENT_ATTITUDE_DATA_REPORT_ON_TIME (GEOMAGNETIC_SENSOR << 16) | 0x0004
+#define ACCELEROMETER_EVENT_CALIBRATION_NEEDED 0x01
+#define ACCELEROMETER_EVENT_SET_WAKEUP 0x02
+
+enum accelerometer_rotate_state {
+       ROTATION_UNKNOWN = 0,
+       ROTATION_LANDSCAPE_LEFT = 1,
+       ROTATION_PORTRAIT_TOP = 2,
+       ROTATION_PORTRAIT_BTM = 3,
+       ROTATION_LANDSCAPE_RIGHT = 4,
+       ROTATION_EVENT_0 = 2,
+       ROTATION_EVENT_90 = 1,
+       ROTATION_EVENT_180 = 3,
+       ROTATION_EVENT_270 = 4,
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //__SENSOR_DEPRECATED_H__
+
index 9f3910d..69fa4ec 100755 (executable)
@@ -50,6 +50,9 @@ extern "C"
 #include <sensor_temperature.h>
 #include <sensor_rv.h>
 #include <sensor_motion.h>
+#include <sensor_deprecated.h>
+
+#define MAX_KEY_LEN 30
 
 typedef struct {
        condition_op_t cond_op;
@@ -70,19 +73,27 @@ typedef struct {
        int z;
 } sensor_panning_data_t;
 
-#define ACCELEROMETER_EVENT_ROTATION_CHECK ((ACCELEROMETER_SENSOR << 16) | 0x0001)
-
-enum accelerometer_rotate_state {
-       ROTATION_UNKNOWN = 0,
-       ROTATION_LANDSCAPE_LEFT = 1,
-       ROTATION_PORTRAIT_TOP = 2,
-       ROTATION_PORTRAIT_BTM = 3,
-       ROTATION_LANDSCAPE_RIGHT = 4,
-       ROTATION_EVENT_0 = 2,
-       ROTATION_EVENT_90 = 1,
-       ROTATION_EVENT_180 = 3,
-       ROTATION_EVENT_270 = 4,
-};
+typedef struct {
+       int sensor_unit_idx;
+       float sensor_min_range;
+       float sensor_max_range;
+       float sensor_resolution;
+       char sensor_name[MAX_KEY_LEN];
+       char sensor_vendor[MAX_KEY_LEN];
+} sensor_properties_t;
+
+typedef struct {
+       int sensor_unit_idx;
+       float sensor_min_range;
+       float sensor_max_range;
+       float sensor_resolution;
+} sensor_data_properties_t;
+
+int sf_is_sensor_event_available(sensor_type_t sensor_type , unsigned int event_type);
+
+int sf_get_data_properties(unsigned int data_id, sensor_data_properties_t *return_data_properties);
+
+int sf_get_properties(sensor_type_t sensor_type, sensor_properties_t *return_properties);
 
 int sf_check_rotation(unsigned long *rotation);
 
index 205def6..1fe2db5 100755 (executable)
@@ -28,8 +28,6 @@ extern "C"
 {
 #endif
 
-#define MOTION_SENSOR 0xFF
-
 enum motion_event_type {
        MOTION_ENGINE_EVENT_SNAP                                = (MOTION_SENSOR << 16) | 0x0001,
        MOTION_ENGINE_EVENT_SHAKE                               = (MOTION_SENSOR << 16) | 0x0002,
index af222e1..bf287c6 100755 (executable)
@@ -151,7 +151,7 @@ bool light_sensor::on_stop(void)
        return stop_poll();
 }
 
-bool light_sensor::get_properties(const unsigned int type, sensor_properties_t &properties)
+bool light_sensor::get_properties(const unsigned int type, sensor_properties_s &properties)
 {
        m_sensor_hal->get_properties(properties);
 
index 455df3d..18bbe48 100755 (executable)
@@ -39,7 +39,7 @@ public:
        virtual bool on_stop(void);
 
        virtual bool set_interval(unsigned long interval);
-       virtual bool get_properties(const unsigned int type, sensor_properties_t &properties);
+       virtual bool get_properties(const unsigned int type, sensor_properties_s &properties);
        int get_sensor_data(const unsigned int type, sensor_data_t &data);
 
 private:
index 4cc630c..521a2dc 100755 (executable)
@@ -181,7 +181,7 @@ int light_sensor_hal::get_sensor_data(sensor_data_t &data)
 }
 
 
-bool light_sensor_hal::get_properties(sensor_properties_t &properties)
+bool light_sensor_hal::get_properties(sensor_properties_s &properties)
 {
        properties.name = m_chip_name;
        properties.vendor = m_vendor;
index ec35104..f2043ec 100755 (executable)
@@ -37,7 +37,7 @@ public:
        bool set_interval(unsigned long val);
        bool is_data_ready(bool wait);
        virtual int get_sensor_data(sensor_data_t &data);
-       bool get_properties(sensor_properties_t &properties);
+       bool get_properties(sensor_properties_s &properties);
 private:
        string m_model_id;
        string m_vendor;
index 6d7c1df..94a5f8f 100755 (executable)
@@ -271,7 +271,7 @@ int linear_accel_sensor::get_sensor_data(const unsigned int event_type, sensor_d
        return 0;
 }
 
-bool linear_accel_sensor::get_properties(sensor_properties_t &properties)
+bool linear_accel_sensor::get_properties(sensor_properties_s &properties)
 {
        m_accel_sensor->get_properties(properties);
        properties.name = "Linear Acceleration Sensor";
index 273fa84..b17792f 100755 (executable)
@@ -38,7 +38,7 @@ public:
        bool delete_interval(int client_id);
 
        int get_sensor_data(const unsigned int event_type, sensor_data_t &data);
-       bool get_properties(sensor_properties_t &properties);
+       bool get_properties(sensor_properties_s &properties);
 private:
        sensor_base *m_accel_sensor;
        sensor_base *m_gravity_sensor;
index 9419c96..56658ba 100755 (executable)
@@ -432,7 +432,7 @@ int orientation_sensor::get_sensor_data(const unsigned int event_type, sensor_da
        return 0;
 }
 
-bool orientation_sensor::get_properties(sensor_properties_t &properties)
+bool orientation_sensor::get_properties(sensor_properties_s &properties)
 {
        if(m_raw_data_unit == "DEGREES") {
                properties.min_range = -180;
index ed61891..4ae764f 100755 (executable)
@@ -35,7 +35,7 @@ public:
 
        bool add_interval(int client_id, unsigned int interval);
        bool delete_interval(int client_id);
-       bool get_properties(sensor_properties_t &properties);
+       bool get_properties(sensor_properties_s &properties);
        sensor_type_t get_type(void);
 
        int get_sensor_data(const unsigned int data_id, sensor_data_t &data);
index d29311c..d1f23a2 100755 (executable)
@@ -62,7 +62,7 @@ bool pressure_sensor::init()
                return false;
        }
 
-       sensor_properties_t properties;
+       sensor_properties_s properties;
 
        if (!m_sensor_hal->get_properties(properties)) {
                ERR("sensor->get_properties() is failed!\n");
@@ -152,7 +152,7 @@ bool pressure_sensor::on_stop(void)
        return stop_poll();
 }
 
-bool pressure_sensor::get_properties(sensor_properties_t &properties)
+bool pressure_sensor::get_properties(sensor_properties_s &properties)
 {
        return m_sensor_hal->get_properties(properties);
 }
index 1bd8df2..6bd0f40 100755 (executable)
@@ -37,7 +37,7 @@ public:
        static bool working(void *inst);
 
        bool set_interval(unsigned long interval);
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
        int get_sensor_data(unsigned int type, sensor_data_t &data);
 
 private:
index c899d3e..6485dab 100755 (executable)
@@ -303,7 +303,7 @@ int pressure_sensor_hal::get_sensor_data(sensor_data_t &data)
 }
 
 
-bool pressure_sensor_hal::get_properties(sensor_properties_t &properties)
+bool pressure_sensor_hal::get_properties(sensor_properties_s &properties)
 {
        properties.name = m_chip_name;
        properties.vendor = m_vendor;
index 42e5310..28c5d87 100755 (executable)
@@ -37,7 +37,7 @@ public:
        bool set_interval(unsigned long val);
        bool is_data_ready(bool wait);
        virtual int get_sensor_data(sensor_data_t &data);
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
 
 private:
        string m_model_id;
index 37dfce6..4db701a 100755 (executable)
@@ -122,7 +122,7 @@ bool proxi_sensor::on_stop(void)
        return stop_poll();
 }
 
-bool proxi_sensor::get_properties(sensor_properties_t &properties)
+bool proxi_sensor::get_properties(sensor_properties_s &properties)
 {
        m_sensor_hal->get_properties(properties);
 
index f058724..9a45e72 100755 (executable)
@@ -34,7 +34,7 @@ public:
 
        static bool working(void *inst);
 
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
        int get_sensor_data(unsigned int type, sensor_data_t &data);
 private:
        sensor_hal *m_sensor_hal;
index 3154c18..73bdd75 100755 (executable)
@@ -238,7 +238,7 @@ int proxi_sensor_hal::get_sensor_data(sensor_data_t &data)
        return 0;
 }
 
-bool proxi_sensor_hal::get_properties(sensor_properties_t &properties)
+bool proxi_sensor_hal::get_properties(sensor_properties_s &properties)
 {
        properties.name = m_chip_name;
        properties.vendor = m_vendor;
index 6113397..17d8182 100755 (executable)
@@ -42,7 +42,7 @@ public:
        bool disable(void);
        bool is_data_ready(bool wait);
        virtual int get_sensor_data(sensor_data_t &data);
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
 private:
        string m_model_id;
        string m_vendor;
index e37ff33..e5d0a0e 100755 (executable)
@@ -383,7 +383,7 @@ int rv_sensor::get_sensor_data(unsigned int data_id, sensor_data_t &data)
        return 0;
 }
 
-bool rv_sensor::get_properties(sensor_properties_t &properties)
+bool rv_sensor::get_properties(sensor_properties_s &properties)
 {
        properties.vendor = m_vendor;
        properties.name = SENSOR_NAME;
index 3d84a80..04b42b6 100755 (executable)
@@ -35,7 +35,7 @@ public:
 
        bool add_interval(int client_id, unsigned int interval);
        bool delete_interval(int client_id);
-       bool get_properties(sensor_properties_t &properties);
+       bool get_properties(sensor_properties_s &properties);
        sensor_type_t get_type(void);
 
        int get_sensor_data(const unsigned int data_id, sensor_data_t &data);
index 3b71b36..109504c 100755 (executable)
@@ -252,7 +252,7 @@ unsigned int sensor_base::get_interval(int client_id, bool is_processor)
 
 void sensor_base::get_sensor_info(sensor_info &info)
 {
-       sensor_properties_t properties;
+       sensor_properties_s properties;
        get_properties(properties);
 
        info.set_type(get_type());
@@ -271,7 +271,7 @@ void sensor_base::get_sensor_info(sensor_info &info)
        return;
 }
 
-bool sensor_base::get_properties(sensor_properties_t &properties)
+bool sensor_base::get_properties(sensor_properties_s &properties)
 {
        return true;
 }
index 1cc6636..16d3dba 100755 (executable)
@@ -76,7 +76,7 @@ public:
 
 
        void get_sensor_info(sensor_info &info);
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
        bool is_supported(unsigned int event_type);
 
        virtual long set_command(unsigned int cmd, long value);
index cfecead..7fbfec7 100755 (executable)
@@ -56,7 +56,8 @@ typedef enum {
        LINEAR_ACCEL_SENSOR,
        ORIENTATION_SENSOR,
        TEMPERATURE_SENSOR,
-       ROTATION_VECTOR_SENSOR
+       ROTATION_VECTOR_SENSOR,
+       MOTION_SENSOR
 } sensor_type_t;
 
 typedef unsigned int sensor_id_t;
@@ -84,7 +85,10 @@ typedef struct sensor_data_t {
                int data_accuracy; //deprecated
        };
 
-       unsigned long long timestamp;
+       union {
+               unsigned long long timestamp;
+               unsigned long long time_stamp; //deprecated
+       };
 
 /*
  *     Use "value_count" instead of "values_num"
index 261608e..41d5d6d 100755 (executable)
@@ -79,7 +79,7 @@ public:
        virtual bool disable(void) = 0;
        virtual bool set_interval(unsigned long val);
        virtual bool is_data_ready(bool wait) = 0;
-       virtual bool get_properties(sensor_properties_t &properties) = 0;
+       virtual bool get_properties(sensor_properties_s &properties) = 0;
        virtual int get_sensor_data(sensor_data_t &data);
        virtual int get_sensor_data(sensorhub_data_t &data);
        virtual long set_command(unsigned int cmd, long val);
index a47ef4f..3b6b79e 100755 (executable)
@@ -162,7 +162,7 @@ typedef struct {
        int min_interval;
        int fifo_count;
        int max_batch_count;
-} sensor_properties_t;
+} sensor_properties_s;
 
 
 /*
index 944d3c5..b81c645 100755 (executable)
@@ -51,7 +51,7 @@ bool temperature_sensor::init()
                return false;
        }
 
-       sensor_properties_t properties;
+       sensor_properties_s properties;
 
        if (!m_sensor_hal->get_properties(properties))
        {
@@ -120,7 +120,7 @@ bool temperature_sensor::on_stop(void)
        return stop_poll();
 }
 
-bool temperature_sensor::get_properties(sensor_properties_t &properties)
+bool temperature_sensor::get_properties(sensor_properties_s &properties)
 {
        return m_sensor_hal->get_properties(properties);
 }
index bcf9346..9bb881a 100755 (executable)
@@ -36,7 +36,7 @@ public:
        static bool working(void *inst);
 
        bool set_interval(unsigned long interval);
-       virtual bool get_properties(sensor_properties_t &properties);
+       virtual bool get_properties(sensor_properties_s &properties);
        int get_sensor_data(unsigned int type, sensor_data_t &data);
 
 private:
index cf562bb..0588952 100755 (executable)
@@ -196,7 +196,7 @@ int temperature_sensor_hal::get_sensor_data(sensor_data_t &data)
 }
 
 
-bool temperature_sensor_hal::get_properties(sensor_properties_t &properties)
+bool temperature_sensor_hal::get_properties(sensor_properties_s &properties)
 {
        properties.name = m_chip_name;
        properties.vendor = m_vendor;
index f492ee4..aba0fb7 100755 (executable)
@@ -44,7 +44,7 @@ public:
        bool set_interval(unsigned long val);
        bool is_data_ready(bool wait);
        virtual int get_sensor_data(sensor_data_t &data);
-       bool get_properties(sensor_properties_t &properties);
+       bool get_properties(sensor_properties_s &properties);
 private:
        float m_temperature;
        int m_node_handle;