Merge "fix klocwork issue" into tizen_2.2
[platform/framework/native/uifw.git] / inc / FUiIDateTimeChangeEventListener.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 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                FUiIDateTimeChangeEventListener.h
20  * @brief               This is the header file for the %IDateTimeChangeEventListener interface.
21  *
22  * This header file contains the declarations of the %IDateTimeChangeEventListener interface. @n
23  * If a change event is generated, a method of this class is interface. @n
24  * So, if applications perform jobs related to change events, they use the methods of this interface.
25  *
26  */
27 #ifndef _FUI_IDATETIME_CHANGE_EVENT_LISTENER_H_
28 #define _FUI_IDATETIME_CHANGE_EVENT_LISTENER_H_
29
30 // Includes
31 #include <FBaseRtIEventListener.h>
32 #include <FBaseObject.h>
33
34 namespace Tizen { namespace Ui
35 {
36 class Control;
37 } }
38
39 namespace Tizen {namespace Ui
40 {
41
42 /**
43  * @interface   IDateTimeChangeEventListener
44  * @brief               This interface implements the listener for Date and Time change events.
45  *
46  * @since               2.0
47  *
48  * The %IDateTimeChangeEventListener interface is the listener interface for receiving date and time change events.
49  * The class that processes a date and time change event implements this interface, and the instance created with that class is
50  * registered with a UI control, using the DateTimePicker::AddDateTimeChangeEventListener() method. When the date and time change event
51  * occurs, the OnDateTimeChanged() method of that instance is invoked.
52  * @n
53  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/ui/implementing_datepicker.htm">DatePicker, TimePicker, and DateTimePicker</a>.
54  */
55 class _OSP_EXPORT_ IDateTimeChangeEventListener
56         : public Tizen::Base::Runtime::IEventListener
57 {
58 // Operation
59 public:
60         /**
61          * This is the destructor for this class.
62          *
63          * @since                       2.0
64          */
65         virtual ~IDateTimeChangeEventListener(void) {}
66
67         /**
68          * Called when there is a change in DateTime. @n
69          * The changed values of day, month, year, hour and minute are passed as input parameters.
70          *
71          * @since                       2.0
72          *
73          * @param[in]       source                  The source of the event
74          * @param[in]           year                    The year value
75          * @param[in]           month                   The month value
76          * @param[in]           day                             The day value
77          * @param[in]           hour                    The hour value
78          * @param[in]           minute                  The minute value
79          *
80          */
81         virtual void OnDateTimeChanged(const Tizen::Ui::Control& source, int year, int month, int day, int hour, int minute) = 0;
82
83
84         /**
85         * Called when the date and time change is canceled.
86         *
87         * @since                        2.0
88         *
89         * @param[in]    source          The source of the event
90         */
91         virtual void OnDateTimeChangeCanceled(const Tizen::Ui::Control& source) = 0;
92
93 protected:
94         //
95         // This method is for internal use only.
96         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
97         //
98         // This method is reserved and may change its name at any time without prior notice.
99         //
100         // @since      2.0
101         //
102         virtual void IDateTimeChangeEventListener_Reserved1(void) {}
103
104         //
105         // This method is for internal use only.
106         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
107         //
108         // This method is reserved and may change its name at any time without prior notice.
109         //
110         // @since      2.0
111         //
112         virtual void IDateTimeChangeEventListener_Reserved2(void) {}
113
114         //
115         // This method is for internal use only.
116         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
117         //
118         // This method is reserved and may change its name at any time without prior notice.
119         //
120         // @since      2.0
121         //
122         virtual void IDateTimeChangeEventListener_Reserved3(void) {}
123 }; // IDateTimeChangeEventListener
124
125 }} // Tizen::Ui
126
127 #endif // _FUI_IDATETIME_CHANGE_EVENT_LISTENER_H_