2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.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
9 // http://floralicense.org/license/
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.
18 * @file FUiCtrl_DateTimeChangeEvent.h
19 * @brief This is the header file for the _DateTimeChangeEvent and _DateTimeChangeEventArg classes.
22 #ifndef _FUI_CTRL_INTERNAL_DATETIME_CHANGE_EVENT_H_
23 #define _FUI_CTRL_INTERNAL_DATETIME_CHANGE_EVENT_H_
25 #include <FOspConfig.h>
26 #include <FBaseResult.h>
27 #include <FBaseRt_Event.h>
28 #include "FUiCtrl_DateTimeDefine.h"
30 namespace Tizen { namespace Ui
35 namespace Tizen { namespace Ui { namespace Controls
38 class _DateTimeChangeEventArg
39 : public Tizen::Base::Runtime::IEventArg
40 , public Tizen::Base::Object
43 _DateTimeChangeEventArg(_DateTimeChangeStatus status);
45 ~_DateTimeChangeEventArg(void);
47 int GetYear(void) const;
49 int GetMonth(void) const;
51 int GetDay(void) const;
53 int GetHour(void) const;
55 int GetMinute(void) const;
57 Tizen::Base::DateTime GetDateTime(void) const;
59 void SetDateTime(const Tizen::Base::DateTime& dateTime);
61 void SetTime(int hour, int minute);
63 void SetDate(int year, int month, int day);
65 _DateTimeChangeStatus GetStatus(void) const;
69 _DateTimeChangeStatus __status;
77 Tizen::Base::DateTime __dateTime;
79 }; // _DateTimeChangeEventArg
82 * @class _DateTimeChangeEvent
83 * @brief This class handle a Date change event.
86 class _DateTimeChangeEvent
87 : public Tizen::Base::Runtime::_Event
91 * This is the default class constructor. After creating an instance of this
92 * class, you must explicitly call one of construction methods to initialize
95 _DateTimeChangeEvent(const Tizen::Ui::_Control& source);
98 * This is the class destructor.
100 virtual ~_DateTimeChangeEvent(void);
105 * This method checks the arg and finds out the type of event. After that this method calls appopriate
106 * pListener's method.
108 * @return This method returns a result code.
109 * @param[in] pListener It is a event listener related to this item event.
110 * @param[in] arg It is an argument-like instance of item event retransmitted to the listener's method
112 * @exception E_SUCCESS - The method is successful.
113 * @exception E_ARG_NULL - The listener is null.
114 * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n
115 * The pListener is not the instance of IItemEventListener class or
116 * the pItemEventArg is not the instance of __FlashEventArg class.
119 virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg);
123 Tizen::Ui::_Control* __pSource;
124 }; // _DateTimeChangeEvent
127 }}} // Tizen::Ui::Controls
129 #endif // _FUI_CTRL_INTERNAL_DATETIME_CHANGE_EVENT_H_