merge with master
[platform/framework/native/uix.git] / inc / FUixSensorIMotionEventListener.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        FUixSensorIMotionEventListener.h
20  * @brief       This is the header file for the %IMotionEventListener interface.
21  *
22  * This header file contains the declarations of the %IMotionEventListener interface.
23  */
24
25 #ifndef _FUIX_SENSOR_IMOTION_EVENT_LISTENER_H_
26 #define _FUIX_SENSOR_IMOTION_EVENT_LISTENER_H_
27
28 #include <FUixSensorMotionCommon.h>
29 #include <FBaseRtIEventListener.h>
30
31 namespace Tizen { namespace Uix { namespace Sensor
32 {
33
34 /**
35  * @interface   IMotionEventListener
36  * @brief       This interface is an event listener for the motion sensing events.
37  *
38  * @since       2.0
39  *
40  * @remarks     @b Header @b %file: @b \#include @b <FUix.h> @n
41  *              @b Library : @b osp-uix
42  *
43  * The %IMotionEventListener interface is a listener interface for the motion sensing events.
44  * @n
45  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/device_motions.htm">Device Motions</a>.
46  */
47
48 class _OSP_EXPORT_ IMotionEventListener
49         : virtual public Tizen::Base::Runtime::IEventListener
50 {
51 public:
52     /**
53      * This is the destructor for this class.
54          *
55      * @since    2.0
56      */
57     virtual ~IMotionEventListener(void){}
58
59 public:
60         /**
61          * Called when the snap event is detected. @n
62          * When a snap event occurs, and if its type is registered by an application, then the event is triggered.
63          *
64          * @since       2.0
65          *
66          * @param[in]   snapType    The type of the snap @n
67          *                          This is one of the types in Tizen::Uix::Sensor::MotionSnapType.
68          */
69         virtual void OnSnapDetected(MotionSnapType snapType) = 0;
70
71         /**
72          * Called when the double-tap event is detected. @n
73          * When a double-tap event occurs, and if its type is registered by an application, then the event is triggered.
74          *
75          * @since   2.0
76          *
77          * @see     Tizen::Uix::Sensor::MotionType
78          */
79         virtual void OnDoubleTapDetected(void) = 0;
80
81         /**
82          * Called when the shake event is detected. @n
83          * When a shake event occurs, and if its type is registered by an application, then the event is triggered.
84          *
85          * @since       2.0
86          *
87          * @param[in]   motionState     The type of the event state @n
88          *                              This is one of the states in Tizen::Uix::Sensor::MotionState.
89          */
90         virtual void OnShakeDetected(MotionState motionState) = 0;
91
92         /**
93                 * Called when the move-to-ear event is detected. @n
94                 * When a move-to-ear event occurs, and if its type is registered by an application, then the event is triggered.
95                 *
96                 * @since   2.1
97                 *
98                 * @see     Tizen::Uix::Sensor::MotionType
99                 */
100
101             virtual void OnMoveToEarDetected(void) {}
102
103 protected:
104
105     //
106     // This method is for internal use only. Using this method can cause behavioral, security-related,
107     // and consistency-related issues in the application.
108     //
109     virtual void IMotionEventListener_Reserved1(void) {}
110
111     //
112     // This method is for internal use only. Using this method can cause behavioral, security-related,
113     // and consistency-related issues in the application.
114     //
115     virtual void IMotionEventListener_Reserved2(void) {}
116 }; // IMotionEventListener
117
118 } } } // Tizen::Uix::Sensor
119
120 #endif //_FUIX_SENSOR_IMOTION_EVENT_LISTENER_H_