2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 * @file FUixSensorSensorTypes.h
20 * @brief This is the header file for the common data types used by the SensorData and SensorManager classes.
22 * This header file contains the declarations of the common data types and constants used by the SensorData and SensorManager classes.
25 #ifndef _FUIX_SENSOR_SENSOR_TYPES_H_
26 #define _FUIX_SENSOR_SENSOR_TYPES_H_
28 namespace Tizen { namespace Uix { namespace Sensor
34 * Defines the sensor type.
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.
62 * Defines the default key types for the SensorData class.
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.
70 SENSOR_DATA_KEY_0 = 0,
78 * @enum AccelerationDataKey
80 * Defines the keys to access the acceleration sensor data.
84 enum AccelerationDataKey
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 */
94 * @enum MagneticDataKey
96 * Defines the keys to access the magnetic sensor data.
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 */
110 * @enum ProximityDataKey
112 * Defines the keys to access the proximity sensor data.
116 enum ProximityDataKey
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 */
126 * Defines the keys to access the tilt sensor data.
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 */
139 } } }// Tizen::Uix::Sensor
141 #endif // _FUIX_SENSOR_SENSOR_TYPES_H_