From: Kibak Yoon Date: Tue, 6 Jan 2015 12:06:29 +0000 (+0900) Subject: sensord: add motion api temporarily for avoiding build-break X-Git-Tag: submit/tizen/20150113.012540~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4ab24efb7a849c862c8644e17f7ed9aeeb51a5e9;p=platform%2Fcore%2Fsystem%2Fsensord.git sensord: add motion api temporarily for avoiding build-break motion API is replaced by context gesture api after tizen 2.3. because there are the packages which use motion API still, sensor motion API should be restored temporarily. - they are not operated. only for avoiding build-break Signed-off-by: Kibak Yoon Change-Id: I8384ef30abf90623704908c8a537e62437a75ff2 --- diff --git a/src/libsensord/CMakeLists.txt b/src/libsensord/CMakeLists.txt index 50550ee6..81f759ff 100755 --- a/src/libsensord/CMakeLists.txt +++ b/src/libsensord/CMakeLists.txt @@ -71,4 +71,5 @@ install(FILES sensor_linear_accel.h DESTINATION ${INCLUDEDIR}/sensor/) install(FILES sensor_orientation.h DESTINATION ${INCLUDEDIR}/sensor/) install(FILES sensor_rv.h DESTINATION ${INCLUDEDIR}/sensor/) install(FILES sensor_temperature.h DESTINATION ${INCLUDEDIR}/sensor/) +install(FILES sensor_motion.h DESTINATION ${INCLUDEDIR}/sensor/) install(FILES ${PROJECT_NAME}.pc DESTINATION ${LIBDIR}/pkgconfig) diff --git a/src/libsensord/sensor_internal_deprecated.h b/src/libsensord/sensor_internal_deprecated.h index c2fab32c..9f3910dc 100755 --- a/src/libsensord/sensor_internal_deprecated.h +++ b/src/libsensord/sensor_internal_deprecated.h @@ -49,6 +49,7 @@ extern "C" #include #include #include +#include typedef struct { condition_op_t cond_op; diff --git a/src/libsensord/sensor_motion.h b/src/libsensord/sensor_motion.h new file mode 100755 index 00000000..205def64 --- /dev/null +++ b/src/libsensord/sensor_motion.h @@ -0,0 +1,152 @@ +/* + * 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_MOTION_H__ +#define __SENSOR_MOTION_H__ + +//! Pre-defined events for the motion sensor +//! Sensor Plugin developer can add more event to their own headers + +#ifdef __cplusplus +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, + MOTION_ENGINE_EVENT_DOUBLETAP = (MOTION_SENSOR << 16) | 0x0004, + MOTION_ENGINE_EVENT_PANNING = (MOTION_SENSOR << 16) | 0x0008, + MOTION_ENGINE_EVENT_TOP_TO_BOTTOM = (MOTION_SENSOR << 16) | 0x0010, + MOTION_ENGINE_EVENT_DIRECT_CALL = (MOTION_SENSOR << 16) | 0x0020, + MOTION_ENGINE_EVENT_TILT_TO_UNLOCK = (MOTION_SENSOR << 16) | 0x0040, + MOTION_ENGINE_EVENT_LOCK_EXECUTE_CAMERA = (MOTION_SENSOR << 16) | 0x0080, + MOTION_ENGINE_EVENT_SMART_ALERT = (MOTION_SENSOR << 16) | 0x0100, + MOTION_ENGINE_EVENT_TILT = (MOTION_SENSOR << 16) | 0x0200, + MOTION_ENGINE_EVENT_PANNING_BROWSE = (MOTION_SENSOR << 16) | 0x0400, + MOTION_ENGINE_EVENT_NO_MOVE = (MOTION_SENSOR << 16) | 0x0800, + MOTION_ENGINE_EVENT_SHAKE_ALWAYS_ON = (MOTION_SENSOR << 16) | 0x1000, + MOTION_ENGINE_EVENT_SMART_RELAY = (MOTION_SENSOR << 16) | 0x2000, +}; + +enum motion_snap_event { + MOTION_ENGIEN_SNAP_NONE = 0, + MOTION_ENGIEN_NEGATIVE_SNAP_X = 1, + MOTION_ENGIEN_POSITIVE_SNAP_X = 2, + MOTION_ENGIEN_NEGATIVE_SNAP_Y = 3, + MOTION_ENGIEN_POSITIVE_SNAP_Y = 4, + MOTION_ENGIEN_NEGATIVE_SNAP_Z = 5, + MOTION_ENGIEN_POSITIVE_SNAP_Z = 6, + MOTION_ENGIEN_SNAP_LEFT = MOTION_ENGIEN_NEGATIVE_SNAP_X, + MOTION_ENGIEN_SNAP_RIGHT = MOTION_ENGIEN_POSITIVE_SNAP_X, + MOTION_ENGINE_SNAP_NONE = 0, + MOTION_ENGINE_NEGATIVE_SNAP_X = 1, + MOTION_ENGINE_POSITIVE_SNAP_X = 2, + MOTION_ENGINE_NEGATIVE_SNAP_Y = 3, + MOTION_ENGINE_POSITIVE_SNAP_Y = 4, + MOTION_ENGINE_NEGATIVE_SNAP_Z = 5, + MOTION_ENGINE_POSITIVE_SNAP_Z = 6, + MOTION_ENGINE_SNAP_LEFT = MOTION_ENGINE_NEGATIVE_SNAP_X, + MOTION_ENGINE_SNAP_RIGHT = MOTION_ENGINE_POSITIVE_SNAP_X, +}; + +enum motion_shake_event { + MOTION_ENGIEN_SHAKE_NONE = 0, + MOTION_ENGIEN_SHAKE_DETECTION = 1, + MOTION_ENGIEN_SHAKE_CONTINUING = 2, + MOTION_ENGIEN_SHAKE_FINISH = 3, + MOTION_ENGINE_SHAKE_BREAK = 4, + MOTION_ENGINE_SHAKE_NONE = 0, + MOTION_ENGINE_SHAKE_DETECTION = 1, + MOTION_ENGINE_SHAKE_CONTINUING = 2, + MOTION_ENGINE_SHAKE_FINISH = 3, +}; + +enum motion_doubletap_event { + MOTION_ENGIEN_DOUBLTAP_NONE = 0, + MOTION_ENGIEN_DOUBLTAP_DETECTION = 1, + MOTION_ENGINE_DOUBLTAP_NONE = 0, + MOTION_ENGINE_DOUBLTAP_DETECTION = 1, +}; + +enum motion_top_to_bottom_event { + MOTION_ENGIEN_TOP_TO_BOTTOM_NONE = 0, + MOTION_ENGIEN_TOP_TO_BOTTOM_WAIT = 1, + MOTION_ENGIEN_TOP_TO_BOTTOM_DETECTION = 2, + MOTION_ENGINE_TOP_TO_BOTTOM_NONE = 0, + MOTION_ENGINE_TOP_TO_BOTTOM_WAIT = 1, + MOTION_ENGINE_TOP_TO_BOTTOM_DETECTION = 2, +}; + +enum motion_direct_call_event_t { + MOTION_ENGINE_DIRECT_CALL_NONE, + MOTION_ENGINE_DIRECT_CALL_DETECTION, +}; + +enum motion_smart_relay_event_t { + MOTION_ENGINE_SMART_RELAY_NONE, + MOTION_ENGINE_SMART_RELAY_DETECTION, +}; + +enum motion_tilt_to_unlock_event_t { + MOTION_ENGINE_TILT_TO_UNLOCK_NONE, + MOTION_ENGINE_TILT_TO_UNLOCK_DETECTION, +}; + +enum motion_lock_execute_camera_event_t { + MOTION_ENGINE_LOCK_EXECUTE_CAMERA_NONE, + MOTION_ENGINE_LOCK_EXECUTE_CAMERA_L_DETECTION, + MOTION_ENGINE_LOCK_EXECUTE_CAMERA_R_DETECTION, +}; + +enum motion_smart_alert_t { + MOTION_ENGINE_SMART_ALERT_NONE, + MOTION_ENGINE_SMART_ALERT_DETECTION, +}; + +enum motion_no_move_t { + MOTION_ENGINE_NO_MOVE_NONE, + MOTION_ENGINE_NO_MOVE_DETECTION, +}; + +enum motion_property_id { + MOTION_PROPERTY_UNKNOWN = 0, + MOTION_PROPERTY_CHECK_ACCEL_SENSOR, + MOTION_PROPERTY_CHECK_GYRO_SENSOR, + MOTION_PROPERTY_CHECK_GEO_SENSOR, + MOTION_PROPERTY_CHECK_PRIXI_SENSOR, + MOTION_PROPERTY_CHECK_LIGHT_SENSOR, + MOTION_PROPERTY_CHECK_BARO_SENSOR, + MOTION_PROPERTY_LCD_TOUCH_ON, + MOTION_PROPERTY_LCD_TOUCH_OFF, + MOTION_PROPERTY_CHECK_GYRO_CAL_STATUS, +}; + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif +//! End of a file