66a249434dcc72d469a37ec97237289a5a428c91
[platform/framework/native/uix.git] / inc / FUixSensorSensorTypes.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file     FUixSensorSensorTypes.h
20  * @brief    This is the header file for the common data types used by the SensorData and SensorManager classes.
21  *
22  * This header file contains the declarations of the common data types and constants used by the SensorData and SensorManager classes.
23  */
24
25 #ifndef _FUIX_SENSOR_SENSOR_TYPES_H_
26 #define _FUIX_SENSOR_SENSOR_TYPES_H_
27
28 namespace Tizen { namespace Uix { namespace Sensor
29 {
30
31 /**
32 * @enum     SensorType
33 *
34 * Defines the sensor type.
35 *
36 * @since    2.0
37 */
38 enum SensorType
39 {
40         SENSOR_TYPE_ACCELERATION = 0,    /**< The acceleration sensor type */
41         SENSOR_TYPE_MAGNETIC,            /**< The magnetic sensor type */
42         SENSOR_TYPE_PROXIMITY,           /**< The proximity sensor type */
43         SENSOR_TYPE_TILT,                /**< The tilt sensor type */
44         SENSOR_TYPE_GYRO,                /**< The gyro sensor type */
45         SENSOR_TYPE_LIGHT,               /**< The light sensor type */
46         SENSOR_TYPE_MAX,                 // This enum value is for internal use only.
47                                          // Using this enum value can cause behavioral,
48                                          // security-related, and consistency-related
49                                          // issues in the application.
50         SENSOR_TYPE_NONE = -1,           // This enum value is for internal use only.
51                                          // Using this enum value can cause behavioral,
52                                          // security-related, and consistency-related
53                                          // issues in the application.
54 };
55
56 /**
57 * @enum       SensorDataKey
58 *
59 * Defines the default key types for the SensorData class.
60 *
61 * @since      2.0
62 *
63 * @remarks    Use actual key type, such as Tizen::Uix::Sensor::AccelerationDataKey, Tizen::Uix::Sensor::MagneticDataKey, Tizen::Uix::Sensor::ProximityDataKey or Tizen::Uix::Sensor::TiltDataKey with type casting. For example, use Tizen::Uix::Sensor::SensorData::GetValue(static_cast<SensorDataKey>(ACCELERATION_DATA_KEY_X), value) to get the acceleration value in x-axis.
64 */
65 enum SensorDataKey
66 {
67         SENSOR_DATA_KEY_0 = 0,
68         SENSOR_DATA_KEY_1,
69         SENSOR_DATA_KEY_2,
70         SENSOR_DATA_KEY_3,
71         SENSOR_DATA_KEY_4
72 };
73
74 /**
75 * @enum     AccelerationDataKey
76 *
77 * Defines the keys to access the acceleration sensor data.
78 *
79 * @since    2.0
80 */
81 enum AccelerationDataKey
82 {
83         ACCELERATION_DATA_KEY_TIMESTAMP = 256,    /**< The key to the timestamp of the acceleration sensor data */
84         ACCELERATION_DATA_KEY_X,                  /**< The key to the x-axis of the acceleration sensor data */
85         ACCELERATION_DATA_KEY_Y,                  /**< The key to the y-axis of the acceleration sensor data */
86         ACCELERATION_DATA_KEY_Z,                  /**< The key to the z-axis of the acceleration sensor data */
87         ACCELERATION_DATA_KEY_COUNT = 4           /**< The number of indices for the acceleration sensor data */
88 };
89
90 /**
91 * @enum     MagneticDataKey
92 *
93 * Defines the keys to access the magnetic sensor data.
94 *
95 * @since    2.0
96 */
97 enum MagneticDataKey
98 {
99         MAGNETIC_DATA_KEY_TIMESTAMP = 266,    /**< The key to the timestamp of the magnetic sensor data */
100         MAGNETIC_DATA_KEY_X,                  /**< The key to the x-axis of the magnetic sensor data */
101         MAGNETIC_DATA_KEY_Y,                  /**< The key to the y-axis of the magnetic sensor data  */
102         MAGNETIC_DATA_KEY_Z,                  /**< The key to the z-axis of the magnetic sensor data  */
103         MAGNETIC_DATA_KEY_COUNT = 4           /**< The number of indices to access magnetic sensor data */
104 };
105
106 /**
107 * @enum     ProximityDataKey
108 *
109 * Defines the keys to access the proximity sensor data.
110 *
111 * @since    2.0
112 */
113 enum ProximityDataKey
114 {
115         PROXIMITY_DATA_KEY_TIMESTAMP = 276,    /**< The key to the timestamp of the proximity sensor data */
116         PROXIMITY_DATA_KEY_ONOFF,              /**< The key to on/off the proximity sensor data */
117         PROXIMITY_DATA_KEY_COUNT = 2           /**< The number of indices to access the proximity sensor data */
118 };
119
120 /**
121 * @enum     TiltDataKey
122 *
123 * Defines the keys to access the tilt sensor data.
124 *
125 * @since    2.0
126 */
127 enum TiltDataKey
128 {
129         TILT_DATA_KEY_TIMESTAMP = 286,    /**< The key to the timestamp of the tilt sensor data */
130         TILT_DATA_KEY_AZIMUTH,            /**< The key to the azimuth of the tilt sensor data  */
131         TILT_DATA_KEY_PITCH,              /**< The key to the pitch of the tilt sensor data */
132         TILT_DATA_KEY_ROLL,               /**< The key to the roll of the tilt sensor data */
133         TILT_DATA_KEY_COUNT = 4           /**< The number of indices to access the tilt sensor data */
134 };
135
136 } } }// Tizen::Uix::Sensor
137
138 #endif // _FUIX_SENSOR_SENSOR_TYPES_H_