merge with master
[platform/framework/native/uix.git] / inc / FUixSensorDeviceOrientationSensorData.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     FUixSensorDeviceOrientationSensorData.h
20  * @brief    This is the header file for the %DeviceOrientationSensorData class.
21  *
22  * This header file contains the declarations of the %DeviceOrientationSensorData class.
23  */
24
25 #ifndef _FUIX_SENSOR_DEVICE_ORIENTATION_SENSOR_DATA_H_
26 #define _FUIX_SENSOR_DEVICE_ORIENTATION_SENSOR_DATA_H_
27
28 #include <FOspConfig.h>
29 #include <FUixSensorSensorData.h>
30
31 namespace Tizen { namespace Uix { namespace Sensor
32 {
33 /**
34  * @class    DeviceOrientationSensorData
35  * @brief    This class stores device-orientation sensor data, including a time stamp.
36  *
37  * @since 2.1
38  *
39  * @remarks      @b Header @b %file: @b \#include @b <FUix.h> @n
40  *               @b Library : @b osp-uix
41  *
42  * The %DeviceOrientationSensorData class stores device-orientation 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_ DeviceOrientationSensorData
47         : public Tizen::Uix::Sensor::SensorData
48 {
49 public:
50         /**
51          * This is the default constructor for this class.
52          *
53          * @since 2.1
54          */
55                 DeviceOrientationSensorData(void);
56
57         /**
58          * This is the destructor for this class.
59          *
60          * @since 2.1
61          */
62         virtual ~DeviceOrientationSensorData(void);
63
64         /**
65          * Copying of objects using this copy constructor is allowed.
66          *
67          * @since               2.1
68          *
69          * @param[in]   rhs     An instance of %DeviceOrientationSensorData
70          */
71         DeviceOrientationSensorData(const DeviceOrientationSensorData& rhs);
72
73         /**
74          * Compares the equality of values between two %DeviceOrientationSensorData objects by overriding the Tizen::Base::Object::Equals() method.
75          *
76          * @since          2.1
77          *
78          * @return         @c true if all the fields in the objects are equal, @n
79          *                     else @c false
80          * @param[in]    rhs     The Tizen::Base::Object with which the comparison is done
81          * @remarks             An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
82          */
83         virtual bool Equals(const Tizen::Base::Object& rhs) const;
84
85         /**
86          * Gets the hash value of the current instance by overriding the Tizen::Base::Object::GetHashCode() method.
87          *
88          * @since         2.1
89          *
90          * @return        The hash value of the current instance
91          */
92         virtual int GetHashCode(void) const;
93
94         /**
95          * Copying of objects using this copy assignment operator is allowed.
96          *
97          * @since          2.1
98          *
99          * @return         A reference to this instance
100          * @param[in]    rhs An instance of %DeviceOrientationSensorData
101          */
102         DeviceOrientationSensorData& operator =(const DeviceOrientationSensorData& rhs);
103
104
105
106 private:
107         virtual result GetValue(SensorDataKey dataKey, long& value) const;
108         virtual result GetValue(SensorDataKey dataKey, float& value) const;
109         virtual result GetValue(SensorDataKey dataKey, bool& value) const;
110
111 public:
112         /**
113          * The yaw value of the device-orientation sensor data
114          *
115          * @since 2.1
116          */
117         float yaw;
118
119         /**
120          * The roll value of the device-orientation sensor data
121          *
122          * @since 2.1
123          */
124         float roll;
125
126         /**
127          * The pitch value of the device-orientation sensor data
128          *
129          * @since 2.1
130          */
131         float pitch;
132
133
134 }; // DeviceOrientationSensorData
135 } } }// Tizen::Uix::Sensor
136
137 #endif // _FUIX_SENSOR_DEVICE_ORIENTATION_SENSOR_DATA_H_