merge with master
[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         /**
75          * Copying of objects using this copy constructor is allowed.
76          *
77          * @since               2.1
78          *
79          * @param[in]   rhs     An instance of %ProximitySensorData
80          */
81         ProximitySensorData(const ProximitySensorData& rhs);
82
83         /**
84          * Compares the equality of values between two %ProximitySensorData objects by overriding the Tizen::Base::Object::Equals() method.
85          *
86          * @since          2.1
87          *
88          * @return         @c true if all the fields in the objects are equal, @n
89          *                     else @c false
90          * @param[in]    rhs     The Tizen::Base::Object with which the comparison is done
91          * @remarks             An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
92          */
93         virtual bool Equals(const Tizen::Base::Object& rhs) const;
94
95         /**
96          * Gets the hash value of the current instance by overriding the Tizen::Base::Object::GetHashCode() method.
97          *
98          * @since         2.1
99          *
100          * @return        The hash value of the current instance
101          */
102         virtual int GetHashCode(void) const;
103
104         /**
105          * Copying of objects using this copy assignment operator is allowed.
106          *
107          * @since          2.1
108          *
109          * @return         A reference to this instance
110          * @param[in]    rhs An instance of %ProximitySensorData
111          */
112         ProximitySensorData& operator =(const ProximitySensorData& rhs);
113
114 private:
115         virtual result GetValue(SensorDataKey dataKey, long& value) const;
116         virtual result GetValue(SensorDataKey dataKey, float& value) const;
117         virtual result GetValue(SensorDataKey dataKey, bool& value) const;
118
119 public:
120         /**
121          * The distance value of the proximity sensor data
122          *
123          * @since 2.0
124          */
125         float distance;
126 }; // ProximitySensorData
127 } } }// Tizen::Uix:Sensor
128
129 #endif // _FUIX_SENSOR_PROXIMITY_SENSOR_DATA_H_