merge with master
[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_GRAVITY,             /**< The gravity sensor type @b Since: @b 2.1 */
47         SENSOR_TYPE_USER_ACCELERATION,   /**< The user-acceleration sensor type @b Since: @b 2.1 */
48         SENSOR_TYPE_DEVICE_ORIENTATION,  /**< The device-orientation sensor type @b Since: @b 2.1 */
49         SENSOR_TYPE_MAX,                 // This enum value is for internal use only.
50                                          // Using this enum value can cause behavioral,
51                                          // security-related, and consistency-related
52                                          // issues in the application.
53         SENSOR_TYPE_NONE = -1,           // This enum value is for internal use only.
54                                          // Using this enum value can cause behavioral,
55                                          // security-related, and consistency-related
56                                          // issues in the application.
57 };
58
59 /**
60 * @enum       SensorDataKey
61 *
62 * Defines the default key types for the SensorData class.
63 *
64 * @since      2.0
65 *
66 * @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.
67 */
68 enum SensorDataKey
69 {
70         SENSOR_DATA_KEY_0 = 0,
71         SENSOR_DATA_KEY_1,
72         SENSOR_DATA_KEY_2,
73         SENSOR_DATA_KEY_3,
74         SENSOR_DATA_KEY_4
75 };
76
77 /**
78 * @enum     AccelerationDataKey
79 *
80 * Defines the keys to access the acceleration sensor data.
81 *
82 * @since    2.0
83 */
84 enum AccelerationDataKey
85 {
86         ACCELERATION_DATA_KEY_TIMESTAMP = 256,    /**< The key to the timestamp of the acceleration sensor data */
87         ACCELERATION_DATA_KEY_X,                  /**< The key to the x-axis of the acceleration sensor data */
88         ACCELERATION_DATA_KEY_Y,                  /**< The key to the y-axis of the acceleration sensor data */
89         ACCELERATION_DATA_KEY_Z,                  /**< The key to the z-axis of the acceleration sensor data */
90         ACCELERATION_DATA_KEY_COUNT = 4           /**< The number of indices for the acceleration sensor data */
91 };
92
93 /**
94 * @enum     MagneticDataKey
95 *
96 * Defines the keys to access the magnetic sensor data.
97 *
98 * @since    2.0
99 */
100 enum MagneticDataKey
101 {
102         MAGNETIC_DATA_KEY_TIMESTAMP = 266,    /**< The key to the timestamp of the magnetic sensor data */
103         MAGNETIC_DATA_KEY_X,                  /**< The key to the x-axis of the magnetic sensor data */
104         MAGNETIC_DATA_KEY_Y,                  /**< The key to the y-axis of the magnetic sensor data  */
105         MAGNETIC_DATA_KEY_Z,                  /**< The key to the z-axis of the magnetic sensor data  */
106         MAGNETIC_DATA_KEY_COUNT = 4           /**< The number of indices to access magnetic sensor data */
107 };
108
109 /**
110 * @enum     ProximityDataKey
111 *
112 * Defines the keys to access the proximity sensor data.
113 *
114 * @since    2.0
115 */
116 enum ProximityDataKey
117 {
118         PROXIMITY_DATA_KEY_TIMESTAMP = 276,    /**< The key to the timestamp of the proximity sensor data */
119         PROXIMITY_DATA_KEY_ONOFF,              /**< The key to on/off the proximity sensor data */
120         PROXIMITY_DATA_KEY_COUNT = 2           /**< The number of indices to access the proximity sensor data */
121 };
122
123 /**
124 * @enum     TiltDataKey
125 *
126 * Defines the keys to access the tilt sensor data.
127 *
128 * @since    2.0
129 */
130 enum TiltDataKey
131 {
132         TILT_DATA_KEY_TIMESTAMP = 286,    /**< The key to the timestamp of the tilt sensor data */
133         TILT_DATA_KEY_AZIMUTH,            /**< The key to the azimuth of the tilt sensor data  */
134         TILT_DATA_KEY_PITCH,              /**< The key to the pitch of the tilt sensor data */
135         TILT_DATA_KEY_ROLL,               /**< The key to the roll of the tilt sensor data */
136         TILT_DATA_KEY_COUNT = 4           /**< The number of indices to access the tilt sensor data */
137 };
138
139 } } }// Tizen::Uix::Sensor
140
141 #endif // _FUIX_SENSOR_SENSOR_TYPES_H_