sensord: move deprecated event types to sensor_deprecated.h
[platform/core/system/sensord.git] / src / shared / sensor_types.h
1 /*
2  * sensord
3  *
4  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
5  *
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
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
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.
17  *
18  */
19
20 #ifndef _SENSOR_TYPES_H_
21 #define _SENSOR_TYPES_H_
22
23 #include "enum_factory.h"
24
25 #ifdef __cplusplus
26 extern "C"
27 {
28 #endif
29
30 #define SENSOR_TYPE(DEF_SENSOR, DEF_SENSOR_VALUE) \
31         DEF_SENSOR_VALUE(UNKNOWN_SENSOR, -2) \
32         DEF_SENSOR_VALUE(ALL_SENSOR, -1) \
33         DEF_SENSOR_VALUE(ACCELEROMETER_SENSOR, 0) \
34         DEF_SENSOR(GRAVITY_SENSOR) \
35         DEF_SENSOR(LINEAR_ACCEL_SENSOR) \
36         DEF_SENSOR(GEOMAGNETIC_SENSOR) \
37         DEF_SENSOR(ROTATION_VECTOR_SENSOR) \
38         DEF_SENSOR(ORIENTATION_SENSOR) \
39         DEF_SENSOR(GYROSCOPE_SENSOR) \
40         DEF_SENSOR(LIGHT_SENSOR) \
41         DEF_SENSOR(PROXIMITY_SENSOR) \
42         DEF_SENSOR(PRESSURE_SENSOR) \
43         DEF_SENSOR(ULTRAVIOLET_SENSOR) \
44         DEF_SENSOR(TEMPERATURE_SENSOR) \
45         DEF_SENSOR(HUMIDITY_SENSOR) \
46         DEF_SENSOR(HRM_SENSOR) \
47         DEF_SENSOR(HRM_LED_GREEN_SENSOR) \
48         DEF_SENSOR(HRM_LED_IR_SENSOR) \
49         DEF_SENSOR(HRM_LED_RED_SENSOR) \
50         DEF_SENSOR(GYROSCOPE_UNCAL_SENSOR) \
51         DEF_SENSOR(GEOMAGNETIC_UNCAL_SENSOR) \
52         DEF_SENSOR(GYROSCOPE_RV_SENSOR) \
53         DEF_SENSOR(GEOMAGNETIC_RV_SENSOR) \
54         \
55         DEF_SENSOR_VALUE(HUMAN_PEDOMETER_SENSOR, 0x300) \
56         DEF_SENSOR(HUMAN_SLEEP_MONITOR_SENSOR) \
57         \
58         DEF_SENSOR_VALUE(FUSION_SENSOR, 0x900) \
59         DEF_SENSOR(AUTO_ROTATION_SENSOR) \
60         DEF_SENSOR(AUTO_BRIGHTNESS_SENSOR) \
61         \
62         DEF_SENSOR_VALUE(CONTEXT_SENSOR, 0x1000) \
63         DEF_SENSOR(MOTION_SENSOR) \
64         DEF_SENSOR(PIR_SENSOR) \
65         DEF_SENSOR(PIR_LONG_SENSOR) \
66         DEF_SENSOR(DUST_SENSOR) \
67         DEF_SENSOR(THERMOMETER_SENSOR) \
68         DEF_SENSOR(PEDOMETER_SENSOR) \
69         DEF_SENSOR(FLAT_SENSOR) \
70         DEF_SENSOR(HRM_RAW_SENSOR) \
71         DEF_SENSOR(TILT_SENSOR) \
72         DEF_SENSOR(RV_RAW_SENSOR) \
73         DEF_SENSOR(EXERCISE_SENSOR) \
74         \
75         DEF_SENSOR_VALUE(GESTURE_MOVEMENT_SENSOR, 0x1200) \
76         DEF_SENSOR(GESTURE_WRIST_UP_SENSOR) \
77         DEF_SENSOR(GESTURE_WRIST_DOWN_SENSOR) \
78         DEF_SENSOR(GESTURE_MOVEMENT_STATE_SENSOR) \
79         \
80         DEF_SENSOR_VALUE(WEAR_STATUS_SENSOR, 0x1A00) \
81         DEF_SENSOR(WEAR_ON_MONITOR_SENSOR) \
82         DEF_SENSOR(GPS_BATCH_SENSOR) \
83         DEF_SENSOR(ACTIVITY_TRACKER_SENSOR) \
84         DEF_SENSOR(SLEEP_DETECTOR_SENSOR) \
85
86 #define BIO_HRM_SENSOR                  HRM_SENSOR
87 #define BIO_LED_GREEN_SENSOR    HRM_LED_GREEN_SENSOR
88 #define BIO_LED_IR_SENSOR               HRM_LED_IR_SENSOR
89 #define BIO_LED_RED_SENSOR              HRM_LED_RED_SENSOR
90 #define BIO_SENSOR                              HRM_RAW_SENSOR
91
92 DECLARE_SENSOR_ENUM(sensor_type_t, SENSOR_TYPE)
93
94 enum proxi_change_state {
95         PROXIMITY_STATE_NEAR    = 0,
96         PROXIMITY_STATE_FAR     = 1,
97 };
98
99 enum auto_rotation_state {
100         AUTO_ROTATION_DEGREE_UNKNOWN = 0,
101         AUTO_ROTATION_DEGREE_0,
102         AUTO_ROTATION_DEGREE_90,
103         AUTO_ROTATION_DEGREE_180,
104         AUTO_ROTATION_DEGREE_270,
105 };
106
107 #ifdef __cplusplus
108 }
109 #endif
110
111 #ifdef __cplusplus
112 DECLARE_SENSOR_ENUM_UTIL_NS(sensor_type_t)
113 #endif
114
115 #include <sensor_deprecated.h>
116
117 #endif /* _SENSOR_TYPES_H_ */