18ad0efc39f18d787e5f7e6eb39a06c1d3b9e898
[platform/framework/native/uix.git] / inc / FUixSensorProximitySensorData.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     FUixSensorProximitySensorData.h
20  * @brief    This is the header file for the %ProximitySensorData class.
21  *
22  * This header file contains the declarations of the %ProximitySensorData class.
23  */
24
25 #ifndef _FUIX_SENSOR_PROXIMITY_SENSOR_DATA_H_
26 #define _FUIX_SENSOR_PROXIMITY_SENSOR_DATA_H_
27
28 #include <FOspConfig.h>
29 #include <FUixSensorSensorData.h>
30
31 namespace Tizen { namespace Uix { namespace Sensor
32 {
33 /**
34  * @class    ProximitySensorData
35  * @brief    This class stores proximity sensor data, including a time stamp.
36  *
37  * @since 2.0
38  *
39  * @remarks      @b Header @b %file: @b \#include @b <FUix.h> @n
40  *               @b Library : @b osp-uix
41  *
42  * The %ProximitySensorData class stores proximity sensor data, including a time stamp.
43  * @n
44  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/sensor_manager.htm">Sensor Manager</a>.
45  */
46 class _OSP_EXPORT_ ProximitySensorData
47         : public Tizen::Uix::Sensor::SensorData
48 {
49 public:
50         /**
51          * This is the default constructor for this class.
52          *
53          * @since 2.0
54          */
55         ProximitySensorData(void);
56
57         /**
58          * This is the destructor for this class.
59          *
60          * @since 2.0
61          */
62         virtual ~ProximitySensorData(void);
63
64         /**
65          * Checks whether the object is detected.
66          *
67          * @since 2.0
68          *
69          * @return       @c true if the object is detected, @n
70          *               else @c false
71          */
72         bool IsObjectDetected(void) const;
73
74 private:
75         virtual result GetValue(SensorDataKey dataKey, long& value) const;
76         virtual result GetValue(SensorDataKey dataKey, float& value) const;
77         virtual result GetValue(SensorDataKey dataKey, bool& value) const;
78
79 public:
80         /**
81          * The distance value of the proximity sensor data
82          *
83          * @since 2.0
84          */
85         float distance;
86 }; // ProximitySensorData
87 } } }// Tizen::Uix:Sensor
88
89 #endif // _FUIX_SENSOR_PROXIMITY_SENSOR_DATA_H_