Init Tizen 2.2.1
[framework/osp/uix.git] / inc / FUixSensorSensorData.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     FUixSensorSensorData.h
20  * @brief    This is the header file for the %SensorData class.
21  *
22  * This header file contains the declarations of the %SensorData class.
23  */
24
25 #ifndef _FUIX_SENSOR_SENSOR_DATA_H_
26 #define _FUIX_SENSOR_SENSOR_DATA_H_
27
28 #include <FBaseDataType.h>
29 #include <FBaseObject.h>
30 #include <FUixSensorSensorTypes.h>
31
32 namespace Tizen { namespace Uix { namespace Sensor
33 {
34
35 /**
36  * @class    SensorData
37  * @brief    This class stores sensor data, including a time stamp.
38  *
39  * @since    2.0
40  *
41  * The %SensorData class stores sensor data, including a time stamp.
42  * 
43  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/sensor_manager.htm">Sensor Manager</a>.
44  */
45 class _OSP_EXPORT_ SensorData
46         : public Tizen::Base::Object
47 {
48 public:
49         /**
50          * This is the default constructor for this class.
51          *
52          * @since    2.0
53          */
54         SensorData(void);
55
56         /**
57          * This is the destructor for this class.
58          *
59          * @since    2.0
60          */
61         virtual ~SensorData(void);
62
63         /**
64          * Gets the sensor data with a @c long value as the key input.
65          *
66          * @since         2.0
67          *
68          * @return        An error code
69          * @param[in]     dataKey          The key to access the sensor data
70          * @param[out]    value            The @c long value that represents the sensor data requested by the user
71          * @exception     E_SUCCESS        The method is successful.
72          * @exception     E_INVALID_ARG    The data matching the specified key and data type cannot be found.
73          */
74         virtual result GetValue(SensorDataKey dataKey, long& value) const;
75
76         /**
77          * Gets the sensor data with a @c float value as the key input.
78          *
79          * @since         2.0
80          *
81          * @return        An error code
82          * @param[in]     dataKey          The key to access the sensor data
83          * @param[out]    value            The @c float value that represents the sensor data requested by the user
84          * @exception     E_SUCCESS        The method is successful.
85          * @exception     E_INVALID_ARG    The data matching the specified key and data type cannot be found.
86          */
87         virtual result GetValue(SensorDataKey dataKey, float& value) const;
88
89         /**
90          * Gets the sensor data with a @c bool value as the key input.
91          *
92          * @since         2.0
93          *
94          * @return        An error code
95          * @param[in]     dataKey          The key to access the sensor data
96          * @param[out]    value            The @c bool value that represents the sensor data requested by the user
97          * @exception     E_SUCCESS        The method is successful.
98          * @exception     E_INVALID_ARG    The data matching the specified key and data type cannot be found.
99          */
100         virtual result GetValue(SensorDataKey dataKey, bool& value) const;
101
102 public:
103         /**
104          * The time stamp of the sensor data.
105          *
106          * @since 2.0
107          */
108         long long timestamp;
109
110 }; // SensorData
111
112 } } }// Tizen::Uix::Sensor
113
114 #endif // _FUIX_SENSOR_SENSOR_DATA_H_