4 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #ifndef __SENSOR_MOTION_H__
21 #define __SENSOR_MOTION_H__
23 //! Pre-defined events for the motion sensor
24 //! Sensor Plugin developer can add more event to their own headers
31 enum motion_event_type {
32 MOTION_ENGINE_EVENT_SNAP = (MOTION_SENSOR << 16) | 0x0001,
33 MOTION_ENGINE_EVENT_SHAKE = (MOTION_SENSOR << 16) | 0x0002,
34 MOTION_ENGINE_EVENT_DOUBLETAP = (MOTION_SENSOR << 16) | 0x0004,
35 MOTION_ENGINE_EVENT_PANNING = (MOTION_SENSOR << 16) | 0x0008,
36 MOTION_ENGINE_EVENT_TOP_TO_BOTTOM = (MOTION_SENSOR << 16) | 0x0010,
37 MOTION_ENGINE_EVENT_DIRECT_CALL = (MOTION_SENSOR << 16) | 0x0020,
38 MOTION_ENGINE_EVENT_TILT_TO_UNLOCK = (MOTION_SENSOR << 16) | 0x0040,
39 MOTION_ENGINE_EVENT_LOCK_EXECUTE_CAMERA = (MOTION_SENSOR << 16) | 0x0080,
40 MOTION_ENGINE_EVENT_SMART_ALERT = (MOTION_SENSOR << 16) | 0x0100,
41 MOTION_ENGINE_EVENT_TILT = (MOTION_SENSOR << 16) | 0x0200,
42 MOTION_ENGINE_EVENT_PANNING_BROWSE = (MOTION_SENSOR << 16) | 0x0400,
43 MOTION_ENGINE_EVENT_NO_MOVE = (MOTION_SENSOR << 16) | 0x0800,
44 MOTION_ENGINE_EVENT_SHAKE_ALWAYS_ON = (MOTION_SENSOR << 16) | 0x1000,
45 MOTION_ENGINE_EVENT_SMART_RELAY = (MOTION_SENSOR << 16) | 0x2000,
48 enum motion_snap_event {
49 MOTION_ENGIEN_SNAP_NONE = 0,
50 MOTION_ENGIEN_NEGATIVE_SNAP_X = 1,
51 MOTION_ENGIEN_POSITIVE_SNAP_X = 2,
52 MOTION_ENGIEN_NEGATIVE_SNAP_Y = 3,
53 MOTION_ENGIEN_POSITIVE_SNAP_Y = 4,
54 MOTION_ENGIEN_NEGATIVE_SNAP_Z = 5,
55 MOTION_ENGIEN_POSITIVE_SNAP_Z = 6,
56 MOTION_ENGIEN_SNAP_LEFT = MOTION_ENGIEN_NEGATIVE_SNAP_X,
57 MOTION_ENGIEN_SNAP_RIGHT = MOTION_ENGIEN_POSITIVE_SNAP_X,
58 MOTION_ENGINE_SNAP_NONE = 0,
59 MOTION_ENGINE_NEGATIVE_SNAP_X = 1,
60 MOTION_ENGINE_POSITIVE_SNAP_X = 2,
61 MOTION_ENGINE_NEGATIVE_SNAP_Y = 3,
62 MOTION_ENGINE_POSITIVE_SNAP_Y = 4,
63 MOTION_ENGINE_NEGATIVE_SNAP_Z = 5,
64 MOTION_ENGINE_POSITIVE_SNAP_Z = 6,
65 MOTION_ENGINE_SNAP_LEFT = MOTION_ENGINE_NEGATIVE_SNAP_X,
66 MOTION_ENGINE_SNAP_RIGHT = MOTION_ENGINE_POSITIVE_SNAP_X,
69 enum motion_shake_event {
70 MOTION_ENGIEN_SHAKE_NONE = 0,
71 MOTION_ENGIEN_SHAKE_DETECTION = 1,
72 MOTION_ENGIEN_SHAKE_CONTINUING = 2,
73 MOTION_ENGIEN_SHAKE_FINISH = 3,
74 MOTION_ENGINE_SHAKE_BREAK = 4,
75 MOTION_ENGINE_SHAKE_NONE = 0,
76 MOTION_ENGINE_SHAKE_DETECTION = 1,
77 MOTION_ENGINE_SHAKE_CONTINUING = 2,
78 MOTION_ENGINE_SHAKE_FINISH = 3,
81 enum motion_doubletap_event {
82 MOTION_ENGIEN_DOUBLTAP_NONE = 0,
83 MOTION_ENGIEN_DOUBLTAP_DETECTION = 1,
84 MOTION_ENGINE_DOUBLTAP_NONE = 0,
85 MOTION_ENGINE_DOUBLTAP_DETECTION = 1,
88 enum motion_top_to_bottom_event {
89 MOTION_ENGIEN_TOP_TO_BOTTOM_NONE = 0,
90 MOTION_ENGIEN_TOP_TO_BOTTOM_WAIT = 1,
91 MOTION_ENGIEN_TOP_TO_BOTTOM_DETECTION = 2,
92 MOTION_ENGINE_TOP_TO_BOTTOM_NONE = 0,
93 MOTION_ENGINE_TOP_TO_BOTTOM_WAIT = 1,
94 MOTION_ENGINE_TOP_TO_BOTTOM_DETECTION = 2,
97 enum motion_direct_call_event_t {
98 MOTION_ENGINE_DIRECT_CALL_NONE,
99 MOTION_ENGINE_DIRECT_CALL_DETECTION,
102 enum motion_smart_relay_event_t {
103 MOTION_ENGINE_SMART_RELAY_NONE,
104 MOTION_ENGINE_SMART_RELAY_DETECTION,
107 enum motion_tilt_to_unlock_event_t {
108 MOTION_ENGINE_TILT_TO_UNLOCK_NONE,
109 MOTION_ENGINE_TILT_TO_UNLOCK_DETECTION,
112 enum motion_lock_execute_camera_event_t {
113 MOTION_ENGINE_LOCK_EXECUTE_CAMERA_NONE,
114 MOTION_ENGINE_LOCK_EXECUTE_CAMERA_L_DETECTION,
115 MOTION_ENGINE_LOCK_EXECUTE_CAMERA_R_DETECTION,
118 enum motion_smart_alert_t {
119 MOTION_ENGINE_SMART_ALERT_NONE,
120 MOTION_ENGINE_SMART_ALERT_DETECTION,
123 enum motion_no_move_t {
124 MOTION_ENGINE_NO_MOVE_NONE,
125 MOTION_ENGINE_NO_MOVE_DETECTION,
128 enum motion_property_id {
129 MOTION_PROPERTY_UNKNOWN = 0,
130 MOTION_PROPERTY_CHECK_ACCEL_SENSOR,
131 MOTION_PROPERTY_CHECK_GYRO_SENSOR,
132 MOTION_PROPERTY_CHECK_GEO_SENSOR,
133 MOTION_PROPERTY_CHECK_PRIXI_SENSOR,
134 MOTION_PROPERTY_CHECK_LIGHT_SENSOR,
135 MOTION_PROPERTY_CHECK_BARO_SENSOR,
136 MOTION_PROPERTY_LCD_TOUCH_ON,
137 MOTION_PROPERTY_LCD_TOUCH_OFF,
138 MOTION_PROPERTY_CHECK_GYRO_CAL_STATUS,