2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
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 FUixSensor_SensorCoreEventTypes.h
20 * @brief This is the header file for the common data types and constants used by the _SensorEventDeliverer and the _ISensorCore.
22 * This header file contains the declarations of the common data types and constants used by _SensorEventDeliverer and the _ISensorCore.
25 #ifndef _FUIX_SENSOR_INTERNAL_SENSOR_CORE_EVENT_TYPES_H_
26 #define _FUIX_SENSOR_INTERNAL_SENSOR_CORE_EVENT_TYPES_H_
28 namespace Tizen { namespace Uix { namespace Sensor
30 typedef void* _SensorCoreEventHandle;
32 enum _SensorCoreEventType
34 _SENSOR_CORE_EVENT_TYPE_ACCELERATION_DATA = 0,
35 _SENSOR_CORE_EVENT_TYPE_MAGNETIC_FIELD_DATA,
36 _SENSOR_CORE_EVENT_TYPE_PROXIMITY_DISTANCE_DATA,
37 _SENSOR_CORE_EVENT_TYPE_TILT_DATA,
38 _SENSOR_CORE_EVENT_TYPE_ROTATION_RATE_DATA,
39 _SENSOR_CORE_EVENT_TYPE_LIGHT_LEVEL_DATA,
40 _SENSOR_CORE_EVENT_TYPE_ACCELERATION_SENSOR_WAKEUP,
41 _SENSOR_CORE_EVENT_TYPE_GRAVITY_DATA,
42 _SENSOR_CORE_EVENT_TYPE_USER_ACCELERATION_DATA,
43 _SENSOR_CORE_EVENT_TYPE_DEVICE_ORIENTATION_DATA,
44 _SENSOR_CORE_EVENT_TYPE_MAX,
45 _SENSOR_CORE_EVENT_TYPE_NONE = -1,
48 struct _SensorCoreEventValue
53 struct _SensorCoreEventAxisOf3Dimension
60 struct _SensorCoreEventRotationAxisOf3Dimension
67 struct _SensorCoreEventAzimuth
72 struct _SensorCoreEventDistance
77 struct _SensorCoreEventTiltAxisOf3Dimension
84 struct _SensorCoreEventDeviceOrientationAxisOf3Dimension
92 struct _SensorCoreEventLevel
97 union _SensorCoreEventKind
99 _SensorCoreEventValue invalidValueData;
100 _SensorCoreEventAxisOf3Dimension accelerationData;
101 _SensorCoreEventAxisOf3Dimension magneticFieldData;
102 _SensorCoreEventDistance proximityDistanceData;
103 _SensorCoreEventTiltAxisOf3Dimension tiltData;
104 _SensorCoreEventAxisOf3Dimension rotationRateData;
105 _SensorCoreEventLevel lightLevelData;
106 _SensorCoreEventAxisOf3Dimension gravityData;
107 _SensorCoreEventAxisOf3Dimension userAccelerationData;
108 _SensorCoreEventDeviceOrientationAxisOf3Dimension deviceOrientationData;
111 struct _SensorCoreEvent
114 _SensorCoreEventType eventType;
115 long long eventTimestamp;
116 _SensorCoreEventKind eventKind;
119 static const _SensorCoreEventHandle INVALID_SENSOR_CORE_EVENT_HANDLE = 0;
121 static const long long INVALID_SENSOR_CORE_EVENT_TIMESTAMP = 0LL;
123 static const long INVALID_SENSOR_CORE_EVENT_INTERVAL = 0L;
125 static const float INVALID_SENSOR_CORE_EVENT_VALUE = -9999.9999F;
127 static const _SensorCoreEvent INVALID_SENSOR_CORE_EVENT = {
129 _SENSOR_CORE_EVENT_TYPE_NONE,
130 INVALID_SENSOR_CORE_EVENT_TIMESTAMP,
131 { { INVALID_SENSOR_CORE_EVENT_VALUE } }
133 } } }// Tizen::Uix::Sensor
135 #endif // _FUIX_SENSOR_INTERNAL_SENSOR_CORE_EVENT_TYPES_H_